Skip to content

feat: frontend-base i18n support#1661

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

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

Conversation

@brian-smith-tcril

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

Copy link
Copy Markdown
Contributor

Three 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-authn/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 placeholder messages object from src/i18n/index.js and the manual messages import in src/app.ts — translations are now handled by the frontend-base i18n pipeline.

Also removes the unused intl_imports and i18n 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 adds a messages.d.ts type declaration stub so TypeScript is satisfied before translations:pull has been run.

Before merging

🤖 Generated with Claude Code

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

codecov Bot commented Apr 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.12%. Comparing base (ffe7e18) to head (9414b9f).
⚠️ Report is 5 commits behind head on frontend-base.

Additional details and impacted files
@@              Coverage Diff               @@
##           frontend-base    #1661   +/-   ##
==============================================
  Coverage          92.12%   92.12%           
==============================================
  Files                 92       92           
  Lines               2045     2045           
  Branches             577      588   +11     
==============================================
  Hits                1884     1884           
  Misses               158      158           
  Partials               3        3           

☔ 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 brian-smith-tcril changed the title feat: add atlasTranslations to package.json feat: frontend-base i18n support Apr 7, 2026
brian-smith-tcril and others added 2 commits April 9, 2026 08:25
- Rename src/i18n/index.js → index.ts (project uses TypeScript)
- Add src/i18n/messages.d.ts type stub so TypeScript is satisfied before
  translations:pull has been run
- Remove src/i18n/messages.ts from git tracking (gitignored, generated)
- Remove unused intl_imports and i18n Makefile variables
- Remove detect_changed_source_translations Makefile target (unused by
  any CI workflow, extract_translations, or pull_translations)
- 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 marked this pull request as ready for review April 9, 2026 12:48
@arbrandes arbrandes merged commit 3764889 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

None yet

Development

Successfully merging this pull request may close these issues.

i18n pipeline

3 participants