Op Sondag 2007-12-30 skryf Daniel Burrows:
> On Fri, Dec 28, 2007 at 08:01:16PM +0100, Christian Perrier <[EMAIL
> PROTECTED]> was heard to say:
> > Quoting Daniel Burrows ([EMAIL PROTECTED]):
> > > Yes; my question is, is ngettext going to do the right thing for
> > > lists in all languages? In English, we conjugate based on the total
> > > number of items in the list (although both "there are one foo and three
> > > bars" and "there is one foo and three bars" sound awkward to me). I
> > > wouldn't bet on this convention being the same in all languages, and I
> > > figure Christian might have a better idea than me, since he's an expert
> > > on the subject of translation.
> >
> >
> > Well, if I understand ngettext correctly, it should do The Right
> > Thing, ie use a plural-form in the POT file so that languages with
> > various ways to conjugate/enumerate things can put as many variants as
> > possible.
>
> My concern is that the number we're providing might not be the correct
> one in all languages. If we want to say:
>
> there are 5 X's, 3 Y's, and 1 Z
>
> we provide the number 5+3+1=9 to ngettext(). That means that however
> many templates there are in the .po file, there's no way for a language
> that cares only about the first number in the list to provide a correct
> translation.
>
> Probably I'm thinking about this too hard and I should just apply the
> proposed patch, and wait for translators to complain that it's wrong. :-)
>
> Daniel
I'm not 100% sure I understand the context, but I would suggest
something like this:
The "things" described here are updates, right? So let's just state it
clearly, and I think it will translate better
ngettext("There is now %d update: %s",
"There are now %d updates: %s",
nthings)
Now the first part works plainly using gettext plurals, and we know that
nthings will describe the given noun, since there is only one noun. The
second parameter can then contain the detail, which I think might need
to be done with separate ngettext calls for each category anyway, but
people from other languages would need to help here.
Does this help? Do people agree that this solves the problem?
Friedel
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]