[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: About plural message translations
From:       Luiz Fernando Ranghetti <elchevive68 () gmail ! com>
Date:       2012-08-21 22:44:59
Message-ID: CADPAnrx3bzf+JerCjY9ziQPzz9AA+gF1qWVwU9qykZHvFZVfPg () mail ! gmail ! com
[Download RAW message or body]

2012/8/21 Albert Astals Cid <aacid@kde.org>:
> If your language doesn't have plural forms, you can stop reading here ;-)
>
> Hi, this is not new, but since today we just found out that some of the pt_BR
> translators don't know this "problem" I'll repeat it :-)
>
> So every .po file has a
>    Plural-Forms: some stuff
>
> For Catalan it is
>    "Plural-Forms: nplurals=2; plural=n != 1;\n"
> This means that in a plural message there will be two translations, one for
> the case where the number of things is exactly 1, and the other for the case
> where the numbers is not 1
>
>
> On the other hand, pt_BR and fr have
>         "Plural-Forms: nplurals=2; plural=(n > 1);\n"
> This means that in a plural message there will be two translations, one for
> the case where the number of things is 0 or 1, and the other for the case
> where the numbers is != 1
>
>
> Now, let's imagine this this plural message
>
> msgid "One Kipi plugin found"
> msgid_plural "%1 Kipi plugins found"
>
>
> Your first case to translate will be
> "One Kipi plugin found"
>
> BUT If you are French or Brazillian Portuguese translator you have to know
> that since this is the first case, it will be used "for the case where the
> number of things is 0 or 1".
>
> Reached this stage, the translator has always to think: is this message ever
> going to be called for n == 0?
>
> If it is, you need to use %1 there instead of the translation of "One".
>
> Sometimes it is obvious, e.g. "Delete %1 foos?" is certainly not going to
> happen for n == 0 because deleting 0 things makes no sense.
>
> For the rest of the cases you can do an educated guess or you can ask here so
> we look at the code and add proper context.
>
> Of course you can always change the plural definition of your language to be
> "We want three plurals, one for the 0 case, one for the 1 case and one for the
>> 1 case", so you can use text (instead of numbers) translations for the 0 and
> 1 case, but that will increase a lot the work so I don't think we want to go
> that route.
>
> Did i make any sense?
>
> Cheers,
>   Albert

Hi,

Yes, as it is the first time I saw this "feature" in years translating
KDE. I always though that developers write setences if n ==0 like
"nothing found".

What confuse us it the presence of the number "1" instead of "%1" in
the singular form of the template.

Thanks for explaining!

Regards,

Luiz
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic