Ensure translate and check-translate use the same command

They had diverged. This doesn't appear to be the cause of the build failure
on #8614, but it doesn't hurt to make sure they always match.
This commit is contained in:
Jeff Epler 2023-11-15 11:57:52 -06:00
parent 4d93849a9e
commit f2bd258131
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -226,8 +226,9 @@ pseudoxml:
.PHONY: all-source .PHONY: all-source
all-source: all-source:
TRANSLATE_COMMAND=find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -x locale/synthetic.po -f- -L C -s --add-location=file --keyword=MP_ERROR_TEXT -o - | sed -e '/"POT-Creation-Date: /d'
locale/circuitpython.pot: all-source locale/circuitpython.pot: all-source
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -x locale/synthetic.po -f- -L C -s --add-location=file --keyword=MP_ERROR_TEXT -o - | sed -e '/"POT-Creation-Date: /d' > $@ $(TRANSLATE_COMMAND) > $@
# Historically, `make translate` updated the .pot file and ran msgmerge. # Historically, `make translate` updated the .pot file and ran msgmerge.
# However, this was a frequent source of merge conflicts. Weblate can perform # However, this was a frequent source of merge conflicts. Weblate can perform
@ -252,7 +253,7 @@ merge-translate:
.PHONY: check-translate .PHONY: check-translate
check-translate: check-translate:
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate --keyword=MP_ERROR_TEXT -o circuitpython.pot.tmp -p locale $(TRANSLATE_COMMAND) > locale/circuitpython.pot.tmp
$(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status $(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status
.PHONY: stubs .PHONY: stubs