[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature: 1 plik, 2 pliki, 5 plikov
From: |
Joosep-Georg Järvemaa |
Subject: |
Re: feature: 1 plik, 2 pliki, 5 plikov |
Date: |
Fri, 5 Apr 2002 09:27:08 +0300 (EEST) |
Quoted "Bruno Haible" (address@hidden/16:34 04.04.02):
> > # available forms
> > msgid "<index> %d files"
> > msgstr "all,all:1:1,last_digit:2:4"
> >
> > # default case
> > msgid "<all> %d files"
> > msgstr "%d plikóv"
> >
> > # exactly 1
> > msgid "<all:1:1> %d files"
> > msgstr "%d plik"
> >
> > # last digit between 1 and 5 (not inclusive)
> > msgid "<last_digit:2:4> %d files"
> > msgstr "%d pliki"
>
> What you propose is indeed a solution to the plurals problem. However,
> I believe the currently implemented solution, using msgstr[0..n], has
> the following advantages:
And also it has a big disadvantage - it is impossible to define all
numbers, starting from minus infinity and ending near plus infinity, which
end with digits 2, 3 or 4. Not talking about rules we do not know about
jet and which may exists in some exotic languages .
> - It makes it easier for the translator, because the <all:1:1>
> or <last_digit:2:4> notation can be hard to explain.
>
> - It avoids redundant duplication of the string
> "all,all:1:1,last_digit:2:4" which usually depends only on the
> language, not on the msgid.
This duplication has the function to hold available rules and thereby
simplify the implementation.
> - It makes it easier for the programmer, because all the logic
> is integrated into the ngettext function.
What about an idea to integrate also this logic into gettext? Then, all
what application programmer must do is:
printf(gettext("%d files\n"), intNumFiles);
And for backward compatibility the msgid's like "%d files" and "%d file"
may remain into .po files, in addition to id's with those special rules I
proposed.
Joosep-Georg Järvemaa,
still in love with my idea ;)
--
Your nature demands love and your happiness depends on it.
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!