[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parenthesis necessary for Plural-Forms
From: |
Bruno Haible |
Subject: |
Re: parenthesis necessary for Plural-Forms |
Date: |
Wed, 13 Aug 2008 03:20:15 +0200 |
User-agent: |
KMail/1.5.4 |
Hi,
Viktor Horvath wrote:
> I'm using gettext 0.17 to internationalise a Perl project. I found
> that plural forms would only work when I set the plurals= expression
> into parentheses. Specifically,
>
> "Plural-Forms: nplurals=3; plural=n==0 ? 0 : (n==1 ? 1 : 2);n"
>
> would not work as expected, but
>
> "Plural-Forms: nplurals=3; plural=(n==0 ? 0 : (n==1 ? 1 : 2));n"
>
> did the job.
You certainly mean '\n' at the end of the string, not plain 'n'.
Other than that, this need for parentheses would be a bug. gettext for C
certainly does not require the outer parentheses. Maybe the pure-perl
implementation in libintl-perl-1.16/lib/Locale/gettext_pp.pm requires them?
Maybe Guido Flohr can say something about it?
Bruno