Merge branch '4592_clang_format'
[midnight-commander.git] / maint / sync-transifex / po-to-transifex.py
blob972ea573d9d9c8ad897432d0323dae0c497ba138
1 #!/usr/bin/env python3
3 import subprocess
4 from pathlib import Path
6 from translation_utils import init_sync_dir
8 RESOURCE_NAME = "mc.pot"
10 SCRIPT_DIR = Path(__file__).parent
11 SOURCE_DIR = SCRIPT_DIR.parent.parent
13 sync_dir = init_sync_dir(SCRIPT_DIR, RESOURCE_NAME)
15 # Copy mc.pot to the working directory
16 (sync_dir / RESOURCE_NAME).write_text((SOURCE_DIR / "po" / RESOURCE_NAME).read_text())
18 subprocess.run(("tx", "push", "--source"), cwd=sync_dir, check=True)