From 581d544f61f2ed084bb3a399d8773072be009931 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Fri, 4 Sep 2015 22:56:08 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20typos.=20Make=20`=C3=ACTP`=20untranslatab?= =?UTF-8?q?le.=20Use=20American=20variation=20of=20words.=20Closes=20#3654?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/bittorrent/peerinfo.cpp | 3 ++- src/core/bittorrent/private/filterparserthread.cpp | 6 +++--- src/core/bittorrent/session.cpp | 7 ++++--- src/core/net/downloadhandler.cpp | 2 +- src/core/unicodestrings.h | 1 + src/gui/properties/peerlistwidget.cpp | 3 ++- src/gui/properties/propertieswidget.cpp | 10 +++++----- src/gui/properties/propertieswidget.h | 2 +- 8 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/core/bittorrent/peerinfo.cpp b/src/core/bittorrent/peerinfo.cpp index a82b9aa87..c7e9816ee 100644 --- a/src/core/bittorrent/peerinfo.cpp +++ b/src/core/bittorrent/peerinfo.cpp @@ -28,6 +28,7 @@ #include "core/net/geoipmanager.h" #include "core/utils/string.h" +#include "core/unicodestrings.h" #include "peerinfo.h" namespace libt = libtorrent; @@ -238,7 +239,7 @@ QBitArray PeerInfo::pieces() const QString PeerInfo::connectionType() const { if (m_nativeInfo.flags & libt::peer_info::utp_socket) - return QString::fromUtf8("μTP"); + return QString::fromUtf8(C_UTP); QString connection; switch(m_nativeInfo.connection_type) { diff --git a/src/core/bittorrent/private/filterparserthread.cpp b/src/core/bittorrent/private/filterparserthread.cpp index 05b5f5ede..18de2fae6 100644 --- a/src/core/bittorrent/private/filterparserthread.cpp +++ b/src/core/bittorrent/private/filterparserthread.cpp @@ -62,7 +62,7 @@ int FilterParserThread::parseDATFilterFile(QString m_filePath, libt::ip_filter & if (!file.exists()) return ruleCount; if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - Logger::instance()->addMessage(tr("I/O Error: Could not open ip filer file in read mode."), Log::CRITICAL); + Logger::instance()->addMessage(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL); return ruleCount; } @@ -156,7 +156,7 @@ int FilterParserThread::parseP2PFilterFile(QString m_filePath, libt::ip_filter & if (!file.exists()) return ruleCount; if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - Logger::instance()->addMessage(tr("I/O Error: Could not open ip filer file in read mode."), Log::CRITICAL); + Logger::instance()->addMessage(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL); return ruleCount; } @@ -264,7 +264,7 @@ int FilterParserThread::parseP2BFilterFile(QString m_filePath, libt::ip_filter & if (!file.exists()) return ruleCount; if (!file.open(QIODevice::ReadOnly)) { - Logger::instance()->addMessage(tr("I/O Error: Could not open ip filer file in read mode."), Log::CRITICAL); + Logger::instance()->addMessage(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL); return ruleCount; } diff --git a/src/core/bittorrent/session.cpp b/src/core/bittorrent/session.cpp index 9a866e288..e0458dc14 100644 --- a/src/core/bittorrent/session.cpp +++ b/src/core/bittorrent/session.cpp @@ -68,6 +68,7 @@ using namespace BitTorrent; #include "core/utils/misc.h" #include "core/utils/fs.h" #include "core/utils/string.h" +#include "core/unicodestrings.h" #include "core/logger.h" #include "core/preferences.h" #include "core/torrentfilter.h" @@ -1764,7 +1765,7 @@ void Session::initResumeFolder() // Enable IP Filtering void Session::enableIPFilter(const QString &filterPath, bool force) { - qDebug("Enabling IPFiler"); + qDebug("Enabling IPFilter"); if (!m_filterParser) { m_filterParser = new FilterParserThread(m_nativeSession, this); connect(m_filterParser.data(), SIGNAL(IPFilterParsed(int)), SLOT(handleIPFilterParsed(int))); @@ -2202,10 +2203,10 @@ void Session::handlePeerBlockedAlert(libt::peer_blocked_alert *p) reason = tr("because it has a low port.", "this peer was blocked because it has a low port."); break; case libt::peer_blocked_alert::utp_disabled: - reason = tr("because μTP is disabled.", "this peer was blocked because μTP is disabled."); + reason = trUtf8("because %1 is disabled.", "this peer was blocked because uTP is disabled.").arg(QString::fromUtf8(C_UTP)); // don't translate μTP break; case libt::peer_blocked_alert::tcp_disabled: - reason = tr("because TCP is disabled.", "this peer was blocked because TCP is disabled."); + reason = tr("because %1 is disabled.", "this peer was blocked because TCP is disabled.").arg("TCP"); // don't translate TCP break; } diff --git a/src/core/net/downloadhandler.cpp b/src/core/net/downloadhandler.cpp index d51155aef..b9a557348 100644 --- a/src/core/net/downloadhandler.cpp +++ b/src/core/net/downloadhandler.cpp @@ -221,7 +221,7 @@ QString errorCodeToString(QNetworkReply::NetworkError status) case QNetworkReply::ProxyTimeoutError: return QObject::tr("The connection to the proxy timed out or the proxy did not reply in time to the request sent"); case QNetworkReply::ProxyAuthenticationRequiredError: - return QObject::tr("The proxy requires authentication in order to honour the request but did not accept any credentials offered"); + return QObject::tr("The proxy requires authentication in order to honor the request but did not accept any credentials offered"); case QNetworkReply::ContentAccessDenied: return QObject::tr("The access to the remote content was denied (401)"); case QNetworkReply::ContentOperationNotPermittedError: diff --git a/src/core/unicodestrings.h b/src/core/unicodestrings.h index 5b0851a32..730af5add 100644 --- a/src/core/unicodestrings.h +++ b/src/core/unicodestrings.h @@ -38,6 +38,7 @@ const char C_INFINITY[] = "∞"; const char C_UP[] = "▲"; const char C_DOWN[] = "▼"; const char C_COPYRIGHT[] = "©"; +const char C_UTP[] = "μTP"; const char C_LOCALE_ENGLISH[] = "English"; const char C_LOCALE_ENGLISH_AUSTRALIA[] = "English(Australia)"; const char C_LOCALE_ENGLISH_UNITEDKINGDOM[] = "English(United Kingdom)"; diff --git a/src/gui/properties/peerlistwidget.cpp b/src/gui/properties/peerlistwidget.cpp index 1dabf529d..32efd2436 100644 --- a/src/gui/properties/peerlistwidget.cpp +++ b/src/gui/properties/peerlistwidget.cpp @@ -41,6 +41,7 @@ #include "core/bittorrent/peerinfo.h" #include "core/preferences.h" #include "core/logger.h" +#include "core/unicodestrings.h" #include "propertieswidget.h" #include "core/net/geoipmanager.h" #include "peersadditiondlg.h" @@ -477,7 +478,7 @@ void PeerListWidget::getFlags(const BitTorrent::PeerInfo &peer, QString& flags, if (peer.useUTPSocket()) { flags += "P "; - tooltip += QString::fromUtf8("μTP"); + tooltip += QString::fromUtf8(C_UTP); tooltip += ", "; } diff --git a/src/gui/properties/propertieswidget.cpp b/src/gui/properties/propertieswidget.cpp index a7451e545..c738673c4 100644 --- a/src/gui/properties/propertieswidget.cpp +++ b/src/gui/properties/propertieswidget.cpp @@ -80,10 +80,10 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra filesList->setItemDelegate(PropDelegate); filesList->setSortingEnabled(true); // Torrent content filtering - m_contentFilerLine = new LineEdit(this); - m_contentFilerLine->setPlaceholderText(tr("Filter files...")); - connect(m_contentFilerLine, SIGNAL(textChanged(QString)), this, SLOT(filterText(QString))); - contentFilterLayout->insertWidget(4, m_contentFilerLine); + m_contentFilterLine = new LineEdit(this); + m_contentFilterLine->setPlaceholderText(tr("Filter files...")); + connect(m_contentFilterLine, SIGNAL(textChanged(QString)), this, SLOT(filterText(QString))); + contentFilterLayout->insertWidget(4, m_contentFilterLine); // SIGNAL/SLOTS connect(filesList, SIGNAL(clicked(const QModelIndex&)), filesList, SLOT(edit(const QModelIndex&))); @@ -229,7 +229,7 @@ void PropertiesWidget::clear() { reannounce_lbl->clear(); shareRatio->clear(); listWebSeeds->clear(); - m_contentFilerLine->clear(); + m_contentFilterLine->clear(); PropListModel->model()->clear(); label_eta_val->clear(); label_seeds_val->clear(); diff --git a/src/gui/properties/propertieswidget.h b/src/gui/properties/propertieswidget.h index 5222db46b..3c845e0dc 100644 --- a/src/gui/properties/propertieswidget.h +++ b/src/gui/properties/propertieswidget.h @@ -120,7 +120,7 @@ private: DownloadedPiecesBar *downloaded_pieces; PieceAvailabilityBar *pieces_availability; PropTabBar *m_tabBar; - LineEdit *m_contentFilerLine; + LineEdit *m_contentFilterLine; QShortcut *editHotkeyFile; QShortcut *editHotkeyWeb; QShortcut *deleteHotkeyWeb;