Bug 88827

Summary: wrong use of plural forms in cvs version of amaroK
Product: [Applications] amarok Reporter: Rinse De Vries <rinse>
Component: generalAssignee: Amarok Bugs <amarok-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nicolasg
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Rinse De Vries 2004-09-04 15:55:49 UTC
Version:           onbekend (using KDE 3.3.0, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.104-default

Hi, in cvs amaroK contains the following string:

#: covermanager.cpp:325
_n: Are you sure you want to delete this cover?\n
Are you sure you want to delete these covers?

This is misuse of plural forms, plural forms should be formatted as 


_n: Are you sure you want to delete this %n cover?\n
Are you sure you want to delete these %n covers?
Comment 1 Mark Kretschmann 2004-09-11 09:49:52 UTC
Sorry, I don't understand what you mean!
Comment 2 Rinse De Vries 2004-09-11 11:14:56 UTC
The string starts with 
_n:
which indicates that it is a plural form.
But plural forms can only be used if there is a difference between the counts.

e.g.:
 Are you sure you want to delete this  cover?\n 
 Are you sure you want to delete these 2 covers?\n
Are you sure you want to delete these 3 covers?\n
Are you sure you want to delete these 4 covers?\n
Are you sure you want to delete these 10 covers?\n

If that is not what this string is about, you should not use the plural form marker :o)

Please ask other developers like Stefan Kulow or Adriaan de Groot for more information about plural forms. 

Rinse
etc..

 
Comment 3 Max Howell 2004-09-18 14:45:44 UTC
What's wrong with the way we have it? We don't want a %n in there as it looks stupid.
Comment 4 Rinse De Vries 2004-09-18 15:06:54 UTC
Op zaterdag 18 september 2004 14:45, schreef Max Howell:
>
> ------- Additional Comments From max.howell methylblue com  2004-09-18
> 14:45 ------- What's wrong with the way we have it? We don't want a %n in
> there as it looks stupid.

Wihtout %n it is not a plural form :)
So don't use it..

Rinse

Comment 5 Max Howell 2004-09-18 17:42:42 UTC
But it is a plural form, what on earth do you mean? These are the two forms we use, and it depends on the amount of covers selected:

Are you sure you want to delete THIS cover?
Are you sure you want to delete THESE coverS?

I see no reference to what you are saying in the i18n guide for developers. I know there can be different forms depending on the language, but surely this is allowed? Otherwise I am tempted to say, "oh well, this is just stupid" and force it to always be plural.
Comment 6 Rinse De Vries 2004-09-18 18:08:08 UTC
Op zaterdag 18 september 2004 17:42, schreef Max Howell:
> But it is a plural form, what on earth do you mean? These are the two forms
> we use, and it depends on the amount of covers selected:
>
> Are you sure you want to delete THIS cover?
> Are you sure you want to delete THESE coverS?
>
> I see no reference to what you are saying in the i18n guide for developers.
> I know there can be different forms depending on the language, but surely
> this is allowed? Otherwise I am tempted to say, "oh well, this is just
> stupid" and force it to always be plural.

that is why I advise you to contact coolo or another developer that knows more 
about the use of plural forms.
For me it is too hard to explain it :)
in general, plural forms are defined to use strings like this 
Are you sure you want to delete 1 cover?
 Are you sure you want to delete 2 coverS?
etc.

why?
Because in a lot of languages, there are a lot of different forms used. 
like this:

Are you sure you want to delete 1 cover?
 Are you sure you want to delete 2 coverS
 Are you sure you want to delete 2 coverA
 Are you sure you want to delete 5 coverS
 Are you sure you want to delete 10 coverE

With your example, this is not the not the case, so the plural form "_n:" 
should not be used :o)

I contacted kde-i18n-doc@kde.org about this before reporting this bug.

Rinse

Comment 7 Nicolas Goutte 2004-09-18 21:40:14 UTC
A plural form must indeed must be like:

i18n( "One item", "%n items", count);

If you do not want to use a count, you should avoid using this form of i18n.

The reason is that for each translation language the number and meaning of translation can vary. For example, some language use the singular form for number ending with 1 (to compare in English with 1st 2nd 3rd 4th ... 21st 22nd 23th 24th).

Have a nice day!

Comment 8 Max Howell 2004-09-19 02:37:57 UTC
CVS commit by mhowell: 

A toast to languages with multiple plural forms!

CCMAIL:88827-done@bugs.kde.org


  M +1 -1      covermanager.cpp   1.53


--- kdeextragear-1/amarok/src/covermanager.cpp  #1.52:1.53
@@ -328,5 +328,5 @@ void CoverManager::showCoverMenu( QIconV
                             this,
                             i18n( "Are you sure you want to delete this cover?",
-                                  "Are you sure you want to delete these covers?",
+                                  "Are you sure you want to delete these %n covers?",
                                   selectedItems.count() ),
                             QString::null,


Comment 9 Max Howell 2004-09-19 02:38:24 UTC
Thanks for the time guys, sorry we were stubborn.
Comment 10 Stephan Kulow 2004-09-22 16:09:58 UTC
To correct this misunderstanding a bit: there is indeed no language that doesn't have an anonymous plural (as in "items"), but for these you can't use
i18n the way you used it. If you want to use anonymous plural (without any number at all), then use two i18n calls.