Problem/Motivation
While working on #3336763: Add Hawaiian as a choice in core language selectors I discovered that the the core language selector from LanguageManager::getStandardLanguageList() (core/lib/Drupal/Core/Language/LanguageManager.php) is out of sync with the available languages on localize.drupal.org. In Slack I had asked Gabor about it and he said:
@dww I think it would be great to add the languages from your diff to Drupal core too. I don’t remember what was the original criteria but I am sure lolspeak or Simple English does not meet any reasonable level of completeness, while the exposure of the rest of the teams would be good to Drupal users.
The diff between core and l.d.o can be found at https://www.drupal.org/files/issues/2023-02-28/3336763-7.ldo-vs-D10-lang...
Steps to reproduce
Proposed resolution
Add the languages that have translation teams on localize.drupal.org to the core language selector:
as:Assamese0 translations- br:Breton
crh:Crimean Tatar0 translations- en-gb:English, British
kl:Greenlandic0 translationslb:Luxembourgish0 translationsmfe:Mauritian Creole0 translationsmi:Maori0 translations- mt:Maltese
- or:Odia
- os:Ossetian
- prs:Afghanistan Persian
- ps:Pashto
- pt:Portuguese, International
- rhg:Rohingya
- rm-rumgr:Rumantsch Grischun
- rw:Kinyarwanda
sd:Sindhi0 translationsso:Somali0 translationsti:Tigrinya0 translationsyi:Yiddish0 translationszh-hk:Hong Kong Cantonese0 translations
Remaining tasks
Decide if we should include languages with 0 translations. Any other criteria?Yes, only include languages with any translation progress.Figure out how to get the "native spelling" for the languages we wish to add.https://localize.drupal.org/sites/default/files/l10n_packager/l10n_serve... is the magic list we need!Do it.- Reviews / refinements.
- RTBC.
- Commit.
User interface changes
More languages in core language selector drop-downs.
API changes
None.
Data model changes
None.
Release notes snippet
TBD
Issue fork drupal-3349449
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dwwI started on this, but the first entry, https://localize.drupal.org/translate/languages/as, has 0 contributors and 0 translations. 😢
Probably we should only do this for l.d.o groups that have any progress at all, right?
Assigning to @Gábor for confirmation before we proceed.
Comment #3
dwwAlso, not sure how to find the "native spelling" for these languages. E.g. starting from https://localize.drupal.org/translate/languages/br how am I supposed to know how "Brenton" is spelled in Brenton? 😅
Comment #4
dwwCrossing off all the languages from the list that have 0 translations.
Comment #6
dwwOpened an MR to add the languages with any translation progress. I knew how to do the "native" spelling for "English, British" and "Português, Internacional", but otherwise, I have no idea how to proceed here to get localized spellings for the others. I left them as @todo in the code. Help?
Comment #7
dwwAdded the list of "native spellings" we need to the summary, and fleshed out a couple from Google Translate. That's as far as I can take this without help from either someone who knows the inner guts of l.d.o better than I, or speaks any of these languages:
Comment #8
dwwYay, via Slack, @Gábor Hojtsy sent me https://localize.drupal.org/sites/default/files/l10n_packager/l10n_serve... which is exactly what we needed to proceed here. 🎉 Pushed new commits to remove all the
@todo. Cleaned up summary remaining tasks. No longer needs Gabor review for technicalities, so removing that tag and un-assigning.Note: I also realized that Pashto and Afghanistan Persian are RTL. I don't believe any of the others are, but that'd be nice to confirm. Sadly, that info is not in l10n_server.xml.
Comment #9
dwwConfirmed l.d.o and Google Translate agree on native spelling for Pashto ("پښتو").
Meanwhile, noticed that in #7 I had a native spelling for Odia ("ଓଡିଆ"), which isn't in the list from l.d.o. Seems better to include it, so I pushed a commit for that, too.
Comment #10
quietone commentedAny suggestion on how we continue to keep these list synchronized?
Comment #11
dww#568986: Dynamically update standard language list from localization server
Comment #12
gábor hojtsyThanks for doing this, amazing!
Comment #13
quietone commentedI triaged this issue and everything is addressed. I have added a related issue. Now, just waiting for freeze to be over.
Comment #15
quietone commentedFinally came back around to this.
Committed 932ce64 and pushed to 10.1.x. Thanks!