Commit Graph

7 Commits

Author SHA1 Message Date
gudnimg 940f5b7214 Add executable permission for update-po.py and update-pot.py on Linux 2023-02-20 17:53:41 +00:00
Guðni Már Gilbert 526e02a041 Fix an issue with using --file argument
The following command did not work in the lang folder:
python .\update-po.py --file ./po/Firmware_cs.po

To resolve this we just extract the filename from
the path and use the constant PO_DIR to make
sure the path is always the same.
2023-02-18 10:30:18 +00:00
Guðni Már Gilbert b6ef8ea32c Add a backup of po files 2023-02-18 10:13:34 +00:00
Guðni Már Gilbert 62c87a1fe5 Adjust module docstring 2023-02-18 09:53:57 +00:00
Guðni Már Gilbert b14f3780d4 Add mutually exclusive arguments --file and --all
Only one of these arguments must be supplied, or argparse raises an error.
2023-02-18 09:53:57 +00:00
Guðni Már Gilbert 7966633c1a Allow languages to be updated from any directory
Now these commands will work:
python .\lang\update-po.py
python .\lang\update-pot.py

When current working directory is
.\Prusa-Firmware\

Previously, you'd need to call the
script within the lang folder.
2023-02-18 09:53:56 +00:00
Guðni Már Gilbert 12123d6d52 languages: create new script update_po.py
The script should do the same work as when one run update_po.sh
The Python script can be run on Windows too.
2023-02-18 09:53:56 +00:00