mixed plural form handling

Frederik Schwarzer schwarzer at kde.org
Sat Apr 22 16:50:06 BST 2023

On Saturday, April 22, 2023 4:00:45 PM CEST Luigi Toscano wrote:
> Frederik Schwarzer ha scritto:


> > today I was nudged from this:
> >     https://invent.kde.org/sysadmin/l10n-scripty/-/issues/6#note_665802
> >     "Script kiddy generates endless daily commits that add and remove brackets"
> > 
> > What happens there is that the PO files sometimes have parens around the plural condition and sometimes they do not, resulting in commits like this (back and forth):
> >    -  "Plural-Forms: nplurals=2; plural=n != 1;\n"
> >    + "Plural-Forms: nplurals=2; plural=(n != 1);\n"
> > 
> > Since it seems only the German translation is affected, I started looking into what is happening and now I wonder why this is not a more wide spread issue.
> > What I found:
> > - Scripty "check_po_files" removes parens from plural
> check_po_files uses the format defined in
> <lang>/messages/ki18n/ki18n{5,6}.po for ki18n translations;
> <lang>/messages/ki18n/kcoreaddons{5,6}_qt.po for Qt translations.
> https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/check_po_files#L38
> We did this because in some cases the definitions we use differs a bit from
> the ones defines elsewhere (especially plural forms), so it was decided to use
> some of our "base" files as reference.
> It seems that the older German translation files, including ki18n5.po and
> ki18n6.po, uses the form without parentheses.
> So you may want to run a global search-and-replace and set all German files to
> use the form with parentheses. If you do that, the next run of check_po_files
> shouldn't try to remove them anymore (I hope).

thank you for your explanation!

I have now changed the plural form in all German PO files to the parens version (which is also used by msginit). Let's see how this tuns out. :)

Thanks again.


More information about the kde-i18n-doc mailing list