"Unsupported locale" warnings from `@edx/frontend-platform` in MFEs due to locales returned by Paragon
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 140
- Forks
- 100
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 30
Description
Bugs
Currently, Paragon supports following locales (source):
const messages = {
ar: arMessages,
ca: caMessages,
'es-419': es419Messages,
fr: frMessages,
he: heMessages,
id: idMessages,
'ko-kr': kokrMessages,
pl: plMessages,
'pt-br': ptbrMessages,
ru: ruMessages,
th: thMessages,
uk: ukMessages,
'zh-cn': zhcnMessages,
'es-ar': esarMessages,
'es-es': esesMessages,
'it-it': ititMessages,
'pt-pt': ptptMessages,
'tr-tr': trtrMessages,
};
However, when consuming the exported paragonMessages from @openedx/paragon in a React micro-frontend powered by @edx/frontend-platform, several i18n warnings are seen:
The locale messages passed from Paragon to @edx/frontend-platform in the Open edX micro-frontends ideally would only include locales that are officially supported (see list of [supportedLocales](https://github.com/openedx/frontend-platform/blob/5cf7cda8280d264785c46e75f1cbef98e0a1b9aa/src/i18n/lib.js#L38C7-L55).
Note: The several other "Unexpected locales" listed that are not related to Paragon as well, in use across many Open edX MFEs but not supported by @edx/frontend-platform. For example, @edx/frontend-component-footer seems to the culprit, exporting locales not officially supported by `@edx/frontend-platform.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/i18n/index.js and compare the exported Paragon locales with frontend-platform's supportedLocales list. Reproduce the warnings in a React micro-frontend consuming paragonMessages, then confirm the export contains only locales officially supported by frontend-platform.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- internationalization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100