Skip to content

Commit f2bd258

Browse files
committed
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.
1 parent 4d93849 commit f2bd258

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ pseudoxml:
226226
.PHONY: all-source
227227
all-source:
228228

229+
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'
229230
locale/circuitpython.pot: all-source
230-
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' > $@
231+
$(TRANSLATE_COMMAND) > $@
231232

232233
# Historically, `make translate` updated the .pot file and ran msgmerge.
233234
# However, this was a frequent source of merge conflicts. Weblate can perform
@@ -252,7 +253,7 @@ merge-translate:
252253

253254
.PHONY: check-translate
254255
check-translate:
255-
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
256+
$(TRANSLATE_COMMAND) > locale/circuitpython.pot.tmp
256257
$(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status
257258

258259
.PHONY: stubs

0 commit comments

Comments
 (0)