[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gettext] Translations under a language's main dialect are not found
Re: [gettext] Translations under a language's main dialect are not found if LANGUAGE contains only the language code
Wed, 09 Mar 2011 23:59:33 +0100
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:184.108.40.206) Gecko/20110223 Thunderbird/3.1.8
Thanks for your reply, Bruno!
On 2011-03-09 22:00, Bruno Haible wrote:
> Gunnar Hjalmarsson wrote:
>> [ resending this with the gettext address instead of
>> address@hidden Don't know if it matters, considering that the
>> lists are archived together. ]
> Sure it matters. bug-gnu-gettext, bug-sed, bug-gawk, bug-diff have different
> subscribers, but the archive is shared.
To me it looks like the mailman list is shared as well, and that other
addresses but address@hidden are aliases. If it's possible to
subscribe to bug-gnu-gettext only, I'd appreciate a pointer to some
resource that explains how.
>> gettext does not behave in accordance with this para in section 2.3.3
>> of the gettext docs:
>> "In the `LANGUAGE' environment variable, but not in the other
>> environment variables, `LL_CC' combinations can be abbreviated as `LL'
>> to denote the language's main dialect. For example, `de' is equivalent
>> to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
>> (Portuguese as spoken in Portugal) in this context."
>> This is how I reached that conclusion:
>> $ cat mytest.po
>> msgid "myTestWord\n"
>> msgstr "meinTestWort\n"
>> $ sudo msgfmt mytest.po -o /usr/share/locale/de_DE/LC_MESSAGES/mytest.mo
> Yes, of course if you create a translation that you declare as being valid
> only for "German as spoken in Germany" then a user that merely asks for
> a "German" translation will not see yours.
I believed, and think I had good reasons to believe, otherwise. The
quoted docs para leads you to conclude that gettext has an idea on what
the "main dialect" of various languages is, and that it uses that info
for mapping 'LL' -> 'LL_CC'. I really think that the para ought to be
either removed or changed to something like:
"In the `LANGUAGE' environment variable, but not in the other
environment variables, you are free to use just `LL' instead of `LL_CC'
combinations, if you don't need to specify the country. This is true
whether a matching locale name without country code is available or not."
> The documentation section is for end-users. This is not a reference manual,
The output from "man gettext" says that "info gettext" gives you The
Full Documentation of or The Complete Manual for gettext.
> therefore slight simplifications and reasonable real-life assumptions are
> appropriate here.
Do you really think that the directly incorrect statement at hand is a
justifiable simplification? I don't.