[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] ngettext() support for plurals
From: |
Petr Kadlec |
Subject: |
Re: [Bug-gnubg] ngettext() support for plurals |
Date: |
Sun, 11 Jul 2004 12:14:51 +0200 |
Hi!
Thanks, the support for plurals is a Good Thing!
<FYI>Just a (not really entertaining) note:
"Plural-Forms: nplurals=3;
plural=(n%10==1 && n%100!=11 ? 0 :
n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
# Czech, Russian
msgid "Match to %d point"
msgid_plural "Match to %d points"
msgstr[0] "..." # n == 1, 21, 31 ...
msgstr[1] "..." # n == 2, 3, 4, 22, 23, 24 ...
msgstr[2] "..." # other
In Czech, this is the way it used to be, but nowadays, this is (although
still correct) not really used (and is usually considered slightly silly).
Today, we have practically abandoned the system in which 101, 201, ...,
1001, ... should use singular-like endings (similarly for 102, 103, 104,
202, 203, ...). We use just singular (for 1), something-like-dual (for 2,
3, 4) and plural (for everything else):
"Plural-Forms: nplurals=3;
plural=(n==1 ? 0 : n>=2 && n<=4 ? 1 : 2);"
msgid "Time penalty: %s loses %d point\n"
msgid_plural "Time penalty: %s loses %d points\n"
msgstr[0] "Èasová penalizace: %s ztrácí %d bod\n" # n == 1
msgstr[1] "Èasová penalizace: %s ztrácí %d body\n" # n == 2, 3, 4
msgstr[2] "Èasová penalizace: %s ztrácí %d bodù\n" # other (n == 0 || n >= 5)
(I have not used your example, because, accidentally, it uses genitive
case, so both plurals are identical.)
</FYI>
OK. I am going to update the translation.
I hope that gettext is able to use plain old msgid+msgstr when there are no
plurals for the entry, even if the program uses ngettext. Because
otherwise, all users would be required to update their .mo files
immediately as they update the program. And it would be also fine if
sometimes I could write one translation instead of three if there is no
difference.
Regards,
Petr
--
Machine independent code isn't.