Re: Improving the ngettext() patch

From: pg(at)thetdh(dot)com
To: "Aidan Van Dyk" <aidan(at)highrise(dot)ca>
Cc: pg1(at)thetdh(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Improving the ngettext() patch
Date: 2009-06-05 13:07:46
Message-ID: W41287001165161244207266@webmail57
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(Grrr, declension, not declination.)

> "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;\n"

Thanks. The above (ignoring backslash-EOL) is the form recommended for Russian (inter alia(s)) in the Texinfo manual for gettext ("info gettext"). FWIW this might be an alternative:

"Plural-Forms: nplurals=3; plural=((n - 1) % 10) >= (5-1) || (((n - 1) % 100) <= (14-1) && ((n - 1) % 100) >= (11 - 1)) ? 2 : ((n - 1) % 10) == (1 - 1) ? 0 : 1;\n"

David Hudson

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-06-05 13:38:32 Re: PostgreSQL Developer meeting minutes up
Previous Message Kolb, Harald (NSN - DE/Munich) 2009-06-05 12:24:55 Re: postmaster recovery and automatic restart suppression