change preferred slovenian plural forms expression

Asked by Bernard Banko on 2007-11-20

Outside the launchpad, there are two plural form expressions in slovenian .po files:

A> [the one used in launchpad]:
nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3)
B>
nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0)

As there is going to be a convert function in the launchpad import process (bug #70470), could you make the variant B the default one?

The advantage over the actually used one is in the fact that its msgstr[x] numbers correspond to the real plural number.
Ex: for msgstr[1] "%d jabolko" we would get "1 jabolko (apple)", for msgstr[2] "%d jabolki" - 2 apples ...and so on. This is much easier to remember and far less misleading compared to the combination msgstr[1]-->2 apples. In the proposed variant B, even the msgstr[0] would make sense as its form happens to be the same as for numbers 5 and greater.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Данило Шеган
Solved:
2008-01-23
Last query:
2008-01-23
Last reply:
2008-01-08

Thanks for documenting this. This will take some time before we prepare a "correction" script to fix all existing data which doesn't match a new plural formula.

Actually, I suppose the problem is going to be now that we'll have a mixture of data in a single PO file. Should we assume that all plural forms in the same PO file are in the order of plural-forms header in that PO file? Or should we assume that Slovenian translators have used LP plural-forms order when translating through LP?

Also, if we assume that translators do their translations as specified by PO file header, then we can switch LP over to the new plural form expression right away.

Bernard Banko (beernarrd) said : #3

If we can assume anything about which plural form was used in a single PO file, I would say it is the LP form as it is the only visible for the launchpad user. However, the suggestions originating from the upstream with the different plural form and confirmed by a launchpad user could have provoked some mixture.
With the new plural form expression and a correct import script there would be a relatively small chance to get a wrong order for plurals in the translation. The conversion script could be propagated to the upstream and localization teams encouraged to stick to just one expression.

Thanks for your time Данило and keep us informed.

I've changed the plural expression for Slovenian to the suggested one. Will be migrating data either later today or tomorrow.

Bernard Banko (beernarrd) said : #5

Thanks Данило Шеган, that solved my question.