kapitanbooru-uploader/update_translations.bat
Kapitan 9361bc0363
All checks were successful
Gitea/kapitanbooru-uploader/pipeline/head This commit looks good
Translations, suggestion box, UX
2025-03-03 00:47:38 +01:00

19 lines
491 B
Batchfile

@echo off
setlocal enabledelayedexpansion
:: Create POT file
del locales\messages.pot 2>nul
for %%f in (*.py) do (
if not exist locales\messages.pot (
xgettext -d messages -o locales\messages.pot "%%f"
) else (
xgettext -d messages -o locales\messages.pot --join-existing "%%f"
)
)
:: Update PO files
for /D %%d in (locales\*) do (
if exist "%%d\LC_MESSAGES\messages.po" (
msgmerge --update "%%d\LC_MESSAGES\messages.po" locales\messages.pot
)
)