openedx / wg-translations

Repository for Translation Working Group docs and issues.
0 stars 0 forks source link

Have a clear consistent language code #22

Open ghassanmas opened 1 year ago

ghassanmas commented 1 year ago

Langague codes are used in multiple places, starting with transfiex typically lang locale is sepreated by _ but in code - is used.

One main of the inconsistente is that how TX have langauge code vs how MFEs refer to them.

If opreator would want to override a langauge strings, they would need to know how they set/referred to in MFEs, but that might not the same code in TX.

https://github.com/openedx/frontend-app-account/blob/5ce3995f5b59a81ace25844ed9646f969b4a4874/src/i18n/index.js#L21-L38

const appMessages = {
  ar: arMessages,
  'es-419': es419Messages,
  'fa-ir': faIRMessages,
  fr: frMessages,
  'zh-cn': zhcnMessages,
  pt: ptMessages,
  it: itMessages,
  de: deMessages,
  hi: hiMessages,
  'fr-ca': frCAMessages,
  ru: ruMessages,
  uk: ukMessages,
  'de-de': dedeCAMessages,
  'it-it': ititCAMessages,
  'pt-pt': ptptCAMessages,
};

In the above code - is used to override lang per locale, but in TX we have _ as shown in screenshot below, also in the latter UPPERCASE is used:

Image

The outcome of this issue is: