You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
i18n: lms doesn't read the cross-app language preference that os already sets #259
os sets a cross-subdomain language preference that lms never reads, so a
language chosen in one IBL app doesn't carry into the LMS.
From os/i18n/config.ts:
/** * Shared Open edX language-preference cookie. Set on the registrable parent * domain (e.g. `.iblai.app`) so the selected language is synced across all * subdomain apps (auth, learn, mentor, …). */exportconstOPENEDX_LOCALE_COOKIE='openedx-language-preference';
lms is one of those subdomain apps, but it has no i18n at all — no next-intl, no messages/, no locale resolution in any of its 75
dependencies. So the mechanism for syncing language across apps is already
built and deployed, and the LMS is the hole in it. A learner who picks
Français in the mentor app lands on an English course catalogue.
Why it may be worth prioritising
os already ships fr, es and zh at 2,137 keys each. The learner-facing
product is the one that stays English-only — which is backwards if the LMS is
what gets deployed to non-English-speaking workforces.
Why the port is cheaper than the file count suggests
lms has 594 .tsx files across 86 routes, but os resolves locale from a
cookie with no i18n routing — so none of those routes need restructuring.
No [locale] segments, no middleware rewrite. The work is the provider plus
string extraction, which can be done surface by surface.
The tooling ports almost verbatim too: scripts/validate-i18n.mjs already
checks key parity across catalogs and flags entries byte-identical to English
as probably-untranslated, with a SAME_OK allowlist for terms like LLM and SSO. .github/workflows/pr-i18n.yml gates merges on it.
Proposed first PR
Rather than one large change, a beachhead that establishes the pattern and lets
the rest happen incrementally:
Add next-intl, and port i18n/config.ts and i18n/request.ts from os
so lms reads the same openedx-language-preference cookie with the same resolveLocale normalisation (fr-FR → fr, zh-hans → zh)
Add messages/en.json and messages/fr.json
Convert one surface end to end — the navigation shell plus course discovery,
i.e. what a learner sees first
Port scripts/validate-i18n.mjs and .github/workflows/pr-i18n.yml so every
later PR is held to key parity from the start
Document the extraction pattern in the PR so remaining routes can follow
Questions before I build it
Is i18n in lms wanted, or deliberately deferred?
Should it follow os's next-intl + cookie setup exactly, or is a different
approach preferred here?
Same locale set as os (en/fr/es/zh), or start with en/fr?
Any preference on which surface goes first?
Happy to open the PR against whatever answers those get. I've read AGENTS.md and .claude/skills/ — prettier on changed files, no --no-verify, and e2e/coverage.json kept from regressing.
Activity