Closed Bug 1481729 Opened 6 years ago Closed 6 years ago

Bootstrap list of native language names

Categories

(Mozilla Localizations :: Other, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: flod, Assigned: flod)

References

Details

Currently, in Firefox, we use language names localized in the language of the build, i.e. "French
" if the build is in English, instead of the native language.

We want to change that, using a curated list of language names in JSON format:
- Use the native name
- Ignore the region code whenever possible, for example "Deutsch", but "Español (ES)" for es-ES.

There are some potential challenges, like capitalization, or understand if we need more than one form for languages with grammar cases. Currently, we use the language name in:
- Language switcher in preferences (https://bug1469684.bmoattachments.org/attachment.cgi?id=8994275)
- Dialog to customize accept-languages (preferences for language used by web content)
- Spell checking in context menu

A first version of the curated list is available here
https://github.com/mozilla-l10n/firefox-languages/blob/master/output/languages_curated.json

In HTML version
https://mozilla-l10n.github.io/firefox-languages/

The repository includes a set of script used to analyze data from Mozilla and CLDR.

CLDR has a language name for most of the languages we support
https://github.com/unicode-cldr/cldr-localenames-full/

And rules to transform these names for "UI list or menu", which is exactly our case, e.g. for French
https://github.com/unicode-cldr/cldr-misc-full/blob/master/main/fr/contextTransforms.json

Results: https://mozilla-l10n.github.io/firefox-languages/complete.html
> There are some potential challenges, like capitalization

I see in CLDR there's no context transform information available for Basque, so the language name is kept as-is in the resulting complete list linked above. However, if the name appears at the beginning of a sentence (also in UI items like dropdowns), the name must be capitalized.
(In reply to Julen Ruiz Aizpuru from comment #1)
> > There are some potential challenges, like capitalization
> 
> I see in CLDR there's no context transform information available for Basque,
> so the language name is kept as-is in the resulting complete list linked
> above. However, if the name appears at the beginning of a sentence (also in
> UI items like dropdowns), the name must be capitalized.

Thanks, updating. Indeed, looks like Basque is not complete on CLDR
https://github.com/unicode-cldr/cldr-misc-full/tree/master/main/eu
Same should apply to Lithuanian (lt), it should use titlecase-firstword transformation.
(In reply to Paulius Andriekus from comment #3)
> Same should apply to Lithuanian (lt), it should use titlecase-firstword
> transformation.

Updated. I'm starting to wonder if we should assume missing=capitalize :-\
Summary: Bootstrap list of localized language names → Bootstrap list of native language names
Sorry to create another exception from CLDR again, but we use 正體中文 project-wise for Traditional Chinese...

https://transvision.mozfr.org/?recherche=Traditional+Chinese&repo=gecko_strings&sourcelocale=en-US&locale=zh-TW&search_type=strings
(In reply to Peter Pin-Guang Chen [:petercpg] (MozTW.org) from comment #5)
> Sorry to create another exception from CLDR again, but we use 正體中文
> project-wise for Traditional Chinese...
> 
> https://transvision.mozfr.org/
> ?recherche=Traditional+Chinese&repo=gecko_strings&sourcelocale=en-
> US&locale=zh-TW&search_type=strings

That's OK. Updated the list.
Considering this fixed at this point.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.