Bug 372681 - Message with plural forms is not translated if only translation of plural form differs from msgid
Summary: Message with plural forms is not translated if only translation of plural for...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ki18n
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.28.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Chusslove Illich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-19 23:56 UTC by Lasse Liehu
Modified: 2016-11-20 22:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lasse Liehu 2016-11-19 23:56:44 UTC
The following string from Finnish screenlocker_kcm.po is not translated (msgid_plural is shown in the UI):
#. +> trunk5 stable5
#: kcm.cpp:55
msgctxt "Spinbox suffix. Short for minutes"
msgid " min"
msgid_plural " mins"
msgstr[0] " min"
msgstr[1] " min"

In this case msgstr[0] equals msgid but msgstr[1] differs from msgid_plural. If msgstr[0] is changed to not equal msgid then the string is translated.
Comment 1 Chusslove Illich 2016-11-20 22:33:45 UTC
Git commit a7d5f88c144b51932859b9d3a74a21feca69fd10 by Chusslove Illich (Часлав Илић).
Committed on 20/11/2016 at 22:31.
Pushed by ilic into branch 'master'.

Check properly pointer inequality from dngettext

If original and translation are same, dngettext will return
the original pointer, which is generally fine, except in
the corner cases where e.g. msgstr[1] is same as msgid.
Therefore check for pointer difference only with msgid or
only with msgid_plural, and not with both.

M  +7    -2    src/kcatalog.cpp

http://commits.kde.org/ki18n/a7d5f88c144b51932859b9d3a74a21feca69fd10