mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
Put some string placeholders between quotes
This commit is contained in:
@@ -706,7 +706,7 @@ void AddNewTorrentDialog::setupTreeview()
|
||||
|
||||
void AddNewTorrentDialog::handleDownloadFailed(const QString &url, const QString &reason)
|
||||
{
|
||||
MessageBoxRaised::critical(0, tr("Download Error"), QString("Cannot download %1: %2").arg(url).arg(reason));
|
||||
MessageBoxRaised::critical(0, tr("Download Error"), QString("Cannot download '%1': %2").arg(url).arg(reason));
|
||||
this->deleteLater();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
|
||||
DeletionConfirmationDlg(QWidget *parent, const int &size, const QString &name): QDialog(parent) {
|
||||
setupUi(this);
|
||||
if (size == 1)
|
||||
label->setText(tr("Are you sure you want to delete \"%1\" from the transfer list?", "Are you sure you want to delete \"ubuntu-linux-iso\" from the transfer list?").arg(name));
|
||||
label->setText(tr("Are you sure you want to delete '%1' from the transfer list?", "Are you sure you want to delete 'ubuntu-linux-iso' from the transfer list?").arg(name));
|
||||
else
|
||||
label->setText(tr("Are you sure you want to delete these %1 torrents from the transfer list?", "Are you sure you want to delete these 5 torrents from the transfer list?").arg(QString::number(size)));
|
||||
// Icons
|
||||
|
||||
@@ -634,13 +634,13 @@ void MainWindow::addTorrentFailed(const QString &error) const
|
||||
// called when a torrent has finished
|
||||
void MainWindow::finishedTorrent(BitTorrent::TorrentHandle *const torrent) const
|
||||
{
|
||||
showNotificationBaloon(tr("Download completion"), tr("%1 has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(torrent->name()));
|
||||
showNotificationBaloon(tr("Download completion"), tr("'%1' has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(torrent->name()));
|
||||
}
|
||||
|
||||
// Notification when disk is full
|
||||
void MainWindow::fullDiskError(BitTorrent::TorrentHandle *const torrent, QString msg) const
|
||||
{
|
||||
showNotificationBaloon(tr("I/O Error", "i.e: Input/Output Error"), tr("An I/O error occurred for torrent %1.\n Reason: %2", "e.g: An error occurred for torrent xxx.avi.\n Reason: disk is full.").arg(torrent->name()).arg(msg));
|
||||
showNotificationBaloon(tr("I/O Error", "i.e: Input/Output Error"), tr("An I/O error occurred for torrent '%1'.\n Reason: %2", "e.g: An error occurred for torrent 'xxx.avi'.\n Reason: disk is full.").arg(torrent->name()).arg(msg));
|
||||
}
|
||||
|
||||
void MainWindow::createKeyboardShortcuts()
|
||||
@@ -701,7 +701,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHand
|
||||
if (pref->recursiveDownloadDisabled()) return;
|
||||
// Get Torrent name
|
||||
QString torrent_name = torrent->name();
|
||||
QMessageBox confirmBox(QMessageBox::Question, tr("Recursive download confirmation"), tr("The torrent %1 contains torrent files, do you want to proceed with their download?").arg(torrent_name));
|
||||
QMessageBox confirmBox(QMessageBox::Question, tr("Recursive download confirmation"), tr("The torrent '%1' contains torrent files, do you want to proceed with their download?").arg(torrent_name));
|
||||
QPushButton *yes = confirmBox.addButton(tr("Yes"), QMessageBox::YesRole);
|
||||
/*QPushButton *no = */ confirmBox.addButton(tr("No"), QMessageBox::NoRole);
|
||||
QPushButton *never = confirmBox.addButton(tr("Never"), QMessageBox::NoRole);
|
||||
@@ -716,7 +716,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHand
|
||||
void MainWindow::handleDownloadFromUrlFailure(QString url, QString reason) const
|
||||
{
|
||||
// Display a message box
|
||||
showNotificationBaloon(tr("URL download error"), tr("Couldn't download file at URL: %1, reason: %2.").arg(url).arg(reason));
|
||||
showNotificationBaloon(tr("URL download error"), tr("Couldn't download file at URL '%1', reason: %2.").arg(url).arg(reason));
|
||||
}
|
||||
|
||||
void MainWindow::on_actionSet_global_upload_limit_triggered()
|
||||
@@ -1589,7 +1589,7 @@ bool MainWindow::addPythonPathToEnv()
|
||||
return true;
|
||||
QString python_path = Preferences::getPythonPath();
|
||||
if (!python_path.isEmpty()) {
|
||||
Logger::instance()->addMessage(tr("Python found in %1").arg(Utils::Fs::toNativePath(python_path)), Log::INFO);
|
||||
Logger::instance()->addMessage(tr("Python found in '%1'").arg(Utils::Fs::toNativePath(python_path)), Log::INFO);
|
||||
// Add it to PATH envvar
|
||||
QString path_envar = QString::fromLocal8Bit(qgetenv("PATH").constData());
|
||||
if (path_envar.isNull())
|
||||
|
||||
@@ -182,11 +182,11 @@ void PeerListWidget::showPeerListMenu(const QPoint&)
|
||||
foreach (const BitTorrent::PeerAddress &addr, peersList) {
|
||||
if (torrent->connectPeer(addr)) {
|
||||
qDebug("Adding peer %s...", qPrintable(addr.ip.toString()));
|
||||
Logger::instance()->addMessage(tr("Manually adding peer %1...").arg(addr.ip.toString()));
|
||||
Logger::instance()->addMessage(tr("Manually adding peer '%1'...").arg(addr.ip.toString()));
|
||||
peerCount++;
|
||||
}
|
||||
else {
|
||||
Logger::instance()->addMessage(tr("The peer %1 could not be added to this torrent.").arg(addr.ip.toString()), Log::WARNING);
|
||||
Logger::instance()->addMessage(tr("The peer '%1' could not be added to this torrent.").arg(addr.ip.toString()), Log::WARNING);
|
||||
}
|
||||
}
|
||||
if (peerCount < peersList.length())
|
||||
@@ -219,7 +219,7 @@ void PeerListWidget::banSelectedPeers()
|
||||
int row = m_proxyModel->mapToSource(index).row();
|
||||
QString ip = m_listModel->data(m_listModel->index(row, PeerListDelegate::IP_HIDDEN)).toString();
|
||||
qDebug("Banning peer %s...", ip.toLocal8Bit().data());
|
||||
Logger::instance()->addMessage(tr("Manually banning peer %1...").arg(ip));
|
||||
Logger::instance()->addMessage(tr("Manually banning peer '%1'...").arg(ip));
|
||||
BitTorrent::Session::instance()->banIP(ip);
|
||||
}
|
||||
// Refresh list
|
||||
|
||||
@@ -67,7 +67,7 @@ void PeersAdditionDlg::validateInput()
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(this, tr("Invalid peer"),
|
||||
tr("The peer %1 is invalid.").arg(peer),
|
||||
tr("The peer '%1' is invalid.").arg(peer),
|
||||
QMessageBox::Ok);
|
||||
m_peersList.clear();
|
||||
return;
|
||||
|
||||
@@ -377,7 +377,7 @@ void AutomatedRssDownloader::on_removeRuleBtn_clicked()
|
||||
// Ask for confirmation
|
||||
QString confirm_text;
|
||||
if (selection.count() == 1)
|
||||
confirm_text = tr("Are you sure you want to remove the download rule named %1?").arg(selection.first()->text());
|
||||
confirm_text = tr("Are you sure you want to remove the download rule named '%1'?").arg(selection.first()->text());
|
||||
else
|
||||
confirm_text = tr("Are you sure you want to remove the selected download rules?");
|
||||
if (QMessageBox::question(this, tr("Rule deletion confirmation"), confirm_text, QMessageBox::Yes, QMessageBox::No) != QMessageBox::Yes)
|
||||
|
||||
@@ -365,12 +365,12 @@ void RssFeed::downloadArticleTorrentIfMatching(RssDownloadRuleList* rules, const
|
||||
// Download the torrent
|
||||
const QString& torrent_url = article->torrentUrl();
|
||||
if (torrent_url.isEmpty()) {
|
||||
Logger::instance()->addMessage(tr("Automatic download %1 from %2 RSS feed failed because it doesn't contain a torrent or a magnet link...").arg(article->title()).arg(displayName()), Log::WARNING);
|
||||
Logger::instance()->addMessage(tr("Automatic download of '%1' from '%2' RSS feed failed because it doesn't contain a torrent or a magnet link...").arg(article->title()).arg(displayName()), Log::WARNING);
|
||||
article->markAsRead();
|
||||
return;
|
||||
}
|
||||
|
||||
Logger::instance()->addMessage(tr("Automatically downloading %1 torrent from %2 RSS feed...").arg(article->title()).arg(displayName()));
|
||||
Logger::instance()->addMessage(tr("Automatically downloading '%1' torrent from '%2' RSS feed...").arg(article->title()).arg(displayName()));
|
||||
connect(BitTorrent::Session::instance(), SIGNAL(downloadFromUrlFinished(QString)), article.data(), SLOT(handleTorrentDownloadSuccess(const QString&)), Qt::UniqueConnection);
|
||||
connect(article.data(), SIGNAL(articleWasRead()), SLOT(handleArticleStateChanged()), Qt::UniqueConnection);
|
||||
|
||||
|
||||
@@ -498,7 +498,7 @@ void RssParser::parseFeed(const ParsingJob& job)
|
||||
}
|
||||
|
||||
if (!found_channel) {
|
||||
reportFailure(job, tr("Invalid RSS feed at %1.").arg(job.feedUrl));
|
||||
reportFailure(job, tr("Invalid RSS feed at '%1'.").arg(job.feedUrl));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,9 +86,9 @@ void TorrentImportDlg::on_browseContentBtn_clicked()
|
||||
QString filter;
|
||||
if (!extension.isEmpty()) {
|
||||
extension = extension.toUpper();
|
||||
filter = tr("%1 Files", "%1 is a file extension (e.g. PDF)").arg(extension) + " (*." + extension + ")";
|
||||
filter = tr("'%1' Files", "%1 is a file extension (e.g. PDF)").arg(extension) + " (*." + extension + ")";
|
||||
}
|
||||
m_contentPath = QFileDialog::getOpenFileName(this, tr("Please provide the location of %1", "%1 is a file name").arg(file_name), default_dir, filter);
|
||||
m_contentPath = QFileDialog::getOpenFileName(this, tr("Please provide the location of '%1'", "%1 is a file name").arg(file_name), default_dir, filter);
|
||||
if (m_contentPath.isEmpty() || !QFile(m_contentPath).exists()) {
|
||||
m_contentPath = QString::null;
|
||||
ui->importBtn->setEnabled(false);
|
||||
|
||||
@@ -630,12 +630,12 @@ void TrackerFiltersList::handleFavicoDownload(const QString& url, const QString&
|
||||
bool invalid = (sizes.size() > 0 ? icon.pixmap(sizes.first()).isNull() : true);
|
||||
if (invalid) {
|
||||
if (url.endsWith(".ico", Qt::CaseInsensitive)) {
|
||||
Logger::instance()->addMessage(tr("Couldn't decode favicon for URL `%1`. Trying to download favicon in PNG format.").arg(url),
|
||||
Logger::instance()->addMessage(tr("Couldn't decode favicon for URL '%1'. Trying to download favicon in PNG format.").arg(url),
|
||||
Log::WARNING);
|
||||
downloadFavicon(url.left(url.size() - 4) + ".png");
|
||||
}
|
||||
else {
|
||||
Logger::instance()->addMessage(tr("Couldn't decode favicon for URL `%1`.").arg(url), Log::WARNING);
|
||||
Logger::instance()->addMessage(tr("Couldn't decode favicon for URL '%1'.").arg(url), Log::WARNING);
|
||||
}
|
||||
Utils::Fs::forceRemove(filePath);
|
||||
}
|
||||
@@ -649,7 +649,7 @@ void TrackerFiltersList::handleFavicoFailure(const QString& url, const QString&
|
||||
{
|
||||
// Don't use getHost() on the url here. Print the full url. The error might relate to
|
||||
// that.
|
||||
Logger::instance()->addMessage(tr("Couldn't download favicon for URL `%1`. Reason: `%2`").arg(url).arg(error),
|
||||
Logger::instance()->addMessage(tr("Couldn't download favicon for URL '%1'. Reason: %2").arg(url).arg(error),
|
||||
Log::WARNING);
|
||||
if (url.endsWith(".ico", Qt::CaseInsensitive))
|
||||
downloadFavicon(url.left(url.size() - 4) + ".png");
|
||||
|
||||
Reference in New Issue
Block a user