hints-to-transifex.py 518 B

12345678910111213141516171819
  1. #!/usr/bin/env python3
  2. import subprocess
  3. from pathlib import Path
  4. from translation_utils import create_po4a_config, init_sync_dir
  5. RESOURCE_NAME = "mc.hint"
  6. SCRIPT_DIR = Path(__file__).parent
  7. SOURCE_DIR = SCRIPT_DIR.parent.parent.parent
  8. sync_dir = init_sync_dir(SCRIPT_DIR, RESOURCE_NAME)
  9. po4a_config = create_po4a_config(sync_dir, SCRIPT_DIR, SOURCE_DIR, RESOURCE_NAME)
  10. subprocess.run(("po4a", str(po4a_config)), cwd=SCRIPT_DIR, check=True)
  11. subprocess.run(("tx", "push", "--source"), cwd=sync_dir, check=True)