Skip to content

Commit 35cea18

Browse files
authored
Merge pull request #8768 from jepler/error-make-translate-ulab
Ensure ulab submodule is populated when doing translate checks
2 parents 6627bd7 + 490960c commit 35cea18

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Makefile

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

229+
TRANSLATE_CHECK_SUBMODULES=if ! [ -f extmod/ulab/README.md ]; then python tools/ci_fetch_deps.py translate; fi
229230
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.pot -f- -L C -s --add-location=file --keyword=MP_ERROR_TEXT -o - | sed -e '/"POT-Creation-Date: /d'
230231
locale/circuitpython.pot: all-source
232+
$(TRANSLATE_CHECK_SUBMODULES)
231233
$(TRANSLATE_COMMAND) > $@
232234

233235
# Historically, `make translate` updated the .pot file and ran msgmerge.
@@ -253,6 +255,7 @@ merge-translate:
253255

254256
.PHONY: check-translate
255257
check-translate:
258+
$(TRANSLATE_CHECK_SUBMODULES)
256259
$(TRANSLATE_COMMAND) > locale/circuitpython.pot.tmp
257260
$(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status
258261

@@ -325,6 +328,11 @@ clean-nrf:
325328
clean-stm:
326329
$(MAKE) -C ports/stm BOARD=feather_stm32f405_express clean
327330

331+
extmod/ulab/README.md: fetch-translate-submodules
332+
333+
.PHONY: fetch-translate-submodules
334+
fetch-translate-submodules:
335+
$(PYTHON) tools/ci_fetch_deps.py translate
328336

329337
.PHONY: fetch-all-submodules
330338
fetch-all-submodules:

tools/ci_fetch_deps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ def main(target):
159159
submodules = [".", "frozen"] # explicitly list frozen to get tags
160160
elif target == "scheduler":
161161
submodules = ["extmod/ulab", "lib/", "tools/"]
162+
elif target == "translate":
163+
submodules = ["extmod/ulab"]
162164
elif target == "tests":
163165
submodules = [
164166
"extmod/ulab",

0 commit comments

Comments
 (0)