On Sun, Dec 30, 2007 at 10:07:27PM +0200, F Wolff <[EMAIL PROTECTED]> was heard
to say:
> Op Sondag 2007-12-30 skryf Daniel Burrows:
> > 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. :-)
>
> 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)
Well, the problem is that we have a list of up to three elements in
which some might not exist, I would like to keep the length of the
message to under 80 characters if at all possible, and I would also like
to make it fairly easy to scan the message to extract important
information.
Giving each element in the list a complete sentence, which I think is
what you are proposing (?), would yield messages like this:
There are now 2 updates [+2], there are now 5 broken packages [-3], and there
are now 4 new packages [-2].
which exceeds the 80-column limit and also buries the important
information inside a bunch of words that will be the same every single
time the user sees them.
At the moment the message just says (with some changes requested by
another report):
There are now 2 updates [+2], 5 broken packages [-3], 4 new packages [-2].
All the individual entries in the list are ngettext-ized, but the list
as a whole is not.
> 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.
I take it from your comments, though, that there is a problem that I
need to be aware of here? i.e., lists of things use different rules in
different languages.
Daniel
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]