From 8e7ef6601102ee433a516453dee3dcd300fe0611 Mon Sep 17 00:00:00 2001 From: Nick Tiskov Date: Wed, 3 Jul 2013 11:35:02 +0400 Subject: [PATCH] Translations fixes Do not translate strings, which should not be translated Remove unnecessary/unused strings. --- src/about.ui | 8 ++++---- src/about_imp.h | 2 +- src/addnewtorrentdialog.ui | 3 --- src/mainwindow.cpp | 14 +++++++------- src/mainwindow.ui | 2 +- src/properties/propertieswidget.cpp | 2 +- src/properties/trackerlist.cpp | 6 +++--- src/rss/automatedrssdownloader.ui | 2 +- src/rss/rss_imp.cpp | 2 +- src/searchengine/engineselectdlg.cpp | 2 +- src/torrentimportdlg.ui | 2 +- 11 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/about.ui b/src/about.ui index c08459509..fe3f1effc 100644 --- a/src/about.ui +++ b/src/about.ui @@ -51,7 +51,7 @@ - <h3><b>qBittorrent</b></h3> + <h3><b>qBittorrent</b></h3> Qt::RichText @@ -442,7 +442,7 @@ p, li { white-space: pre-wrap; } - Qt: + Qt: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -452,7 +452,7 @@ p, li { white-space: pre-wrap; } - Boost: + Boost: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -483,7 +483,7 @@ p, li { white-space: pre-wrap; } - Libtorrent: + Libtorrent: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/src/about_imp.h b/src/about_imp.h index e190a7333..49a19b335 100644 --- a/src/about_imp.h +++ b/src/about_imp.h @@ -51,7 +51,7 @@ class about : public QDialog, private Ui::AboutDlg{ // Set icons logo->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/qbittorrent22.png"))); //Title - lb_name->setText(QString::fromUtf8("

")+tr("qBittorrent")+QString::fromUtf8(" "VERSION"

")); + lb_name->setText(QString::fromUtf8("

qBittorrent")+QString::fromUtf8(" "VERSION"

")); // Thanks QString thanks_txt; thanks_txt += QString::fromUtf8("

I would first like to thank sourceforge.net for hosting qBittorrent project and for their support.

"); diff --git a/src/addnewtorrentdialog.ui b/src/addnewtorrentdialog.ui index 7278e252e..b705b47d0 100644 --- a/src/addnewtorrentdialog.ui +++ b/src/addnewtorrentdialog.ui @@ -22,9 +22,6 @@ 16777215
- - Dialog - diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 834371009..a0764874c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -100,7 +100,7 @@ MainWindow::MainWindow(QWidget *parent, const QStringList& torrentCmdLine) : QMa Preferences pref; ui_locked = pref.isUILocked(); - setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION))); + setWindowTitle(QString("qBittorrent %1").arg(QString::fromUtf8(VERSION))); displaySpeedInTitle = pref.speedInTitleBar(); // Clean exit on log out connect(static_cast(qApp), SIGNAL(sessionIsShuttingDown()), this, SLOT(deleteBTSession()), Qt::DirectConnection); @@ -542,13 +542,13 @@ void MainWindow::createKeyboardShortcuts() { actionCreate_torrent->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+N"))); actionOpen->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+O"))); actionExit->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Q"))); - switchTransferShortcut = new QShortcut(QKeySequence(tr("Alt+1", "shortcut to switch to first tab")), this); + switchTransferShortcut = new QShortcut(QKeySequence("Alt+1"), this); connect(switchTransferShortcut, SIGNAL(activated()), this, SLOT(displayTransferTab())); - switchSearchShortcut = new QShortcut(QKeySequence(tr("Alt+2", "shortcut to switch to third tab")), this); + switchSearchShortcut = new QShortcut(QKeySequence("Alt+2"), this); connect(switchSearchShortcut, SIGNAL(activated()), this, SLOT(displaySearchTab())); - switchSearchShortcut2 = new QShortcut(QKeySequence(tr("Ctrl+F", "shortcut to switch to search tab")), this); + switchSearchShortcut2 = new QShortcut(QKeySequence("Ctrl+F"), this); connect(switchSearchShortcut2, SIGNAL(activated()), this, SLOT(displaySearchTab())); - switchRSSShortcut = new QShortcut(QKeySequence(tr("Alt+3", "shortcut to switch to fourth tab")), this); + switchRSSShortcut = new QShortcut(QKeySequence("Alt+3"), this); connect(switchRSSShortcut, SIGNAL(activated()), this, SLOT(displayRSSTab())); actionDocumentation->setShortcut(QKeySequence("F1")); actionOptions->setShortcut(QKeySequence(QString::fromUtf8("Alt+O"))); @@ -1122,7 +1122,7 @@ void MainWindow::updateGUI() { if (systrayIcon) { #if defined(Q_WS_X11) || defined(Q_WS_MAC) QString html = "
"; - html += tr("qBittorrent"); + html += "qBittorrent"; html += "
"; html += "
"; html += " "+tr("DL speed: %1 KiB/s", "e.g: Download speed: 10 KiB/s").arg(QString::number(QBtSession::instance()->getPayloadDownloadRate()/1024., 'f', 1)); @@ -1286,7 +1286,7 @@ void MainWindow::on_actionSpeed_in_title_bar_triggered() { if (displaySpeedInTitle) updateGUI(); else - setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION))); + setWindowTitle(QString("qBittorrent %1").arg(QString::fromUtf8(VERSION))); } void MainWindow::on_actionRSS_Reader_triggered() { diff --git a/src/mainwindow.ui b/src/mainwindow.ui index f5d29a35a..dc1a75221 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -293,7 +293,7 @@ Lock qBittorrent - Ctrl+L + Ctrl+L diff --git a/src/properties/propertieswidget.cpp b/src/properties/propertieswidget.cpp index d5377c87e..debde3626 100644 --- a/src/properties/propertieswidget.cpp +++ b/src/properties/propertieswidget.cpp @@ -653,7 +653,7 @@ void PropertiesWidget::askWebSeed() { if (!ok) return; qDebug("Adding %s web seed", qPrintable(url_seed)); if (!listWebSeeds->findItems(url_seed, Qt::MatchFixedString).empty()) { - QMessageBox::warning(this, tr("qBittorrent"), + QMessageBox::warning(this, "qBittorrent", tr("This url seed is already in the list."), QMessageBox::Ok); return; diff --git a/src/properties/trackerlist.cpp b/src/properties/trackerlist.cpp index c1532b005..e9c1132b3 100644 --- a/src/properties/trackerlist.cpp +++ b/src/properties/trackerlist.cpp @@ -66,13 +66,13 @@ TrackerList::TrackerList(PropertiesWidget *properties): QTreeWidget(), propertie header << tr("Peers"); header << tr("Message"); setHeaderItem(new QTreeWidgetItem(header)); - dht_item = new QTreeWidgetItem(QStringList() << "" << "** "+tr("[DHT]")+" **"); + dht_item = new QTreeWidgetItem(QStringList() << "" << "** [DHT] **"); insertTopLevelItem(0, dht_item); setRowColor(0, QColor("grey")); - pex_item = new QTreeWidgetItem(QStringList() << "" << "** "+tr("[PeX]")+" **"); + pex_item = new QTreeWidgetItem(QStringList() << "" << "** [PeX] **"); insertTopLevelItem(1, pex_item); setRowColor(1, QColor("grey")); - lsd_item = new QTreeWidgetItem(QStringList() << "" << "** "+tr("[LSD]")+" **"); + lsd_item = new QTreeWidgetItem(QStringList() << "" << "** [LSD] **"); insertTopLevelItem(2, lsd_item); setRowColor(2, QColor("grey")); diff --git a/src/rss/automatedrssdownloader.ui b/src/rss/automatedrssdownloader.ui index 563914dff..1c37d3a6f 100644 --- a/src/rss/automatedrssdownloader.ui +++ b/src/rss/automatedrssdownloader.ui @@ -283,7 +283,7 @@ false - ... + ... diff --git a/src/rss/rss_imp.cpp b/src/rss/rss_imp.cpp index dcd6fb1cd..0c0982915 100644 --- a/src/rss/rss_imp.cpp +++ b/src/rss/rss_imp.cpp @@ -206,7 +206,7 @@ void RSSImp::on_newFeedButton_clicked() return; if (m_feedList->hasFeed(newUrl)) { - QMessageBox::warning(this, tr("qBittorrent"), + QMessageBox::warning(this, "qBittorrent", tr("This rss feed is already in the list."), QMessageBox::Ok); return; diff --git a/src/searchengine/engineselectdlg.cpp b/src/searchengine/engineselectdlg.cpp index 42922a67a..47715b9bf 100644 --- a/src/searchengine/engineselectdlg.cpp +++ b/src/searchengine/engineselectdlg.cpp @@ -235,7 +235,7 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) { qDebug("Version to be installed: %.2f", new_version); if (!isUpdateNeeded(plugin_name, new_version)) { qDebug("Apparently update is not needed, we have a more recent version"); - QMessageBox::information(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("A more recent version of %1 search engine plugin is already installed.", "%1 is the name of the search engine").arg(plugin_name)); + QMessageBox::information(this, tr("Search plugin install")+" -- qBittorrent", tr("A more recent version of %1 search engine plugin is already installed.", "%1 is the name of the search engine").arg(plugin_name)); return; } // Process with install diff --git a/src/torrentimportdlg.ui b/src/torrentimportdlg.ui index 681c49e3c..497ec133e 100644 --- a/src/torrentimportdlg.ui +++ b/src/torrentimportdlg.ui @@ -78,7 +78,7 @@ - ... + ...