From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgtranslation-translators(at)pgfoundry(dot)org, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Subject: | Re: [pgtranslation-translators] on gettext plural support |
Date: | 2009-04-12 17:40:31 |
Message-ID: | 200904122040.32164.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sunday 12 April 2009 18:06:48 Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > I don't think there is much you can do here. Either leave it out, or
> > write "CANNOT HAPPEN", or just translate normally.
>
> But Alvaro's complaint that the current coding is incorrect for English
> still stands, no? Or does ngettext choose the second string for n = 0?
In English (i.e., the default case), ngettext chooses the second/plural string
for zero. In other languages, it chooses whatever string you configure. For
example, in Spanish the recommended formula is
Plural-Forms: nplurals=2; plural=n != 1;
which is the same as in English. In French and Brazilian Portuguese, the
recommended formula is
Plural-Forms: nplurals=2; plural=n>1;
which means that zero uses the singular form. So those guys should also
translate msgstr[0] with the expectation of it being used, because n==0 can
happen, even if n==1 cannot.
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2009-04-12 17:56:15 | Re: Closing some 8.4 open items |
Previous Message | Josh Berkus | 2009-04-12 17:30:57 | Re: pg_restore dependencies |