From kde-i18n-doc Sat Apr 22 14:00:45 2023 From: Luigi Toscano Date: Sat, 22 Apr 2023 14:00:45 +0000 To: kde-i18n-doc Subject: Re: mixed plural form handling Message-Id: <744317ec-5c75-d890-e7e5-804ac8375ba4 () tiscali ! it> X-MARC-Message: https://marc.info/?l=kde-i18n-doc&m=168217200413986 Frederik Schwarzer ha scritto: > Hi, > > 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 /messages/ki18n/ki18n{5,6}.po for ki18n translations; /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). Ciao -- Luigi