2 """Merge new/updated messages from jack_mixer.pot into existing translations with msgmerge."""
6 from os
.path
import basename
, join
, splitext
7 from subprocess
import run
9 LOCALEDIR
= join(os
.getcwd(), "data", "locale")
11 for po
in glob
.glob(join(LOCALEDIR
, "*.po")):
13 domain
, lang
= splitext(fn
)[0].rsplit("-", 1)
14 pot
= join(LOCALEDIR
, domain
+ ".pot")
15 print(f
"Merging new/updated messages from {pot} into {po} ...")
16 run(["msgmerge", "-U", po
, pot
])