[Interest] Translating plural with is/are
Thiago Macieira
thiago.macieira at intel.com
Mon Mar 7 18:59:23 CET 2016
Em segunda-feira, 7 de março de 2016, às 18:44:17 PST, Jason H escreveu:
> > Sent: Monday, March 07, 2016 at 12:38 PM
> > From: "Thiago Macieira" <thiago.macieira at intel.com>
> > To: interest at qt-project.org
> > Subject: Re: [Interest] Translating plural with is/are
> >
> > Em segunda-feira, 7 de março de 2016, às 18:23:20 PST, Jason H escreveu:
> > > While Qt handles certain phrases like:
> > > "Use %n upper case character(s)"
> > >
> > > adequately, if phrased slightly differently:
> > >
> > > "At least %n upper case character(s) is required"
> > > breaks because the translation is:
> > > 1. "At least 1 upper case character is required"
> > > 2a. "At least 2 upper case characters is required" <- grammatical error.
> > > Should be: 2b. "At least 2 upper case characters are required"
> > Supply a translation file for en_US.
>
> I'm not sure I follow. I don't see anything that allows me to tell it to
> select one for singular or the other? I think I'm missing something? I'd
> like to have a redundant pluralisation check, which might not match the
> language's pluralization rules.
If you provide a translation file, the message with %n will be translated
according to the language's plural rules. For English, you'll have two
translations for the same source message.
"At least one upper case character is required"
"At least %n upper case characters are required"
QTranslator takes care to apply the correct selection based on the number that
you passed.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list