Comment 7 for bug 693337

Revision history for this message
Arne Goetje (arnegoetje) wrote : Re: [Bug 693337] Re: Menus for choosing language should have one option per available translation

On 01/06/2011 07:55 PM, Martin Pitt wrote:
>> * Would this be a suitable approach for determining available
> languages for message translation?
>
> My first reaction to that was "but what if I actually want the Swiss
> German variant?". While it's unusual, we can in theory have e. g.
> Swiss or Austrian specific German translations. But on second
> thought, this solves it:

It wouldn't be unusual if the German translation team didn't decide to
unify those variants into Standard German. Swiss German has a different
grammar usage than in Germany, at least.
(Gnucash for example has de_CH translations, but that's in universe.)

>> * Is listing the /usr/share/locale-langpack directory a safe way
>> to
> find available translations, or is there more into it?
>
> This is actually a very nice idea. As long as we don't actually have
> actual country specific variants of a language (like de), it
> wouldn't show them at all, but it would retain the country specific
> variants that we really need (such as en_GB or pt_BR).
>
> The only problem here is that /usr/share/locale-langpack/ is an
> Ubuntuism and not compatible with any other distribution or
> upstream, but that boat already left a while ago anyway :-) So this
> isn't a blocker.

What about /usr/share/locale/ ? That's at least where universe software
puts its translations. And there you may even find de_DE and en_US
folders... Therefor always put ll_CC codes first in the LANGUAGE
variable string, followed by the country-less fallback, i.e. de_DE:de !
There is code for this in l-s.

>> * As regards languages with more than one translation: When the
>> country is not specified, does it matter which of the locales that
>> is assigned to the LC_MESSAGES environment variable?
> No, it doesn't
> for messages. It is relevant for $LANG and other LC_* categories, of
> course.

Why not? Falling back to en_GB for "English", while the rest of the LC_*
and LANG is en_US, should surely be avoided.

> I guess for the actual implementation in l-s and gdm we don't need
> to parse /usr/share/xml/iso-codes/, as these already have the
> translated names of the locales?

hmm? l-s parses /usr/share/xml/iso-codes/ for exactly that reason.

> Thanks for working on this!

+1

Cheers
Arne
--
Arne Götje (高盛華) <email address hidden>
PGP/GnuPG key: 1024D/685D1E8C
Fingerprint: 2056 F6B7 DEA8 B478 311F 1C34 6E9F D06E 685D 1E8C
Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.