[Top][All Lists]
[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: |
Sat, 08 Jan 2011 08:08:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
[ 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gettext] Translations under a language's main dialect are not found if LANGUAGE contains only the language code,
Gunnar Hjalmarsson <=