Bug 274678 - "Distribution list" written in singular form even when talking about several distribution lists
Summary: "Distribution list" written in singular form even when talking about several ...
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: Git (master)
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 13:05 UTC by Alexander Potashev
Modified: 2012-02-09 09:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2011-06-01 13:05:08 UTC
Version:           Git (master) (using KDE 4.6.3) 
OS:                Linux

In kdepim/kmail/addressvalidationjob.cpp, ~line 69:
> const QString errorMsg = i18n(
> "Distribution list \"%1\" is empty, it cannot be used.",
> emptyDistributionLists.join( ", " ) );

From the code it is clear that "%1" may be substituted by multiple distribution lists, but string always talks about "Distribution list ..." (in singular!)

Also, if there are multiple distribution lists, they should be quotes separately: «"foo", "bar"», not «"foo, bar"».

Reproducible: Always
Comment 1 Laurent Montel 2012-02-05 15:34:12 UTC
Git commit 6d5c23f22997328715f4ce87b2a56e62e2187900 by Montel Laurent.
Committed on 05/02/2012 at 16:33.
Pushed by mlaurent into branch 'master'.

Fix Bug 274678 - "Distribution list" written in singular form even when talking about several distribution lists
FIXED-IN: 4.9

M  +15   -2    kmail/addressvalidationjob.cpp

http://commits.kde.org/kdepim/6d5c23f22997328715f4ce87b2a56e62e2187900
Comment 2 Alexander Potashev 2012-02-05 20:46:01 UTC
1. Please, use `i18np()` to implement plural forms, instead of a comparison to 1.
2. "Distributions lists %1 are empty, it cannot be used." should probably be changed to "Distribution lists %1 are empty, they cannot be used."
Comment 3 Laurent Montel 2012-02-06 10:08:57 UTC
we can't use plurial form.
Result is a qstring list so we can't define number of element.
Comment 4 Freek de Kruijf 2012-02-07 21:49:25 UTC
This gives most likely wrong translations in languages that have more that 2 plurals. You really can't count the number of distribution lists in the parameter that goes in %1? It should be somewhere in emptyDistributionLists. If you can, that would solve the problem.
Comment 5 Alexander Potashev 2012-02-08 06:46:49 UTC
This is going to work I think:

i18np("Distribution list %2 is ...", "Distribution lists %2 are ...", numberOfListItems, qstring_listItems);
Comment 6 Kevin Krammer 2012-02-08 10:19:37 UTC
Git commit 49e6f2cd660f1cb4bb555af5dccb04ff350de076 by Kevin Krammer.
Committed on 08/02/2012 at 11:15.
Pushed by krake into branch 'master'.

Fix i18n plural handling based on list of distribution list names

Solution provided by Albert Astals Cid: use list count as plural deciding
factor but do not use it for placeholder substitution.
REVIEW: 103889

M  +9    -12   kmail/addressvalidationjob.cpp

http://commits.kde.org/kdepim/49e6f2cd660f1cb4bb555af5dccb04ff350de076
Comment 7 Kevin Krammer 2012-02-09 09:26:36 UTC
Git commit 885f61d840d87c03189fe80a84fa72c04bbc24ec by Kevin Krammer.
Committed on 09/02/2012 at 10:24.
Pushed by krake into branch 'KDE/4.8'.

Fix i18n plural handling based on list of distribution list names

Solution provided by Albert Astals Cid: use list count as plural deciding
factor but do not use it for placeholder substitution.
FIXED-IN: 4.8.1
CCMAIL: kde-i18n-doc@kde.org
REVIEW: 103890

M  +12   -2    kmail/addressvalidationjob.cpp

http://commits.kde.org/kdepim/885f61d840d87c03189fe80a84fa72c04bbc24ec