[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Plurals in translations was Re: [STRAW POLL] Help on i18n translations?

From: Nicolás Lichtmaier <nick_at_reloco.com.ar>
Date: 2004-04-02 22:55:05 CEST

>>>In French, this would be incorrect as the condition is >= 1
>>>(i.e. 0 -> singular). There was a problem like that in another
>>>project (ROX) and the source (and English messages) had to be
>>>changed so that it could be translatable into French.
>>Gettext handles that. You define a rule which defines which of a set
>>of translations is used based on the number passed to ngettext.
>Yup. But we'll still have to modify the code in several places, if we
>actually are checking n!=1.

Yes, but this it's done at the same time the code is converted to
gettext. That conversion needs changing the code anyway:

printf("%d files%s updated", n, (n==1)?"":"s");


printf(ngettext("%d file updated", "%d files updated", n), n);

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 2 22:58:44 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.