Bug 88904 - Plural i18n call missing
Summary: Plural i18n call missing
Status: RESOLVED FIXED
Alias: None
Product: koffice
Classification: Applications
Component: general (show other bugs)
Version: 1.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KOffice Bug Wranglers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-05 21:52 UTC by Krzysztof Lichota
Modified: 2004-09-06 15:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Lichota 2004-09-05 21:52:35 UTC
Version:           1.3 (using KDE KDE 3.2.3)
Installed from:    SuSE RPMs

In two places in code in KoScript the plural formof i18n() should be used but it is not:
koscript/koscript_eval.cc:742 
koscript/koscript_eval.cc:2129

The faulty code:
QString tmp( i18n("%1 arguments are not needed") );
context.setException( new KSException( "TooManyArguments", tmp.arg( context.value()->listValue().count() ), node->getLineNo() ) );
Comment 1 Nicolas Goutte 2004-09-06 14:14:09 UTC
Do you want it in KOFFICE_1_3_BRANCH too?

Have a nice day!
Comment 2 Nicolas Goutte 2004-09-06 14:27:51 UTC
CVS commit by goutte: 

Fix plural user visible strings
CCMAIL:88904-close@bugs.kde.org


  M +4 -4      koscript_eval.cc   1.23


--- koffice/lib/koscript/koscript_eval.cc  #1.22:1.23
@@ -740,6 +740,6 @@ bool KSEval_func_dcl( KSParseNode* node,
   if ( !context.value()->listValue().isEmpty() )
   {
-    QString tmp( i18n("%1 arguments are not needed") );
-    context.setException( new KSException( "TooManyArguments", tmp.arg( context.value()->listValue().count() ), node->getLineNo() ) );
+    const QString tmp( i18n("1 argument is not needed", "%n arguments are not needed", context.value()->listValue().count() ) );
+    context.setException( new KSException( "TooManyArguments", tmp, node->getLineNo() ) );
     context.scope()->popLocalScope();
     return false;
@@ -2127,6 +2127,6 @@ bool KSEval_destructor_dcl( KSParseNode*
   if ( !context.value()->listValue().isEmpty() )
   {
-    QString tmp( i18n("%1 arguments are not needed") );
-    context.setException( new KSException( "TooManyArguments", tmp.arg( context.value()->listValue().count() ), node->getLineNo() ) );
+    const QString tmp( i18n("1 argument is not needed", "%n arguments are not needed", context.value()->listValue().count() ) );
+    context.setException( new KSException( "TooManyArguments", tmp, node->getLineNo() ) );
     context.scope()->popLocalScope();
     return false;


Comment 3 Krzysztof Lichota 2004-09-06 15:11:48 UTC
Nicolas Goutte wrote:
> ------- Additional Comments From nicolasg snafu de  2004-09-06 14:14 -------
> Do you want it in KOFFICE_1_3_BRANCH too?

Yes, I think it should be changed, as 1.4 is far away and this is a bug 
in translation.

Regards

Comment 4 Nicolas Goutte 2004-09-06 15:36:13 UTC
CVS commit by goutte: 

I18N: Fix plural user-visible strings (Backport)
CCMAIL:88904@bugs.kde.org
CCMAIL:kde-i18n-doc@kde.org


  M +4 -4      koscript_eval.cc   1.22.2.1


--- koffice/lib/koscript/koscript_eval.cc  #1.22:1.22.2.1
@@ -740,6 +740,6 @@ bool KSEval_func_dcl( KSParseNode* node,
   if ( !context.value()->listValue().isEmpty() )
   {
-    QString tmp( i18n("%1 arguments are not needed") );
-    context.setException( new KSException( "TooManyArguments", tmp.arg( context.value()->listValue().count() ), node->getLineNo() ) );
+    const QString tmp( i18n("1 argument is not needed", "%n arguments are not needed", context.value()->listValue().count() ) );
+    context.setException( new KSException( "TooManyArguments", tmp, node->getLineNo() ) );
     context.scope()->popLocalScope();
     return false;
@@ -2127,6 +2127,6 @@ bool KSEval_destructor_dcl( KSParseNode*
   if ( !context.value()->listValue().isEmpty() )
   {
-    QString tmp( i18n("%1 arguments are not needed") );
-    context.setException( new KSException( "TooManyArguments", tmp.arg( context.value()->listValue().count() ), node->getLineNo() ) );
+    const QString tmp( i18n("1 argument is not needed", "%n arguments are not needed", context.value()->listValue().count() ) );
+    context.setException( new KSException( "TooManyArguments", tmp, node->getLineNo() ) );
     context.scope()->popLocalScope();
     return false;