Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 27 Jul 2014 16:14:18 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Non-stub gettext API functions committed, ready for
 testing

* Harald Becker <ralda@....de> [2014-07-27 12:06:01 +0200]:
> >As mentioned in the commit message, some functionality is still
> >missing. For the plurals stuff, I can't find the information on how
> >you actually get the plural rules out of the .mo file and apply them.
> >For the LANGUAGE variable, it's just a matter of adding some
> >loop-and-retry logic.
> 
> Does this text help to clarify the plurals question?
> 
> http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms

it shows that a c arithmetic expression parser is needed to handle plurals
(and the expression has to be evaluated every time dcngettext is invoked)

  Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;

  The nplurals value must be a decimal number which specifies how many
  different plural forms exist for this language. The string following
  plural is an expression which is using the C language syntax.
  Exceptions are that no negative numbers are allowed, numbers must be
  decimal, and the only variable allowed is n.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.