Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update .scripts/intercept.py
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
  • Loading branch information
josix and ezio-melotti authored Mar 15, 2025
commit 8ad024bca599987a69e99aedcfe76e612bb3ec1b
11 changes: 5 additions & 6 deletions .scripts/intercept.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ def get_pofile_from_path(path: Path) -> polib.POFile:

if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument(
"path",
help="the path of a PO file",
)
parser.add_argument("-n", '--occurrence_number', type=int, default=1)
parser.add_argument("path", type=Path,
help="the path of a PO file")
parser.add_argument("-n", '--occurrence_number',
type=int, default=1)
args = parser.parse_args()
path = Path(args.path).resolve()
path = args.path.resolve()
pofile = get_pofile_from_path(path)
occurrence_number = args.occurrence_number

Expand Down