i18n change: no more %n in plural calls

David Faure faure at kde.org
Mon Feb 12 15:25:15 GMT 2007


On Monday 12 February 2007, Chusslove Illich wrote:
> branches/work/kde4-l10n/scripts/conversion/i18nconvplural.pl

Funny script; it seems to have gotten every case wrong? ;)

Index: dolphinview.cpp
===================================================================
--- dolphinview.cpp     (revision 632866)
+++ dolphinview.cpp     (working copy)
@@ -749,11 +749,11 @@ QString DolphinView::defaultStatusBarTex
 {
     const int itemCount = m_folderCount + m_fileCount;

-    QString text = i18np("1 Item", "%n Items", itemCount);
+    QString text = i18np("1 Item", "%2 Items", itemCount);
     text += " (";
-    text += i18np("1 Folder", "%n Folders", m_folderCount);
+    text += i18np("1 Folder", "%2 Folders", m_folderCount);
     text += ", ";
-    text += i18np("1 File", "%n Files", m_fileCount);
+    text += i18np("1 File", "%2 Files", m_fileCount);
     text += ")";

     return text;
@@ -787,7 +787,7 @@ QString DolphinView::selectionStatusBarT
     }

     if (folderCount > 0) {
-        text = i18np("1 Folder selected", "%n Folders selected", folderCount);
+        text = i18np("1 Folder selected", "%2 Folders selected", folderCount);
         if (fileCount > 0) {
             text += ", ";
         }
@@ -795,7 +795,7 @@ QString DolphinView::selectionStatusBarT

     if (fileCount > 0) {
         const QString sizeText(KIO::convertSize(byteSize));
-        text += i18np("1 File selected (%1)", "%n Files selected (%1)", fileCount, sizeText);
+        text += i18np("1 File selected (%3)", "%2 Files selected (%3)", fileCount, sizeText);
     }

     return text;

Why is there no %1 anywhere? Wasn't %n supposed to become %1?

(playground/utils/dolphin/src)

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list