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.
This commit is contained in:
parent
b6ef8ea32c
commit
526e02a041
|
|
@ -37,7 +37,7 @@ def main():
|
||||||
for po_file in PO_FILE_LIST:
|
for po_file in PO_FILE_LIST:
|
||||||
# Start by creating a back-up of the .po file
|
# Start by creating a back-up of the .po file
|
||||||
po_file_bak = po_file.with_suffix(".bak")
|
po_file_bak = po_file.with_suffix(".bak")
|
||||||
shutil.copy(PO_DIR / po_file, PO_DIR / po_file_bak)
|
shutil.copy(PO_DIR / po_file.name, PO_DIR / po_file_bak.name)
|
||||||
po = polib.pofile(po_file)
|
po = polib.pofile(po_file)
|
||||||
po.merge(POT_REFERENCE)
|
po.merge(POT_REFERENCE)
|
||||||
po.save(po_file)
|
po.save(po_file)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue