bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gettext] Translations under a language's main dialect are not found if


From: Gunnar Hjalmarsson
Subject: [gettext] Translations under a language's main dialect are not found if LANGUAGE contains only the language code
Date: Wed, 09 Mar 2011 13:48:34 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

[ resending this with the gettext address instead of
address@hidden Don't know if it matters, considering that the
lists are archived together. ]

[ a similar bug has been reported at https://launchpad.net/bugs/700213 ]

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
$ LANGUAGE=de_DE
$ gettext -d mytest myTestWord$'\n'
meinTestWort
$ LANGUAGE=de
$ gettext -d mytest myTestWord$'\n'
myTestWord
$

I would have expected the German translation also when LANGUAGE was set
to just 'de'.

Ubuntu release: Maverick 10.10
gettext version: 0.18.1.1-1ubuntu2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]