sandbox/update_pot.py: Run msgmerge as well

This commit is contained in:
Valentin Lorentz 2022-02-06 00:11:38 +01:00
parent 24f0e21319
commit f13d275076

View File

@ -10,5 +10,12 @@ for plugin_path in pathlib.Path("plugins/").iterdir():
continue
subprocess.run(["pygettext3", "-D", "config.py", "plugin.py"], cwd=plugin_path)
for po_path in plugin_path.glob("locales/*.po"):
subprocess.run(["msgmerge", "--quiet", "--update", po_path, plugin_path / "messages.pot"], stdout=subprocess.DEVNULL)
core_files = pathlib.Path("src/").glob("**/*.py")
subprocess.run(["pygettext3", "-p", "locales/", *core_files])
pot_path = pathlib.Path("locales/messages.pot")
for po_path in pathlib.Path("").glob("locales/*.po"):
subprocess.run(["msgmerge", "--quiet", "--update", po_path, pot_path], stdout=subprocess.DEVNULL)