*****SPAM*****Plural forms in the style KCM
Ingo Klöcker
kloecker at kde.org
Wed Sep 2 07:52:23 BST 2026
On Mittwoch, 2. September 2026 07:51:23 Mitteleuropäische Sommerzeit Yuri
Chornoivan wrote:
> https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/style/
> kcmstyle.cpp?ref_type=heads#L225:
>
> message = i18ncp("@info:status",
> "Successfully uninstalled “%2” but could not
> uninstall others:\n",
> "Successfully uninstalled %1 styles but could
> not uninstall others:\n",
> uninstalled.size(),
> uninstalled.first());
>
> https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/style/
> kcmstyle.cpp?ref_type=heads#L237:
>
> i18ncp("@info:status", "Successfully uninstalled “%2”.", "Successfully
> uninstalled %1 styles.", uninstalled.size(), uninstalled.first()));
>
> It seems that this will not work for the languages with more than 2 plural
> forms. Am I right?
I would expect it to work (unless i18ncp complains about the missing %2 in the
second string). Why do you think it wouldn't work? If the number is 1 then the
first string is used. In all other cases the matching plural form (as
translation of the second string) in the target language will be used. I don't
see how this is different from any other usage of i18ncp in our source code.
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 265 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20260902/ec02148d/attachment.sig>
More information about the kde-i18n-doc
mailing list