@@ -40,7 +40,8 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
4040# the i18n builder cannot share the environment and doctrees with the others
4141I18NSPHINXOPTS = $(BASEOPTS )
4242
43- TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/mimxrt10xx ports/nrf ports/stm py shared-bindings shared-module supervisor
43+ TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/esp32s2 ports/mimxrt10xx ports/nrf ports/stm py shared-bindings shared-module supervisor
44+ TRANSLATE_SOURCES_EXC = -path ports/*/build-* -o -path ports/esp32s2/esp-idf
4445
4546.PHONY : help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext stubs
4647
@@ -210,7 +211,7 @@ pseudoxml:
210211all-source :
211212
212213locale/circuitpython.pot : all-source
213- find $(TRANSLATE_SOURCES ) -iname " *.c" -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
214+ 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 -o circuitpython.pot -p locale
214215
215216# Historically, `make translate` updated the .pot file and ran msgmerge.
216217# However, this was a frequent source of merge conflicts. Weblate can perform
@@ -235,7 +236,7 @@ merge-translate:
235236
236237.PHONY : check-translate
237238check-translate :
238- find $(TRANSLATE_SOURCES ) -iname " *.c" -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot.tmp -p locale
239+ 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 -o circuitpython.pot.tmp -p locale
239240 $(PYTHON ) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$? ; rm -f locale/circuitpython.pot.tmp; exit $$ status
240241
241242stubs :
0 commit comments