Comment 3 for bug 1797860

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I think we need to distinguish between what's installed and what the language-options script outputs.

Installing a language means that a set of language pack packages are installed. (Let's disregard the language support packages for now.)

So when installing French, the French langpacks are installed with the fr translations. It's the same langpacks whether you install from France, Canada, or somewhere else. There is only one French language option in the installer as well as in language-selector, so you don't really install fr_FR - you install French.

All the French locales are generated as well:

$ locale -a | grep ^fr
fr_BE.utf8
fr_CA.utf8
fr_CH.utf8
fr_FR.utf8
fr_LU.utf8

The reason why the language-options script does not only list fr is that there exist fr_CA translations in the /usr/share/locale folder. So in order to make those dialect translations selectable for those users who prefer them, the language-options script outputs both fr_CA and fr_FR. (It's still fewer options compared to listing all the five locales.)

Most language packs contain only one language dialect. There are a few exceptions:

English
Portuguese
Catalan
(maybe some more which I don't recall right now)

For instance, if you install Portuguese (as spoken in Portugal) or Brazilian Portuguese, you get both, since they are both shipped with the language-pack-pt-base etc. packages. This way to organize the language packs isn't a natural law, of course. I don't know if there is a rationale behind it. One thing I can think of is that if you want Portuguese, it's not unlikely that you want to use Brazilian Portuguese as fallback language, and this makes a natural fallback language handy available. It's also worth mentioning that installing the langpacks for a language (ll) triggers the generation of all available ll_* UTF-8 locales.

Same with the English dialects, as you already pointed out.

Given this way to organize the language packs, you could argue that French (Canada) should be included in the French language packs. I'm not sure why it's not, but it may be because too few strings are translated into French (Canada) - a threshold is applied.

Now over to your items in comment #2:

1.
It sounds like you'd like to split the English language packs into dialect specific langpacks. Might make sense; I have no firm opinion yet. One thing which must be cleared in that case is how to deal with locale generation - installing the English language packs triggers the creation of all the en_* UTF-8 locales.

Subscribed Łukasz, since he is currently responsible for the langpack handling.

1.5.
I can't reproduce that fr item. In Cosmic I get:

$ /usr/share/language-tools/language-options | grep ^fr
fr_CA
fr_FR

which is the intended output (see above).

2.
I think we can consider en and en_US to be equivalent in practice.

I can't tell why the English langpacks (and locales) are always kept, when the user picks a non-English language in the installer. Probably it's not necessary, and it sounds like it would make sense to make that change in the installer.

3.
Yes, indeed (assuming you are talking about check-language-support when used by language-selector). I mentioned my idea on how to deal with it in comment #1. But that idea would be somewhat obsoleted if we decide to split the English langpacks.