Re: Do "enabled", "disabled", and "not found" need to be qualified per instance?



Op maandag 17-05-2010 om 09:41 uur [tijdzone +0200], schreef Andre
Klapper:
> Am Montag, den 17.05.2010, 00:33 +0200 schrieb Wouter Bolsterlee:
> > Short note about number/plurals: as far as I know, proper use of ngettext()
> > and friends correctly handle this case for all languages. This pattern works
> > really well for many language and is used in various Gnome modules:
> > 
> >   if (n == 1)
> >       message = _("There is only a single bar in the foo."));
> >   else
> >       message = sprintf(ngettext(
> >           "There is %d bar in the foo.",
> >           "There are %d bars in the foo.",
> >           n), n);
> I am not sure about this example.
> See http://live.gnome.org/TranslationProject/DevGuidelines/Plurals

Actually, my example does agree with the guidelines on the wiki page you
mentioned, but it adds an extra n==1 case.

In all cases the correct plural form is used by using ngettext(), but
many applications handle the n==1 case differently, because it often
looks friendlier to avoid a number at all and use a slightly other
sentence. For example, compare "there is 1 bug in the code!" and "there
is only a single bug in the code!".

Note that n==1 is not the same as singular form, although in English and
many western European languages it is equivalent.

    — Wouter

Attachment: signature.asc
Description: Dit berichtdeel is digitaal ondertekend



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]