]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix i18n
authorLaurent Montel <montel@kde.org>
Thu, 23 Nov 2006 13:10:00 +0000 (13:10 +0000)
committerLaurent Montel <montel@kde.org>
Thu, 23 Nov 2006 13:10:00 +0000 (13:10 +0000)
svn path=/trunk/playground/utils/dolphin/; revision=607156

src/dolphin.cpp
src/dolphinview.cpp
src/infosidebarpage.cpp
src/itemeffectsmanager.cpp
src/renamedialog.cpp
src/statusbarspaceinfo.cpp
src/undomanager.cpp
src/urlnavigator.cpp

index 2e7efec6fb3f8a451df4539e9ac010010b741b26..b3991531b569e68da0c8f8654a589cb3fd074a6c 100644 (file)
@@ -396,7 +396,7 @@ void Dolphin::createFolder()
 
     // TODO: provide message type hint
     if (ok) {
-        statusBar->setMessage(i18n("Created folder %1.").arg(url.path()),
+        statusBar->setMessage(i18n("Created folder %1.",url.path()),
                               DolphinStatusBar::OperationCompleted);
 
         DolphinCommand command(DolphinCommand::CreateFolder, KUrl::List(), url);
@@ -406,11 +406,11 @@ void Dolphin::createFolder()
         // Creating of the folder has been failed. Check whether the creating
         // has been failed because a folder with the same name exists...
         if (KIO::NetAccess::exists(url, true, this)) {
-            statusBar->setMessage(i18n("A folder named %1 already exists.").arg(url.path()),
+            statusBar->setMessage(i18n("A folder named %1 already exists.",url.path()),
                                   DolphinStatusBar::Error);
         }
         else {
-            statusBar->setMessage(i18n("Creating of folder %1 failed.").arg(url.path()),
+            statusBar->setMessage(i18n("Creating of folder %1 failed.",url.path()),
                                   DolphinStatusBar::Error);
         }
 
@@ -491,7 +491,7 @@ void Dolphin::createFile()
     const QString destPath(viewUrl.pathOrUrl() + "/" + KIO::encodeFileName(name));
     const KUrl destUrl(destPath);
     if (KIO::NetAccess::exists(destUrl, false, this)) {
-        statusBar->setMessage(i18n("A file named %1 already exists.").arg(name),
+        statusBar->setMessage(i18n("A file named %1 already exists.",name),
                               DolphinStatusBar::Error);
         return;
     }
@@ -501,7 +501,7 @@ void Dolphin::createFile()
     KIO::CopyJob* job = KIO::copyAs(sourceUrl, destUrl);
     job->setDefaultPermissions(true);
     if (KIO::NetAccess::synchronousRun(job, this)) {
-        statusBar->setMessage(i18n("Created file %1.").arg(name),
+        statusBar->setMessage(i18n("Created file %1.",name),
                               DolphinStatusBar::OperationCompleted);
 
         KUrl::List list;
@@ -511,7 +511,7 @@ void Dolphin::createFile()
 
     }
     else {
-        statusBar->setMessage(i18n("Creating of file %1 failed.").arg(name),
+        statusBar->setMessage(i18n("Creating of file %1 failed.",name),
                               DolphinStatusBar::Error);
     }
 }
@@ -540,11 +540,11 @@ void Dolphin::deleteItems()
 
     QString text;
     if (itemCount > 1) {
-        text = i18n("Do you really want to delete the %1 selected items?").arg(itemCount);
+        text = i18n("Do you really want to delete the %1 selected items?",itemCount);
     }
     else {
         const KUrl& url = list.first();
-        text = i18n("Do you really want to delete '%1'?").arg(url.fileName());
+        text = i18n("Do you really want to delete '%1'?",url.fileName());
     }
 
     const bool del = KMessageBox::warningContinueCancel(this,
index cab413b954f805fb9efcf9b430f3f4e09910eaca..bcf17a6204d45f90a8eb5c538d622a69923cbd12 100644 (file)
@@ -255,7 +255,7 @@ void DolphinView::renameSelectedItems()
                     if (destExists) {
                         delete progressIndicator;
                         progressIndicator = 0;
-                        view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).").arg(name),
+                        view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).",name),
                                                       DolphinStatusBar::Error);
                         break;
                     }
@@ -578,14 +578,14 @@ void DolphinView::rename(const KUrl& source, const QString& newName)
     }
 
     if (ok) {
-        m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.").arg(source.fileName(), dest.fileName()),
+        m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.",source.fileName(), dest.fileName()),
                                 DolphinStatusBar::OperationCompleted);
 
         DolphinCommand command(DolphinCommand::Rename, source, dest);
         UndoManager::instance().addCommand(command);
     }
     else {
-        m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.").arg(source.fileName(), dest.fileName()),
+        m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.",source.fileName(), dest.fileName()),
                                 DolphinStatusBar::Error);
         reload();
     }
@@ -915,7 +915,7 @@ void DolphinView::startDirLister(const KUrl& url, bool reload)
             m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error);
         }
         else {
-            m_statusBar->setMessage(i18n("The location '%1' is invalid.").arg(location),
+            m_statusBar->setMessage(i18n("The location '%1' is invalid.",location),
                                     DolphinStatusBar::Error);
         }
         return;
@@ -948,7 +948,7 @@ QString DolphinView::defaultStatusBarText() const
         text = i18n("1 Item");
     }
     else {
-        text = i18n("%1 Items").arg(itemCount);
+        text = i18n("%1 Items",itemCount);
     }
 
     text += " (";
@@ -957,7 +957,7 @@ QString DolphinView::defaultStatusBarText() const
         text += i18n("1 Folder");
     }
     else {
-        text += i18n("%1 Folders").arg(m_folderCount);
+        text += i18n("%1 Folders",m_folderCount);
     }
 
     text += ", ";
@@ -966,7 +966,7 @@ QString DolphinView::defaultStatusBarText() const
         text += i18n("1 File");
     }
     else {
-        text += i18n("%1 Files").arg(m_fileCount);
+        text += i18n("%1 Files",m_fileCount);
     }
 
     text += ")";
@@ -1003,7 +1003,7 @@ QString DolphinView::selectionStatusBarText() const
         text = i18n("1 Folder selected");
     }
     else if (folderCount > 1) {
-        text = i18n("%1 Folders selected").arg(folderCount);
+        text = i18n("%1 Folders selected",folderCount);
     }
 
     if ((fileCount > 0) && (folderCount > 0)) {
@@ -1012,10 +1012,10 @@ QString DolphinView::selectionStatusBarText() const
 
     const QString sizeText(KIO::convertSize(byteSize));
     if (fileCount == 1) {
-        text += i18n("1 File selected (%1)").arg(sizeText);
+        text += i18n("1 File selected (%1)",sizeText);
     }
     else if (fileCount > 1) {
-        text += i18n("%1 Files selected (%1)").arg(fileCount).arg(sizeText);
+        text += i18n("%1 Files selected (%1)",fileCount,sizeText);
     }
 
     return text;
index 017fcb9f6bc4094c3951a94d02849ddf8d54fbbc..bf3d5f4fc1b203d5320258de352d4cb745002d3b 100644 (file)
@@ -165,7 +165,7 @@ void InfoSidebarPage::showItemInfo()
                                            K3Icon::NoGroup,
                                            K3Icon::SizeEnormous);
         m_preview->setPixmap(icon);
-        m_name->setText(i18n("%1 items selected").arg(selectedItems->count()));
+        m_name->setText(i18n("%1 items selected",selectedItems->count()));
     }
     else if (!applyBookmark()) {
         // try to get a preview pixmap from the item...
index bfc4d33bb4985e8dc309eb080741fc3c6b4b5c78..782dfe3c50c7aa384ea4907040405ed30ed9e364 100644 (file)
@@ -182,7 +182,7 @@ QString ItemEffectsManager::statusBarText(KFileItem* fileInfo) const
         // KFileItem::getStatusBar() returns "MyDocuments/ Folder" as
         // status bar text for a folder 'MyDocuments'. This is adjusted
         // to "MyDocuments (Folder)" in Dolphin.
-        return i18n("%1 (Folder)").arg(fileInfo->name());
+        return i18n("%1 (Folder)",fileInfo->name());
     }
 
     return fileInfo->getStatusBarInfo();
index 882db8b66fe01872081d498f0ef3a225fa31093e..02238e5e749f30ae82dc08d9643237b319612015 100644 (file)
@@ -44,7 +44,7 @@ RenameDialog::RenameDialog(const KUrl::List& items) :
     topLayout->setMargin(KDialog::marginHint());
 
     const int itemCount = items.count();
-    QLabel* editLabel = new QLabel(i18n("Rename the %1 selected items to:").arg(itemCount),
+    QLabel* editLabel = new QLabel(i18n("Rename the %1 selected items to:",itemCount),
                                    page);
 
     m_lineEdit = new KLineEdit(page);
index 3c6073ca5cc155c6c2d52565fcedd3bfd7039475..0b2c4d1332be74c9f3b69d941ed27bd6cc714720 100644 (file)
@@ -91,9 +91,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
         }
         painter.drawRect(QRect(left, barTop + 2, right, barHeight - 2));
 
-        text = i18n("%1% of %2 used")
-               .arg( 100 - (int)(100.0 * m_kBAvailable / m_kBSize))
-               .arg(KIO::convertSizeFromKiB(m_kBSize));
+        text = i18n("%1% of %2 used", QString::number(100 - (int)(100.0 * m_kBAvailable / m_kBSize)), KIO::convertSizeFromKiB(m_kBSize));
     }
     else {
         if (m_gettingSize) {
index 62a7ff0b99e3819a859605f5cf184f3f740fc9d4..d4a4574a007092121978898f079f0326752a8c0b 100644 (file)
@@ -84,7 +84,7 @@ void UndoManager::addCommand(const DolphinCommand& command)
     }
 
     emit undoAvailable(true);
-    emit undoTextChanged(i18n("Undo: %1").arg(commandText(command)));
+    emit undoTextChanged(i18n("Undo: %1",commandText(command)));
 
     // prevent an endless growing of the Undo history
     if (m_historyIndex > 10000) {
@@ -132,12 +132,12 @@ void UndoManager::undo()
             emit undoTextChanged(i18n("Undo"));
         }
         else {
-            emit undoTextChanged(i18n("Undo: %1").arg(commandText(m_history[m_historyIndex])));
+            emit undoTextChanged(i18n("Undo: %1",commandText(m_history[m_historyIndex])));
         }
 
         if (m_historyIndex < static_cast<int>(m_history.count()) - 1) {
             emit redoAvailable(true);
-            emit redoTextChanged(i18n("Redo: %1").arg(commandText(command)));
+            emit redoTextChanged(i18n("Redo: %1",commandText(command)));
         }
         else {
             emit redoAvailable(false);
@@ -244,11 +244,11 @@ void UndoManager::redo()
             emit redoTextChanged(i18n("Redo"));
         }
         else {
-            emit redoTextChanged(i18n("Redo: %1").arg(commandText(m_history[m_historyIndex + 1])));
+            emit redoTextChanged(i18n("Redo: %1",commandText(m_history[m_historyIndex + 1])));
         }
 
         emit undoAvailable(true);
-        emit undoTextChanged(i18n("Undo: %1").arg(commandText(command)));
+        emit undoTextChanged(i18n("Undo: %1",commandText(command)));
 
         Dolphin& dolphin = Dolphin::mainWin();
 
index f81a202184383bcd4a43aca199ef61ac27f71913..1f9295cb5fbfcb6129b3cfa9400eaa79bd9bd290 100644 (file)
@@ -478,14 +478,14 @@ void UrlNavigator::updateContent()
         delete m_protocolSeparator; m_protocolSeparator = 0;
         delete m_host; m_host = 0;
 
-        QToolTip::add(m_toggleButton, i18n("Browse (%1, Escape)").arg(shortcut));
+        QToolTip::add(m_toggleButton, i18n("Browse (%1, Escape)",shortcut));
 
         setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
         m_pathBox->show();
         m_pathBox->setUrl(url());
     }
     else {
-        QToolTip::add(m_toggleButton, i18n("Edit location (%1)").arg(shortcut));
+        QToolTip::add(m_toggleButton, i18n("Edit location (%1)",shortcut));
 
         setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
         m_pathBox->hide();