Skip to content

Commit 510de50

Browse files
brian-smith-tcrilclaude
authored andcommitted
fix: simplify i18n extraction pipeline
The formatjs formatter in @openedx/frontend-base now outputs flat KV JSON directly to src/i18n/transifex_input.json (as of alpha.16), so the separate i18n.concat step and its associated transifex-utils dependency are no longer needed. Bump @openedx/frontend-base peer dep to ^1.0.0-alpha.16 to require the version that includes this change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 575892f commit 510de50

3 files changed

Lines changed: 19 additions & 31 deletions

File tree

Makefile

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
intl_imports = ./node_modules/.bin/intl-imports.js
2-
transifex_utils = ./node_modules/.bin/transifex-utils.js
32
i18n = ./src/i18n
4-
transifex_input = $(i18n)/transifex_input.json
5-
6-
# This directory must match .babelrc .
7-
transifex_temp = ./temp/babel-plugin-formatjs
83

94
precommit:
105
npm run lint
@@ -26,16 +21,9 @@ build: clean
2621
cp "$$f" "$$d"; \
2722
done' sh {} +
2823

29-
i18n.extract:
30-
# Pulling display strings from .jsx files into .json files...
31-
rm -rf $(transifex_temp)
32-
npm run-script i18n_extract
33-
34-
i18n.concat:
35-
# Gathering JSON messages into one file...
36-
$(transifex_utils) $(transifex_temp) $(transifex_input)
37-
38-
extract_translations: | requirements i18n.extract i18n.concat
24+
extract_translations: | requirements
25+
# Pulling display strings from source files into src/i18n/transifex_input.json...
26+
npm run i18n_extract
3927

4028
# Despite the name, we actually need this target to detect changes in the incoming translated message files as well.
4129
detect_changed_source_translations:

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"tsc-alias": "^1.8.16"
7474
},
7575
"peerDependencies": {
76-
"@openedx/frontend-base": "^1.0.0-alpha.14",
76+
"@openedx/frontend-base": "^1.0.0-alpha.16",
7777
"@openedx/paragon": "^23",
7878
"@tanstack/react-query": "^5",
7979
"react": "^18",

0 commit comments

Comments
 (0)