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

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

Re: Problem in documentation: number of plurals


From: Gabor Kelemen
Subject: Re: Problem in documentation: number of plurals
Date: Mon, 14 Aug 2006 17:30:43 +0200
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

Hi

I second that all. Furthermore, the gettext-tools/src/plural-table.c file, which also contains this information, needs to be patched (see attachment), so that msginit will return correct information.

The problem is serious, because some translators, like me, used Kbabel for translation, which used msginit to guess the correct plural forms. Thus, there are lots of Hungarian translations around with incorrect plurals information, as Kbabel allowed to use two plurals in translation, while putting nplurals=1; plural=0 in the header (seems to be another bug). This worked fine until gettext 0.15, as gettext didn't cared with differences between the nplurals information in header and the number of actually used plurals. With Gettext 0.15, this behavior changed and some translations [1] already broke the build process of the respective package.

KDE translations are another kind of problem, they use the format described below to handle plurals, and they are using msginit (or at least the same information msginit uses, i'm not familiar with KDE) real-time to determine the number of plurals to search for in the translation files. Consequently, they find mismatch between the numbers of expected and found plurals, and display an ugly error message instead of the string. In this case, my patched version of Gettext solved this problem instantly.

So i'd like to ask you to apply the attached patch and roll out a new release, in order to make sure Kbabel users will not create more build process breaker translations, and also to make KDE-style translations work correctly.


Regards

Gabor Kelemen

[1]: http://sourceforge.net/mailarchive/forum.php?thread_id=29984621&forum_id=8113

Arpad Biro írta:
Hi,

Section "10.2.5 Additional functions for plural forms" of the
gettext documentation ( http://www.gnu.org/software/gettext/manual )
claims:

  Only one form:

    Some languages only require one single form. There is no
    distinction between the singular and plural form. An appropriate
    header entry would look like this:

      Plural-Forms: nplurals=1; plural=0;

    Languages with this property include:

    Finno-Ugric family
        Hungarian


There's a problem with this: it's NOT true when there's no
numeral involved.

A quick example:

"1   apple "   is   "1   alma"   in Hungarian, and
"123 apples"   is   "123 alma"

So far so good, but when there's no numeral:

"the apple "   is   "az alma "   in Hungarian, but
"the apples"   is   "az almák"

In the latter case we have 2 plural forms.


An example from the Gwenview POT file:
(
http://websvn.kde.org/trunk/l10n/templates/messages/extragear-graphics/gwenview.pot
)

#: gvcore/deletedialog.cpp:97
msgid ""
"_n: <qt>This item will be moved to the trash bin.</qt>\n"
"<qt>These items will be moved to the trash bin.</qt>"


This has to be translated into 2 different forms in Hungarian
(just like it is in English).





Arpad Biro


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

_______________________________________________
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-gnu-utils






--- /home/gabor/gettext-orig/gettext-tools/src/plural-table.c 
+++ /home/gabor/gettext-0.15/gettext-tools/src/plural-table.c 
@@ -26,7 +26,6 @@
 /* Formulas taken from the documentation, node "Plural forms".  */
 struct plural_table_entry plural_table[] =
   {
-    { "hu", "Hungarian",         "nplurals=1; plural=0;" },
     { "ja", "Japanese",          "nplurals=1; plural=0;" },
     { "ko", "Korean",            "nplurals=1; plural=0;" },
     { "vi", "Vietnamese",        "nplurals=1; plural=0;" },
@@ -36,6 +35,7 @@
     { "en", "English",           "nplurals=2; plural=(n != 1);" },
     { "fo", "Faroese",           "nplurals=2; plural=(n != 1);" },
     { "de", "German",            "nplurals=2; plural=(n != 1);" },
+    { "hu", "Hungarian",         "nplurals=2; plural=(n != 1);" },
     { "nb", "Norwegian Bokmal",  "nplurals=2; plural=(n != 1);" },
     { "no", "Norwegian",         "nplurals=2; plural=(n != 1);" },
     { "nn", "Norwegian Nynorsk", "nplurals=2; plural=(n != 1);" },

reply via email to

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