Use appropriate marking for KDE plural forms

Bug #74361 reported by Данило Шеган
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Won't Fix
Low
Unassigned

Bug Description

Inside kdelibs, there's a message which is replacement for regular gettext "Plural-Forms" header.

Specific message is:

"_: Dear translator, please do not translate this string in any form, but pick the _right_ value out of NoPlural/TwoForms/French... If not sure what to do mail <email address hidden> and <email address hidden>, they will tell you. Better leave that out if unsure, the programs will crash!!
Definition of PluralForm - to be set by the translator of
kdelibs.po"

(i.e. https://translations.launchpad.net/distros/ubuntu/edgy/+source/kdelibs/+pots/kdelibs/sr/1005/+translate at the moment)

The translation for that should be limited to one of:
NoPlural: 0
TwoForms: n != 1
French: n > 1
OneTwoRest (???):
Russian: n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
Polish: n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
Slovenian: n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3
Lithuanian: n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2
Czech: n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
Slovak: n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
Arabic: n == 1 ? 0 : n == 2 ? 1 : 2
Balcan:
Macedonian: (n % 10 == 1 && n % 100 != 11) ? 0 : 1
Gaeilge (???): n < 2 ? 0 : n == 2 ? 1 : 2
Maltese: n == 1 ? 0 : (n == 0 || ((n % 100) >= 2 && (n % 100) <= 10) ) ? 1 : ((n % 100) >= 11 && (n % 100) <= 19 ) ? 2 : 3

(left is the KDE value to be used as translation for above message, right is our current definition inside language table; where values are missing, I'll fill them in later)

My idea is to extend language table in Rosetta using left-hand values and use that on PO export.

Blocked by bug #46982.

Changed in rosetta:
status: Unconfirmed → Confirmed
description: updated
Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Does it mean that they only support that fixed list of plural forms?

I guess the plural form expression is compatible with what we have in gettext, right? (at least the simple ones are quite similar or equal).

Oh, I just saw the Kurdish solution. This plural form implementation is even more broken than I thought. At least, KDE is moving now to standard plural forms....

Revision history for this message
Данило Шеган (danilo) wrote :

It's not really broken, the design is same as for Rosetta: system-wide definitions of plural forms. It's just not as extensible as GNU gettext stuff is (which can sometimes hurt us as well).

And GNU gettext reasoning behind not hard-coding plural-forms definitions was that they don't know them all yet, and code changes are slow to reach the masses (the problem we don't have with Rosetta; not sure how KDE handles this, but they probably just release a new kdelibs package when needed).

Today, we're mostly familiar with all possible plural forms definitions, so we can as well hard-code them.

Revision history for this message
Erdal Ronahi (erdalronahi) wrote :

I didn't understand Carlos' remark about the "Kurdish solution". Please explain.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

"Kurdish solution" == what Kurdish team (in fact, you did it) added to kdelibs to be able to use plural forms. I was not aware of the way KDE selected the way plural forms work. The only thing I was aware of is the way the tag plural forms.

You can see what I mean at:

https://translations.launchpad.net/distros/ubuntu/edgy/+source/kdelibs/+pots/kdelibs/ku/1005/+translate

Revision history for this message
Данило Шеган (danilo) wrote :

We'll never get time to implement this.

Changed in rosetta:
importance: Undecided → Low
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.