KDE seems to ignore "Plural-Forms: ..." in .mo files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adept (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: adept-notifier
Appears in: Kubuntu Hardy (The problem exists still ~Edgy!)
Howto reproduce: You will need language-
Run: killall adept_notifier; export LANG=hu_HU.UTF8; adept_notifier;
If there are updates available then Adept Notifier will display "BROKEN TRANSLATION There are %n updated packages available" and on Konsole will output: adept_notifier: ERROR: translation of "There is %n updated package available" doesn't contain 1 different plural forms as expected
Translation is OK, really, I checked it. However it seems that KDE expects Hungarian .mo files to have "Plural-Forms: nplurals=1; plural=0;\n" and a translation with "Plural-Forms: nplurals=2; plural=n != 1;\n" will break it.
However in Rosetta for Hungarian translations the latter is used.
From http://
"Two forms, singular used for one only
...
Plural-Forms: nplurals=2; plural=n != 1;
...
Finno-Ugric family
Hungarian
Hungarian does not appear to have a plural if you look at sentences involving cardinal numbers. For example, “1 apple” is “1 alma”, and “123 apples” is “123 alma”. But when the number is not explicit, the distinction between singular and plural exists: “the apple” is “az alma”, and “the apples” is “az almák”. Since ngettext has to support both types of sentences, it is classified here, under “two forms”."
As you can see, that in some cases two plural forms required so changing some translation in Rosetta will not solve the whole problem. And changing the default for Hungarian in KDE may break other translations.
In /usr/share/
msgid ""
"_n: There is %n updated package available\n"
"There are %n updated packages available"
msgstr ""
"1 frissített csomag érhető el\n"
"%n frissített csomag érhető el"
Replacing this with:
msgid ""
"_n: There is %n updated package available\n"
"There are %n updated packages available"
msgstr ""
"%n frissített csomag érhető el"
Everything will be fine regardless the line: "Plural-Forms: nplurals=2; plural=n != 1;"
It seems that KDE bypasses this line and uses its defaults for a given language.
In Hardy this problem appears even in Konqueror ("BROKEN TRANSLATION %n images of XY loaded") so it is very annoying.
KDE should recognize that "Plural-Forms: nplurals=2; plural=n != 1;" line in .mo files.