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

List:       kde-i18n-doc
Subject:    gettext 0.10.36 and plural
From:       Stephan Kulow <coolo () kde ! org>
Date:       2001-04-01 21:03:10
[Download RAW message or body]

Hi!

The only new feature in the new gettext for interest to us (taking
you're
not using PO-mode in emacs, which got massiv additions) is the handling
of
plural forms. 
Unfortunatly this is done in an incompatible way and I don't like the
way
it works. I'm open for discussions though. I would solve it similiar but
still differently. I don't like the incompatiblity in it.

It's basicly comes down to (for pl):

msgid ""
msgstr "Plural-Forms: nplurals=3; n==1 ? 0 : n%10>=2 && n%10<=4 &&
(n%100<10 || n%100>=20) ? 1 : 2"

msgid "a piece of cake"
msgid_plural "%d pieces of cake"
msgstr[0] "polish for one"
msgstr[1] "polish for %d two,three,four, twenty two..."
msgstr[2] "polish for %d the rest of the numbers like five"

I find this solution quite translater-unfriendly. The plural forms
should go into a description
file and should only be an enum of predefined cases (there are limited
ways to handle plurals,
even if we don't know all from the start) and not be part of every PO
file. 

And I don't like that they extended the format this massivly. It makes
it _very_ hard to handle
it in tools like kbabel. I would rather go with
msgid "_n: a piece of cake\n"
   "%d pieces of cake"
msgstr "polish for one\n"
   "polish for %d two...\n"
   "polish for %d the rest"

The meaning of the lines is preselected and this of course assumes that
plural forms do not contain
line feeds, but I think that this is not a wrong assumption. 

What do you think? 

Greetings, Stephan

-- 
People in cars cause accidents. Accidents in cars cause people.

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

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