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

List:       kde-i18n-doc
Subject:    Re: Different formulas for plurals in Qt and KDE
From:       Alexander Potashev <aspotashev () gmail ! com>
Date:       2014-05-15 6:09:05
Message-ID: CADMG6+8UHZr6cV0B47KS=eQuQv=t-+e1GgCKBfscMfkcACDdjg () mail ! gmail ! com
[Download RAW message or body]

2014-04-11 1:49 GMT+04:00 Chusslove Illich <caslav.ilic@gmx.net>:
> For branch POs the issue is academic though, as Albert says, since there is
> no reason for there to be a PO file containing both types of messages (a
> framework uses either Ki18n or Qt, never both). Well, except for Scripty
> forcing the plural form header on all POs (I'd simply kill that).

Hi Chusslove,

Thanks for all the useful info! As I have understood we have two options:
 1. Have KI18n-style plurals in all translation files under l10n-kf5
and convert plurals just before running lconvert for *_qt.po files.
This will required changes to
extra-cmake-modules/modules/ECMCreateQmFromPoFiles.cmake.
    Pro: translators are not confused with two different plural formulas.
    Cons: msgstr[3] in *_qt.po need translations which will be
truncated at lconvert stage and never be used.
 2. Have Qt-style plurals in *_qt.po and KI18n-style plurals in other
.po files. This can be done as easy as changing plural headers of
_qt.po files in SVN.
    Pro: translators see in .po files what exactly will be in the
resulting binary files (.qm and .mo).
    Cons: it takes some brainpower from translators to remember what
each msgstr[i] stands for in two plural formulas.

I suggest we use the second option - to have different plural headers
in different files. The reason I think of as most impotant is full
translator's control of what will be in the resulting .qm and .mo
files.

== Forcing plural headers in Scripty ==

Now will talk about Scripty forcing plural form header on all POs. It
does not do that currently since scripts/check_po_files can force
plural header only when a kdelibs4.po exists, and it does not exist
anymore in l10n-kf5.

But still I would like to have plural header adjustment done by
Scripty. Many translators don't pay attention to plural headers and
therefore don't change it before committing files to SVN or forget to
do that (including me) or just rely on Scripty.

I'm going to modify l10n-kf5/scripts/check_po_files (will make a
patch) in a way that it grabs the plural header
 1. from kcoreaddons5_qt.po for all *_qt.po files,
 2. from ki18n5.po for all other .po files.

Does this plan sound good?

-- 
Alexander Potashev
[prev in list] [next in list] [prev in thread] [next in thread] 

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