Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unsupported locale" warnings from @edx/frontend-platform in MFEs due to locales returned by Paragon #3011

Open
adamstankiewicz opened this issue Feb 23, 2024 · 0 comments
Labels
bug Report of or fix for something that isn't working as intended i18n Internationalization

Comments

@adamstankiewicz
Copy link
Member

adamstankiewicz commented Feb 23, 2024

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:

image

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.

@adamstankiewicz adamstankiewicz added bug Report of or fix for something that isn't working as intended i18n Internationalization labels Feb 23, 2024
@adamstankiewicz adamstankiewicz changed the title "Unsupported locales" warnings in @edx/frontend-platform due to locales returned by Paragon "Unsupported locale" warnings in @edx/frontend-platform due to locales returned by Paragon Feb 23, 2024
@adamstankiewicz adamstankiewicz changed the title "Unsupported locale" warnings in @edx/frontend-platform due to locales returned by Paragon "Unsupported locale" warnings from @edx/frontend-platform in MFEs due to locales returned by Paragon Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended i18n Internationalization
Projects
Status: Backlog
Development

No branches or pull requests

1 participant