@@ -40,7 +40,19 @@ 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+ # Paths to exclude from TRANSLATE_SOURCES
45+ # Each must be preceded by "-path"; if any wildcards, enclose in quotes.
46+ # Separate by "-o" (Find's "or" operand)
47+ TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \
48+ -o -path "ports/*/build" \
49+ -o -path ports/esp32s2/esp-idf \
50+ -o -path ports/cxd56/spresense-exported-sdk \
51+ -o -path ports/stm/st_driver \
52+ -o -path ports/atmel-samd/asf4 \
53+ -o -path ports/mimxrt10xx/sdk \
54+ -o -path lib/tinyusb \
55+ -o -path lib/lwip \
4456
4557.PHONY : help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext stubs
4658
@@ -210,7 +222,7 @@ pseudoxml:
210222all-source :
211223
212224locale/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
225+ 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
214226
215227# Historically, `make translate` updated the .pot file and ran msgmerge.
216228# However, this was a frequent source of merge conflicts. Weblate can perform
@@ -235,7 +247,7 @@ merge-translate:
235247
236248.PHONY : check-translate
237249check-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
250+ 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
239251 $(PYTHON ) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$? ; rm -f locale/circuitpython.pot.tmp; exit $$ status
240252
241253stubs :
0 commit comments