[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdewebdev/kommander
From:       Andras Mantia <amantia () kde ! org>
Date:       2008-03-31 21:14:17
Message-ID: 1206998057.416926.4093.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 792349 by amantia:

Port i18n with args. Too bad we don't get at least a compilation warning.

 M  +1 -1      executor/instance.cpp  
 M  +1 -1      lib/functionlib.cpp  
 M  +1 -1      lib/kommanderfunctions.cpp  
 M  +8 -8      lib/kommanderwidget.cpp  
 M  +12 -12    lib/parser.cpp  


--- trunk/KDE/kdewebdev/kommander/executor/instance.cpp #792348:792349
@@ -222,7 +222,7 @@
   }
   if (!QFileInfo(fname.path()).isExecutable())
   {
-    if (KMessageBox::warningContinueCancel(m_parent, i18n("<qt>The Kommander file \
<i>%1</i> does not have the <b>executable attribute</b> set and could possibly \
contain dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in \
this program, make it executable to get rid of this warning.<p>Are you sure you want \
to continue?</qt>").arg(fname.pathOrUrl()), QString(),KStandardGuiItem::cont(), \
KGuiItem(i18n("Run Nevertheless"))) == KMessageBox::Cancel) +    if \
(KMessageBox::warningContinueCancel(m_parent, i18n("<qt>The Kommander file <i>%1</i> \
does not have the <b>executable attribute</b> set and could possibly contain \
dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in this \
program, make it executable to get rid of this warning.<p>Are you sure you want to \
continue?</qt>", fname.pathOrUrl()), QString(),KStandardGuiItem::cont(), \
KGuiItem(i18n("Run Nevertheless"))) == KMessageBox::Cancel)  return false;
   }
   return true;
--- trunk/KDE/kdewebdev/kommander/lib/functionlib.cpp #792348:792349
@@ -394,7 +394,7 @@
   }
   else if(replyType != "void")
   {
-  //printError(i18n("DCOP return type %1 is not yet \
implemented.").arg(replyType.data())); +  //printError(i18n("DCOP return type %1 is \
not yet implemented.", replyType.data()));  }
   */
   return ParseNode();
--- trunk/KDE/kdewebdev/kommander/lib/kommanderfunctions.cpp #792348:792349
@@ -320,7 +320,7 @@
   KommanderWidget* pWidget = parseWidget(identifier);
   if (!pWidget) 
   {
-    printError(i18n("Unknown widget: @%1.").arg(identifier));
+    printError(i18n("Unknown widget: @%1.", identifier));
     return QString();
   }
   if (s[pos] == '.')
--- trunk/KDE/kdewebdev/kommander/lib/kommanderwidget.cpp #792348:792349
@@ -138,7 +138,7 @@
     if (!p.parse())
     {
       // FIXME add widget's name to KommanderWidget class      
-      printError(i18n("Line %1: %2.\n", p.errorLine()+1, p.errorMessage()));
+      printError(i18n("Line %1: %2.\n", p.errorLine()+1,  p.errorMessage()));
     }
     return QString();
   }
@@ -249,7 +249,7 @@
     }
     else
     {
-      printError(i18n("Unknown special: \'%1\'.").arg(identifier));
+      printError(i18n("Unknown special: \'%1\'.", identifier));
       return QString();
     }
   }
@@ -417,7 +417,7 @@
 {
   if (showErrors) 
   {
-    int result = KMessageBox::warningYesNoCancel(parentDialog(),  i18n("<qt>Error in \
widget <b>%1</b>:<p><i>%2</i></qt>", QString(m_thisObject->objectName()), a_error), \
i18n("Error"), KGuiItem(i18n("Continue")), KGuiItem(i18n("Continue && Ignore Next \
Errors")), KGuiItem(i18n("Stop"))); +    int result = \
KMessageBox::warningYesNoCancel(parentDialog(),  i18n("<qt>Error in widget \
<b>%1</b>:<p><i>%2</i></qt>", m_thisObject->objectName(), a_error), i18n("Error"), \
KGuiItem(i18n("Continue")), KGuiItem(i18n("Continue && Ignore Next Errors")), \
KGuiItem(i18n("Stop")));  if (result == KMessageBox::No)
     {
       showErrors = false;
@@ -583,7 +583,7 @@
   QString arg = parseBrackets(s, from, ok);
   if (!ok)
   {
-    printError(i18n("Unmatched parenthesis after \'%1\'.").arg(function));
+    printError(i18n("Unmatched parenthesis after \'%1\'.", function));
     return QStringList();
   }
   const QStringList args = parseArgs(arg, ok);
@@ -592,13 +592,13 @@
   bool extraArg = gname == Group::DBUS;
   
   if (!ok)
-    printError(i18n("Unmatched quotes in argument of \'%1\'.").arg(function));
+    printError(i18n("Unmatched quotes in argument of \'%1\'.", function));
   else if (gname == -1)
-    printError(i18n("Unknown function group: \'%1\'.").arg(group));
+    printError(i18n("Unknown function group: \'%1\'.", group));
   else if (fname == -1 && !extraArg)
-    printError(i18n("Unknown function: \'%1\' in group \
'%2'.").arg(function).arg(group)); +    printError(i18n("Unknown function: \'%1\' in \
group '%2'.", function, group));  else if (fname == -1 && extraArg)
-    printError(i18n("Unknown widget function: \'%1\'.").arg(function));
+    printError(i18n("Unknown widget function: \'%1\'.", function));
   else if ((int)args.count() + extraArg < SpecialInformation::minArg(gname, fname))
     printError(i18n("Not enough arguments for \'%1\' (%2 instead of %3).<p>"
        "Correct syntax is: %4")
--- trunk/KDE/kdewebdev/kommander/lib/parser.cpp #792348:792349
@@ -114,7 +114,7 @@
     else                          // Bad character
     {
       insertNode(s.mid(start, 1), lines);
-      setError(i18n("Invalid character: '%1'").arg(s[start]), m_parts.count()-1);
+      setError(i18n("Invalid character: '%1'", s[start]), m_parts.count()-1);
       return false;
     }
   }
@@ -221,7 +221,7 @@
         return parseWidget(mode, value);
       }else if (mode == Execute)
       {
-        setError(i18n("'%1' (%2) is not a \
widget").arg(p.variableName()).arg(variable(p.variableName()).toString())); +        \
setError(i18n("'%1' (%2) is not a widget", p.variableName(), \
variable(p.variableName()).toString()));  return ParseNode();
       } else
       {
@@ -233,7 +233,7 @@
     }
     else if (tryKeyword(LeftParenthesis, CheckOnly))
     {
-       setError(i18n("'%1' is not a function").arg(p.variableName()));
+       setError(i18n("'%1' is not a function", p.variableName()));
        return ParseNode();
     }
     else
@@ -424,15 +424,15 @@
     tryKeyword(RightParenthesis);
   }
   if (f.minArgs() > params.count())
-    setError(i18n("in function '%1': %2").arg(name).arg(i18n("too few parameters")), \
pos); +    setError(i18n("in function '%1': %2", name, i18n("too few parameters")), \
pos);  else if (f.maxArgs() < params.count())
-    setError(i18n("in function '%1': %2").arg(name).arg(i18n("too many \
parameters")), pos); +    setError(i18n("in function '%1': %2", name, i18n("too many \
parameters")), pos);  else if (mode == Execute)
   {
     ParseNode p = f.execute(this, params);
     if (!p.isValid())
     {
-      setError(i18n("in function '%1': %2").arg(name).arg(p.errorMessage()), pos);
+      setError(i18n("in function '%1': %2", name, p.errorMessage()), pos);
       return ParseNode();
     }
     else
@@ -472,7 +472,7 @@
     ParseNode p = f.execute(this, params);
     if (!p.isValid())
     {
-      setError(i18n("in widget function '%1.%2': \
%3").arg(widget).arg(var).arg(p.errorMessage()), pos); +      setError(i18n("in \
widget function '%1.%2': %3", widget, var, p.errorMessage()), pos);  return \
ParseNode();  }
     else
@@ -515,12 +515,12 @@
       m_start = m_start - 2;
       return parseWidget(mode); 
     } else
-      setError(i18n("'%1' is not a widget").arg(var));
+      setError(i18n("'%1' is not a widget", var));
   }
   else if (tryKeyword(LeftParenthesis, CheckOnly))
-    setError(i18n("'%1' is not a function").arg(var));
+    setError(i18n("'%1' is not a function", var));
   else 
-    setError(i18n("Unexpected symbol after variable '%1'").arg(var));
+    setError(i18n("Unexpected symbol after variable '%1'", var));
 
   return ParseNode();
 }
@@ -739,9 +739,9 @@
   if (mode == Execute)
   {
     if (k == Dot)
-      setError(i18n("Expected '%1'<br><br>Possible cause of the error is having a \
variable with the same name as a widget").arg(m_data->keywordToString(k))); +      \
setError(i18n("Expected '%1'<br><br>Possible cause of the error is having a variable \
with the same name as a widget", m_data->keywordToString(k)));  else
-     setError(i18n("Expected '%1'").arg(m_data->keywordToString(k)));
+     setError(i18n("Expected '%1'", m_data->keywordToString(k)));
   }
   return false;
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic