Browse Source

Fix typos. Make `ìTP` untranslatable. Use American variation of words. Closes #3654.

adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
581d544f61
  1. 3
      src/core/bittorrent/peerinfo.cpp
  2. 6
      src/core/bittorrent/private/filterparserthread.cpp
  3. 7
      src/core/bittorrent/session.cpp
  4. 2
      src/core/net/downloadhandler.cpp
  5. 1
      src/core/unicodestrings.h
  6. 3
      src/gui/properties/peerlistwidget.cpp
  7. 10
      src/gui/properties/propertieswidget.cpp
  8. 2
      src/gui/properties/propertieswidget.h

3
src/core/bittorrent/peerinfo.cpp

@ -28,6 +28,7 @@
#include "core/net/geoipmanager.h" #include "core/net/geoipmanager.h"
#include "core/utils/string.h" #include "core/utils/string.h"
#include "core/unicodestrings.h"
#include "peerinfo.h" #include "peerinfo.h"
namespace libt = libtorrent; namespace libt = libtorrent;
@ -238,7 +239,7 @@ QBitArray PeerInfo::pieces() const
QString PeerInfo::connectionType() const QString PeerInfo::connectionType() const
{ {
if (m_nativeInfo.flags & libt::peer_info::utp_socket) if (m_nativeInfo.flags & libt::peer_info::utp_socket)
return QString::fromUtf8("μTP"); return QString::fromUtf8(C_UTP);
QString connection; QString connection;
switch(m_nativeInfo.connection_type) { switch(m_nativeInfo.connection_type) {

6
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.exists()) return ruleCount;
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { 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; return ruleCount;
} }
@ -156,7 +156,7 @@ int FilterParserThread::parseP2PFilterFile(QString m_filePath, libt::ip_filter &
if (!file.exists()) return ruleCount; if (!file.exists()) return ruleCount;
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { 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; return ruleCount;
} }
@ -264,7 +264,7 @@ int FilterParserThread::parseP2BFilterFile(QString m_filePath, libt::ip_filter &
if (!file.exists()) return ruleCount; if (!file.exists()) return ruleCount;
if (!file.open(QIODevice::ReadOnly)) { 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; return ruleCount;
} }

7
src/core/bittorrent/session.cpp

@ -68,6 +68,7 @@ using namespace BitTorrent;
#include "core/utils/misc.h" #include "core/utils/misc.h"
#include "core/utils/fs.h" #include "core/utils/fs.h"
#include "core/utils/string.h" #include "core/utils/string.h"
#include "core/unicodestrings.h"
#include "core/logger.h" #include "core/logger.h"
#include "core/preferences.h" #include "core/preferences.h"
#include "core/torrentfilter.h" #include "core/torrentfilter.h"
@ -1764,7 +1765,7 @@ void Session::initResumeFolder()
// Enable IP Filtering // Enable IP Filtering
void Session::enableIPFilter(const QString &filterPath, bool force) void Session::enableIPFilter(const QString &filterPath, bool force)
{ {
qDebug("Enabling IPFiler"); qDebug("Enabling IPFilter");
if (!m_filterParser) { if (!m_filterParser) {
m_filterParser = new FilterParserThread(m_nativeSession, this); m_filterParser = new FilterParserThread(m_nativeSession, this);
connect(m_filterParser.data(), SIGNAL(IPFilterParsed(int)), SLOT(handleIPFilterParsed(int))); 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."); reason = tr("because it has a low port.", "this peer was blocked because it has a low port.");
break; break;
case libt::peer_blocked_alert::utp_disabled: 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; break;
case libt::peer_blocked_alert::tcp_disabled: 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; break;
} }

2
src/core/net/downloadhandler.cpp

@ -221,7 +221,7 @@ QString errorCodeToString(QNetworkReply::NetworkError status)
case QNetworkReply::ProxyTimeoutError: 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"); 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: 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: case QNetworkReply::ContentAccessDenied:
return QObject::tr("The access to the remote content was denied (401)"); return QObject::tr("The access to the remote content was denied (401)");
case QNetworkReply::ContentOperationNotPermittedError: case QNetworkReply::ContentOperationNotPermittedError:

1
src/core/unicodestrings.h

@ -38,6 +38,7 @@ const char C_INFINITY[] = "∞";
const char C_UP[] = ""; const char C_UP[] = "";
const char C_DOWN[] = ""; const char C_DOWN[] = "";
const char C_COPYRIGHT[] = "©"; const char C_COPYRIGHT[] = "©";
const char C_UTP[] = "μTP";
const char C_LOCALE_ENGLISH[] = "English"; const char C_LOCALE_ENGLISH[] = "English";
const char C_LOCALE_ENGLISH_AUSTRALIA[] = "English(Australia)"; const char C_LOCALE_ENGLISH_AUSTRALIA[] = "English(Australia)";
const char C_LOCALE_ENGLISH_UNITEDKINGDOM[] = "English(United Kingdom)"; const char C_LOCALE_ENGLISH_UNITEDKINGDOM[] = "English(United Kingdom)";

3
src/gui/properties/peerlistwidget.cpp

@ -41,6 +41,7 @@
#include "core/bittorrent/peerinfo.h" #include "core/bittorrent/peerinfo.h"
#include "core/preferences.h" #include "core/preferences.h"
#include "core/logger.h" #include "core/logger.h"
#include "core/unicodestrings.h"
#include "propertieswidget.h" #include "propertieswidget.h"
#include "core/net/geoipmanager.h" #include "core/net/geoipmanager.h"
#include "peersadditiondlg.h" #include "peersadditiondlg.h"
@ -477,7 +478,7 @@ void PeerListWidget::getFlags(const BitTorrent::PeerInfo &peer, QString& flags,
if (peer.useUTPSocket()) { if (peer.useUTPSocket()) {
flags += "P "; flags += "P ";
tooltip += QString::fromUtf8("μTP"); tooltip += QString::fromUtf8(C_UTP);
tooltip += ", "; tooltip += ", ";
} }

10
src/gui/properties/propertieswidget.cpp

@ -80,10 +80,10 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra
filesList->setItemDelegate(PropDelegate); filesList->setItemDelegate(PropDelegate);
filesList->setSortingEnabled(true); filesList->setSortingEnabled(true);
// Torrent content filtering // Torrent content filtering
m_contentFilerLine = new LineEdit(this); m_contentFilterLine = new LineEdit(this);
m_contentFilerLine->setPlaceholderText(tr("Filter files...")); m_contentFilterLine->setPlaceholderText(tr("Filter files..."));
connect(m_contentFilerLine, SIGNAL(textChanged(QString)), this, SLOT(filterText(QString))); connect(m_contentFilterLine, SIGNAL(textChanged(QString)), this, SLOT(filterText(QString)));
contentFilterLayout->insertWidget(4, m_contentFilerLine); contentFilterLayout->insertWidget(4, m_contentFilterLine);
// SIGNAL/SLOTS // SIGNAL/SLOTS
connect(filesList, SIGNAL(clicked(const QModelIndex&)), filesList, SLOT(edit(const QModelIndex&))); connect(filesList, SIGNAL(clicked(const QModelIndex&)), filesList, SLOT(edit(const QModelIndex&)));
@ -229,7 +229,7 @@ void PropertiesWidget::clear() {
reannounce_lbl->clear(); reannounce_lbl->clear();
shareRatio->clear(); shareRatio->clear();
listWebSeeds->clear(); listWebSeeds->clear();
m_contentFilerLine->clear(); m_contentFilterLine->clear();
PropListModel->model()->clear(); PropListModel->model()->clear();
label_eta_val->clear(); label_eta_val->clear();
label_seeds_val->clear(); label_seeds_val->clear();

2
src/gui/properties/propertieswidget.h

@ -120,7 +120,7 @@ private:
DownloadedPiecesBar *downloaded_pieces; DownloadedPiecesBar *downloaded_pieces;
PieceAvailabilityBar *pieces_availability; PieceAvailabilityBar *pieces_availability;
PropTabBar *m_tabBar; PropTabBar *m_tabBar;
LineEdit *m_contentFilerLine; LineEdit *m_contentFilterLine;
QShortcut *editHotkeyFile; QShortcut *editHotkeyFile;
QShortcut *editHotkeyWeb; QShortcut *editHotkeyWeb;
QShortcut *deleteHotkeyWeb; QShortcut *deleteHotkeyWeb;

Loading…
Cancel
Save