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)