[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: Regarding: moving towards KDE4 translations
From: Chusslove Illich <caslav.ilic () gmx ! net>
Date: 2007-02-19 17:13:29
Message-ID: 200702191813.31407.caslav.ilic () gmx ! net
[Download RAW message or body]
> [: Renato Pavicic :]
> Oh my, I hope that he will not do that! Not only that all of the work
> will be wasted, but I'll have huge problems with declinations (as you
> may know that very well).
The idea is indeed, in a sense, to "waste" that work, in favor of something
approximately like this:
msgid "The capital of %1 is..."
msgstr "Glavni grad $[case-genitive %1] je..."
(I left out elements unnecessary for this examle)
and have translators provide a file on a side, like this:
# english nominative genitive ...
Germany Nemačka Nemačke ...
France Francuska Francuske ...
Italy Italija Italije ...
...
so that we no longer need that huge pile of messages as it is in KDE3.
Now, given that many people have already translated all this stuff, it is
not hard to make a script which will run through existing KDE3
translation, collect the forms, and put them in a format like above. So
that in the end there be no waste at all.
> [...] The plural definition string, what's the proper name for it?
> You know: Plural-Forms: [...]
> Will that string be changed somehow?
(Plural header is the name) As far as I've seen, for the conversion Stephan
has taken these headers from somewhere (Gettext manual?), and they are
being put in every PO file. That's because KDE3 doesn't care whether
plural header is present or not, so probably there are PO's which don't
have it, or don't have it correct.
So, the Croatian/Russian/Serbian/... header is indeed at the moment as you
put it, but...
> Could you be so kind to send me a sample of plural-form definition?
...I plan to have it something like this, with 4 forms:
nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 :
n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
The difference is only in starting "plural=n==1 ? 3", which uses msgstr[3]
in case of n==1. Thus, we can have the following translation:
msgid "Do you want to delete this image?"
msgid_plural "Do you want to delete these %1 images?"
msgstr[0] "Želite li da obrišete ovu %1 sliku?"
msgstr[1] "Želite li da obrišete ove %1 slike?"
msgstr[2] "Želite li da obrišete ovih %1 slika?"
msgstr[3] "Želite li da obrišete ovu sliku?"
The 0 and 3 are different only in that 3 doesn't have a number, same as
English singular, and as it should be.
I suppose that aside from Croatian, Bosnian and Serbian, this would be more
appropriate in other Slavic languages too.
(I ripped this particular plural header from one of the Gnome PO's, but I
wonder why did they put the n==1 case as 3, instead of 0, as it would have
been more natural to me -- I'll have to inquire with them about that.)
--
Chusslove Illich (Часлав Илић)
Serbian KDE translation team
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic