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

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/colors
From:       Andrew Coles <andrew_coles () yahoo ! co ! uk>
Date:       2009-11-23 16:47:36
Message-ID: 1258994856.811595.5164.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1053214 by coles:

Fixed plural form error in X11 color string warning.



 M  +15 -8     kcolordialog.cpp  


--- trunk/KDE/kdelibs/kdeui/colors/kcolordialog.cpp #1053213:1053214
@@ -692,20 +692,27 @@
 KColorTable::KColorTablePrivate::slotShowNamedColorReadError(void)
 {
     if (mNamedColorList->count() == 0) {
-        QString msg = i18n(""
-                           "Unable to read X11 RGB color strings. The following "
-                           "file location(s) were examined:\n");
+        QString pathMsg;
+        int pathCount = 0;
 
         const char * const *path = namedColorFilePath();
-        for (int i = 0; path[i]; i += 2) {
+        for (int i = 0; path[i]; i += 2, ++pathCount) {
             if (path[i + 1]) {
-                msg += QLatin1String(path[i + 1]) + ", " + \
QString::fromLatin1(path[i]); +                pathMsg += QLatin1String(path[i + 1]) \
+ ", " + QString::fromLatin1(path[i]);  } else {
-                msg += QLatin1String(path[i]);
+                pathMsg += QLatin1String(path[i]);
             }
-            msg += '\n';
+            pathMsg += '\n';
         }
-        KMessageBox::sorry(q, msg);
+
+        QString finalMsg  = i18ncp("%1 is the number of paths, %2 is the list of \
paths (with newlines between them)", +                                   "Unable to \
read X11 RGB color strings. The following " +                                   "file \
location was examined:\n%2", +                                   "Unable to read X11 \
RGB color strings. The following " +                                   "file \
locations were examined:\n%2", +                                   pathCount, pathMsg \
); +
+        KMessageBox::sorry(q, finalMsg);
     }
 }
 


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

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