Removing pot file freshness check (#4576)

This commit is contained in:
Daniel Girtler 2026-06-09 17:08:38 +10:00 committed by GitHub
parent 8ce2486846
commit c6cb7b319d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 15 deletions

View File

@ -70,25 +70,10 @@ cmd_check_no_tr_fstring() {
echo "No tr(f-string) anti-pattern found."
}
cmd_check_pot_freshness() {
# msgcmp (not diff) because base.pot carries legacy stale entries from
# --join-existing; diff would always fail until a full cleanup is done.
echo "Checking base.pot for missing strings..."
find . -type f -iname '*.py' | sort \
| xargs xgettext --no-location --omit-header --keyword='tr' \
-d base -o /tmp/generated.pot
if ! msgcmp --use-untranslated locales/base.pot /tmp/generated.pot; then
echo "ERROR: base.pot is missing strings - run: locales_generator.sh all" >&2
return 1
fi
echo "base.pot contains all translatable strings."
}
cmd_check() {
local failed=0
cmd_check_po_syntax || failed=1
cmd_check_no_tr_fstring || failed=1
cmd_check_pot_freshness || failed=1
if [ "$failed" -eq 1 ]; then
echo "Some translation checks failed." >&2
exit 1