Skip to content

feat: frontend-base i18n support#824

Merged
arbrandes merged 3 commits into
openedx:frontend-basefrom
brian-smith-tcril:translations-pull
Apr 9, 2026
Merged

feat: frontend-base i18n support#824
arbrandes merged 3 commits into
openedx:frontend-basefrom
brian-smith-tcril:translations-pull

Conversation

@brian-smith-tcril
Copy link
Copy Markdown
Contributor

@brian-smith-tcril brian-smith-tcril commented Apr 6, 2026

Four changes to wire up frontend-base i18n support in this app, per the migration guide:

1. Add atlasTranslations to package.json

Adds an atlasTranslations field so that sites using openedx translations:pull can resolve and pull this app's translations transitively, and so the app can pull its own translations when running in dev mode.

"atlasTranslations": {
  "path": "translations/frontend-app-learner-dashboard/src/i18n/messages",
  "dependencies": ["@openedx/frontend-base"]
}

2. Switch pull_translations to use openedx translations:pull

Replaces the old Makefile atlas pull commands with npm run translations:pull (backed by openedx translations:pull), passing ATLAS_OPTIONS through. Also removes the unused intl_imports, i18n, ATLAS_EXTRA_SOURCES, and ATLAS_EXTRA_INTL_IMPORTS Makefile variables and the detect_changed_source_translations target (confirmed unused by any CI workflow or translation-related target).

3. Add src/i18n/index.ts and src/i18n/messages.d.ts

Renames src/i18n/index.jsindex.ts (the project uses TypeScript) and replaces the placeholder messages object with a clean re-export from ./messages. Adds a messages.d.ts type declaration stub so TypeScript is satisfied before translations:pull has been run.

4. Remove App.messages from src/app.ts

Removes the messages import and field from the app config — App.messages was removed from the App type in frontend-base. Translations are now handled by the frontend-base i18n pipeline via site.i18n.

Before merging

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (frontend-base@08b54cd). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             frontend-base     #824   +/-   ##
================================================
  Coverage                 ?   90.36%           
================================================
  Files                    ?      152           
  Lines                    ?     1287           
  Branches                 ?      267           
================================================
  Hits                     ?     1163           
  Misses                   ?      119           
  Partials                 ?        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brian-smith-tcril brian-smith-tcril linked an issue Apr 7, 2026 that may be closed by this pull request
brian-smith-tcril and others added 2 commits April 9, 2026 08:39
- Rename src/i18n/index.js → index.ts (project uses TypeScript)
- Replace placeholder messages object with clean re-export from ./messages
- Add src/i18n/messages.d.ts type stub so TypeScript is satisfied before
  translations:pull has been run
- Add translations:pull npm script (backed by openedx translations:pull)
- Replace old atlas-based pull_translations Makefile target with
  npm run translations:pull, passing ATLAS_OPTIONS through
- Remove unused intl_imports, i18n, ATLAS_EXTRA_SOURCES, and
  ATLAS_EXTRA_INTL_IMPORTS Makefile variables
- Remove detect_changed_source_translations Makefile target (unused by
  any CI workflow, extract_translations, or pull_translations)
- Add src/i18n/messages.ts, src/i18n/messages/, and
  src/i18n/site-messages/index.ts to .gitignore (generated files)
- Update package-lock to resolve @openedx/frontend-base to 1.0.0-alpha.23

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@brian-smith-tcril brian-smith-tcril changed the title feat: add atlasTranslations to package.json feat: frontend-base i18n support Apr 9, 2026
@brian-smith-tcril brian-smith-tcril marked this pull request as ready for review April 9, 2026 12:55
@arbrandes arbrandes merged commit eb9a2b1 into openedx:frontend-base Apr 9, 2026
6 checks passed
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

i18n pipeline

3 participants