fix: simplify i18n extraction pipeline#1656
Merged
arbrandes merged 1 commit intoopenedx:frontend-basefrom Mar 26, 2026
Merged
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## frontend-base #1656 +/- ##
================================================
Coverage ? 92.12%
================================================
Files ? 92
Lines ? 2045
Branches ? 588
================================================
Hits ? 1884
Misses ? 158
Partials ? 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
arbrandes
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make extract_translationsby removing the separatei18n.concatstep@openedx/frontend-base(as ofalpha.16) now writes flat KV JSON directly tosrc/i18n/transifex_input.json, so the concat step and its associatedtransifex-utilsdependency are no longer needed@openedx/frontend-basepeer dep to^1.0.0-alpha.16to require the version that includes this change (see openedx/frontend-base#200)Verified by running
make extract_translationson this branch and confirmingsrc/i18n/transifex_input.jsonis written correctly. Also compared the output against upstreammaster— our branch produces a strict subset (same keys, same values; 16 keys absent due to source code removed in thefrontend-basebranch, zero conflicts).Test plan
make extract_translationsand verifysrc/i18n/transifex_input.jsonis generated in flat KV formatLog
extract-translations work log
Repo:
frontend-app-authn— branchextract-translations(offfrontend-base)Goal: Get
make extract_translationsworking on thefrontend-basebranch, using the pattern established in openedx/paragon#4177.Background
Standard MFEs use a two-step pipeline via
make extract_translations:i18n.extract— runsfedx-scripts formatjs extract(fromfrontend-build), outputs an array of{id, defaultMessage, description}objects to./temp/babel-plugin-formatjs/Default.messages.jsoni18n.concat— runstransifex-utils.js(fromfrontend-platform), reads that array and writes flat KV tosrc/i18n/transifex_input.jsonThe
frontend-basebranch doesn't havefrontend-platformorfrontend-buildavailable, so this pipeline breaks.Error (current, on
frontend-basebranch without this fix)make extract_translationsfails at thei18n.concatstep:Investigation findings
i18n_extractinpackage.jsonrunsopenedx formatjs extract(from@openedx/frontend-baseCLI)./temp/formatjs/Default.messages.jsoni18n.concatstep passes./temp/babel-plugin-formatjstotransifex-utils.js— that directory never gets created, so it throwsFound no messagesfrontend-build-era path./temp/babel-plugin-formatjs, butfrontend-base's CLI writes to./temp/formatjsThe fix in openedx/frontend-base#200 sidesteps this entirely — the formatter now outputs flat KV directly to
src/i18n/transifex_input.json, removing the need for the concat step altogether.Verification
make extract_translationsonfrontend-basebranch (without fix): ❌Error: Found no messagesmake extract_translationson upstreammaster: ✅ passesmake extract_translationson this branch (extract-translations): ✅ passesmaster: our branch is a strict subset — same keys, same values, zero conflicts (16 keys absent due to source code removed in thefrontend-basebranch)🤖 Generated with Claude Code