[l10n] Couple of names are not consistent with ISO-639-1 code names
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Current behavior 😯
- kzKZ, do not match "kkKZ" since that is logical with ISO-639-1 codes "kk-KZ" (they are bilingual, so "ru-KZ" exist also)
- khKH, Cambodia, change to name: "kmKH", ISO code: "km-KH"
A tricker one is:
- srSR, Serbian (sr), you could go by srRS (Republic of Serbia, hence "RS"), but they have both the Latin and the Cyrillic alphabet and in the translation, done in the code, is in Latin. Wikipedia says that Latin is more popular in Serbia, but both are likely important. So naming could be something along the line used in e.g. https://tiagodanin.com/Locale-Codes/: "sr-Latn-RS" => srLatnRS. Or perhaps use their LSID code, srRS2074, linux/ubuntu list it as sr_RS@latin.
Then there is srME, serbian Montenegro, which also has Cyrillic and Latin. The little text that exist, likely covers also Montenegro, but that is only a guess, and I hope I don't offend anyone by my ignorance.
In these examples the names don't really match ISO-639-1 codes and for different reasons. ISO-639-1 is still used and works along with the other locale ISO standards.
Context 🔦
Code works with above name. It is more of an inconvenience. An application that uses many locales and switching to e.g. Kazak, the app developer needs to convert the locale name used in their environment (java, C#, etc) and now the only way is to "translate" the code to the name used in mui. Of course, the app developer(s) need to know the locales supported by MUI.
TL;TD
I'm whining... I'm currently working with adaption of mui v4, and mui v5's locales are up-to-date, I figured a translator function to port it back to mui v4 is logical. While I documented these I wanted to handle these locales more automatically, hence found these discrepancies, since these 3 could not be looked up using https://tiagodanin.com/Locale-Codes/, then I looked and tried to find them in the standards.
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
No file, test, or entry point is named. Start by locating the locale definitions and their lookup or validation tests, then compare kzKZ, khKH, srSR, and srME with the cited ISO and platform conventions. Confirm the desired Serbian script and region naming with maintainers before updating entries and verifying locale lookup behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- internationalization, localization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100