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:

  1. as:Assamese 0 translations
  2. br:Breton
  3. crh:Crimean Tatar 0 translations
  4. en-gb:English, British
  5. kl:Greenlandic 0 translations
  6. lb:Luxembourgish 0 translations
  7. mfe:Mauritian Creole 0 translations
  8. mi:Maori 0 translations
  9. mt:Maltese
  10. or:Odia
  11. os:Ossetian
  12. prs:Afghanistan Persian
  13. ps:Pashto
  14. pt:Portuguese, International
  15. rhg:Rohingya
  16. rm-rumgr:Rumantsch Grischun
  17. rw:Kinyarwanda
  18. sd:Sindhi 0 translations
  19. so:Somali 0 translations
  20. ti:Tigrinya 0 translations
  21. yi:Yiddish 0 translations
  22. zh-hk:Hong Kong Cantonese 0 translations

Remaining tasks

  1. Decide if we should include languages with 0 translations. Any other criteria? Yes, only include languages with any translation progress.
  2. 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!
  3. Do it.
  4. Reviews / refinements.
  5. RTBC.
  6. 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

Command icon 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

dww created an issue. See original summary.

dww’s picture

Assigned: Unassigned » gábor hojtsy
Issue summary: View changes
Status: Active » Needs review
Issue tags: +Needs subsystem maintainer review

I 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.

dww’s picture

Issue summary: View changes

Also, 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? 😅

dww’s picture

Issue summary: View changes
Status: Needs review » Needs work

Crossing off all the languages from the list that have 0 translations.

dww’s picture

Opened 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?

dww’s picture

Issue summary: View changes

Added 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:

  • br:Breton: ?
  • mt:Maltese: Malti
  • or:Odia: ଓଡିଆ
  • os:Ossetian: ?
  • prs:Afghanistan Persian: ?
  • ps:Pashto: پښتو
  • rhg:Rohingya: ?
  • rm-rumgr:Rumantsch Grischun: ?
  • rw:Kinyarwanda: ?
dww’s picture

Assigned: gábor hojtsy » Unassigned
Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs subsystem maintainer review

Yay, 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.

dww’s picture

Confirmed 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.

quietone’s picture

Any suggestion on how we continue to keep these list synchronized?

dww’s picture

gábor hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for doing this, amazing!

quietone’s picture

I triaged this issue and everything is addressed. I have added a related issue. Now, just waiting for freeze to be over.

  • quietone committed 932ce644 on 10.1.x
    Issue #3349449 by dww, Gábor Hojtsy: Synchronize core language list with...
quietone’s picture

Status: Reviewed & tested by the community » Fixed

Finally came back around to this.

Committed 932ce64 and pushed to 10.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.