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

This commit is contained in:
sledgehammer999 2015-09-04 23:11:10 +03:00
commit a7528ec27a
7 changed files with 18 additions and 15 deletions

View file

@ -276,7 +276,7 @@ QString DownloadThread::errorCodeToString(QNetworkReply::NetworkError status) {
case QNetworkReply::ProxyTimeoutError:
return tr("The connection to the proxy timed out or the proxy did not reply in time to the request sent");
case QNetworkReply::ProxyAuthenticationRequiredError:
return tr("The proxy requires authentication in order to honour the request but did not accept any credentials offered");
return tr("The proxy requires authentication in order to honor the request but did not accept any credentials offered");
case QNetworkReply::ContentAccessDenied:
return tr("The access to the remote content was denied (401)");
case QNetworkReply::ContentOperationNotPermittedError:

View file

@ -51,7 +51,7 @@ int FilterParserThread::parseDATFilterFile(QString filePath, libtorrent::ip_filt
QFile file(filePath);
if (file.exists()) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
std::cerr << "I/O Error: Could not open ip filer file in read mode." << std::endl;
std::cerr << "I/O Error: Could not open ip filter file in read mode." << std::endl;
return ruleCount;
}
unsigned int nbLine = 0;
@ -137,7 +137,7 @@ int FilterParserThread::parseP2PFilterFile(QString filePath, libtorrent::ip_filt
QFile file(filePath);
if (file.exists()) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
std::cerr << "I/O Error: Could not open ip filer file in read mode." << std::endl;
std::cerr << "I/O Error: Could not open ip filter file in read mode." << std::endl;
return ruleCount;
}
unsigned int nbLine = 0;
@ -229,7 +229,7 @@ int FilterParserThread::parseP2BFilterFile(QString filePath, libtorrent::ip_filt
QFile file(filePath);
if (file.exists()) {
if (!file.open(QIODevice::ReadOnly)) {
std::cerr << "I/O Error: Could not open ip filer file in read mode." << std::endl;
std::cerr << "I/O Error: Could not open ip filter file in read mode." << std::endl;
return ruleCount;
}
QDataStream stream(&file);

View file

@ -52,6 +52,7 @@
#include "scannedfoldersmodel.h"
#include "qtracker.h"
#include "logger.h"
#include "unicodestrings.h"
#ifndef DISABLE_GUI
#include "shutdownconfirm.h"
#include "geoipmanager.h"
@ -1957,7 +1958,7 @@ void QBtSession::updateRatioTimer()
// Enable IP Filtering
void QBtSession::enableIPFilter(const QString &filter_path, bool force) {
qDebug("Enabling IPFiler");
qDebug("Enabling IPFilter");
if (!filterParser) {
filterParser = new FilterParserThread(this, s);
connect(filterParser.data(), SIGNAL(IPFilterParsed(int)), SLOT(handleIPFilterParsed(int)));
@ -2568,10 +2569,10 @@ void QBtSession::handlePeerBlockedAlert(libtorrent::peer_blocked_alert* p)
reason = tr("because it has a low port.", "this peer was blocked because it has a low port.");
break;
case 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 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;
}

View file

@ -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)";

View file

@ -40,6 +40,7 @@
#include "iconprovider.h"
#include "qtorrenthandle.h"
#include "logger.h"
#include "unicodestrings.h"
#include <QStandardItemModel>
#include <QSortFilterProxyModel>
#include <QSet>
@ -460,7 +461,7 @@ QString PeerListWidget::getConnectionString(const peer_info& peer)
#else
if (peer.flags & peer_info::utp_socket) {
#endif
return QString::fromUtf8("μTP");
return QString::fromUtf8(C_UTP);
}
QString connection;
@ -578,7 +579,7 @@ void PeerListWidget::getFlags(const peer_info& peer, QString& flags, QString& to
if (peer.flags & peer_info::utp_socket) {
#endif
flags += "P ";
tooltip += QString::fromUtf8("μTP");
tooltip += QString::fromUtf8(C_UTP);
tooltip += ", ";
}

View file

@ -79,10 +79,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&)));
@ -227,7 +227,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();

View file

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