Put some string placeholders between quotes

This commit is contained in:
Gabriele 2015-08-08 15:19:46 +02:00
parent 70f2086202
commit 420fa82e8d
14 changed files with 39 additions and 39 deletions

View file

@ -131,7 +131,7 @@ void Application::sendNotificationEmail(BitTorrent::TorrentHandle *const torrent
Net::Smtp *sender = new Net::Smtp; Net::Smtp *sender = new Net::Smtp;
sender->sendMail("notification@qbittorrent.org", sender->sendMail("notification@qbittorrent.org",
Preferences::instance()->getMailNotificationEmail(), Preferences::instance()->getMailNotificationEmail(),
QObject::tr("[qBittorrent] %1 has finished downloading").arg(torrent->name()), QObject::tr("[qBittorrent] '%1' has finished downloading").arg(torrent->name()),
content); content);
} }

View file

@ -351,7 +351,7 @@ void Session::setSessionSettings()
libt::session_settings sessionSettings = m_nativeSession->settings(); libt::session_settings sessionSettings = m_nativeSession->settings();
sessionSettings.user_agent = "qBittorrent " VERSION; sessionSettings.user_agent = "qBittorrent " VERSION;
//std::cout << "HTTP User-Agent is " << sessionSettings.user_agent << std::endl; //std::cout << "HTTP User-Agent is " << sessionSettings.user_agent << std::endl;
logger->addMessage(tr("HTTP User-Agent is %1").arg(Utils::String::fromStdString(sessionSettings.user_agent))); logger->addMessage(tr("HTTP User-Agent is '%1'").arg(Utils::String::fromStdString(sessionSettings.user_agent)));
sessionSettings.upnp_ignore_nonrouters = true; sessionSettings.upnp_ignore_nonrouters = true;
sessionSettings.use_dht_as_fallback = false; sessionSettings.use_dht_as_fallback = false;
@ -721,13 +721,13 @@ void Session::processBigRatios()
if ((ratio <= TorrentHandle::MAX_RATIO) && (ratio >= ratioLimit)) { if ((ratio <= TorrentHandle::MAX_RATIO) && (ratio >= ratioLimit)) {
Logger* const logger = Logger::instance(); Logger* const logger = Logger::instance();
if (m_highRatioAction == MaxRatioAction::Remove) { if (m_highRatioAction == MaxRatioAction::Remove) {
logger->addMessage(tr("%1 reached the maximum ratio you set. Removing...").arg(torrent->name())); logger->addMessage(tr("'%1' reached the maximum ratio you set. Removing...").arg(torrent->name()));
deleteTorrent(torrent->hash()); deleteTorrent(torrent->hash());
} }
else { else {
// Pause it // Pause it
if (!torrent->isPaused()) { if (!torrent->isPaused()) {
logger->addMessage(tr("%1 reached the maximum ratio you set. Pausing...").arg(torrent->name())); logger->addMessage(tr("'%1' reached the maximum ratio you set. Pausing...").arg(torrent->name()));
torrent->pause(); torrent->pause();
} }
} }
@ -1212,7 +1212,7 @@ void Session::exportTorrentFiles(QString path)
QDir exportDir(path); QDir exportDir(path);
if (!exportDir.exists()) { if (!exportDir.exists()) {
if (!exportDir.mkpath(exportDir.absolutePath())) { if (!exportDir.mkpath(exportDir.absolutePath())) {
Logger::instance()->addMessage(tr("Error: Could not create torrent export directory: %1").arg(exportDir.absolutePath()), Log::CRITICAL); Logger::instance()->addMessage(tr("Error: Could not create torrent export directory: '%1'").arg(exportDir.absolutePath()), Log::CRITICAL);
return; return;
} }
} }
@ -1240,7 +1240,7 @@ void Session::exportTorrentFiles(QString path)
QFile::copy(srcPath, dstPath); QFile::copy(srcPath, dstPath);
} }
else { else {
Logger::instance()->addMessage(tr("Error: could not export torrent %1, maybe it has not metadata yet.").arg(torrent->hash()), Log::CRITICAL); Logger::instance()->addMessage(tr("Error: could not export torrent '%1', maybe it has not metadata yet.").arg(torrent->hash()), Log::CRITICAL);
} }
} }
} }
@ -1691,7 +1691,7 @@ void Session::handleTorrentFinished(TorrentHandle *const torrent)
} }
else { else {
qDebug("Caught error loading torrent"); qDebug("Caught error loading torrent");
Logger::instance()->addMessage(tr("Unable to decode %1 torrent file.").arg(Utils::Fs::toNativePath(torrentFullpath)), Log::CRITICAL); Logger::instance()->addMessage(tr("Unable to decode '%1' torrent file.").arg(Utils::Fs::toNativePath(torrentFullpath)), Log::CRITICAL);
} }
} }
} }
@ -1797,8 +1797,8 @@ void Session::recursiveTorrentDownload(const InfoHash &hash)
const QString torrentRelpath = torrent->filePath(i); const QString torrentRelpath = torrent->filePath(i);
if (torrentRelpath.endsWith(".torrent")) { if (torrentRelpath.endsWith(".torrent")) {
Logger::instance()->addMessage( Logger::instance()->addMessage(
tr("Recursive download of file %1 embedded in torrent %2" tr("Recursive download of file '%1' embedded in torrent '%2'"
, "Recursive download of test.torrent embedded in torrent test2") , "Recursive download of 'test.torrent' embedded in torrent 'test2'")
.arg(Utils::Fs::toNativePath(torrentRelpath)).arg(torrent->name())); .arg(Utils::Fs::toNativePath(torrentRelpath)).arg(torrent->name()));
const QString torrentFullpath = torrent->savePath() + "/" + torrentRelpath; const QString torrentFullpath = torrent->savePath() + "/" + torrentRelpath;
@ -2106,7 +2106,7 @@ void Session::handleAddTorrentAlert(libtorrent::add_torrent_alert *p)
exportTorrentFile(torrent); exportTorrentFile(torrent);
} }
else { else {
logger->addMessage(tr("Couldn't save %1.torrent").arg(torrent->hash()), Log::CRITICAL); logger->addMessage(tr("Couldn't save '%1.torrent'").arg(torrent->hash()), Log::CRITICAL);
} }
} }
@ -2223,7 +2223,7 @@ void Session::handlePeerBanAlert(libt::peer_ban_alert *p)
void Session::handleUrlSeedAlert(libt::url_seed_alert *p) void Session::handleUrlSeedAlert(libt::url_seed_alert *p)
{ {
Logger::instance()->addMessage(tr("URL seed lookup failed for url: %1, message: %2").arg(Utils::String::fromStdString(p->url)).arg(Utils::String::fromStdString(p->message())), Log::CRITICAL); Logger::instance()->addMessage(tr("URL seed lookup failed for URL: '%1', message: %2").arg(Utils::String::fromStdString(p->url)).arg(Utils::String::fromStdString(p->message())), Log::CRITICAL);
} }
void Session::handleListenSucceededAlert(libt::listen_succeeded_alert *p) void Session::handleListenSucceededAlert(libt::listen_succeeded_alert *p)

View file

@ -1491,13 +1491,13 @@ void TorrentHandle::handleFastResumeRejectedAlert(libtorrent::fastresume_rejecte
updateStatus(); updateStatus();
if (p->error.value() == libt::errors::mismatching_file_size) { if (p->error.value() == libt::errors::mismatching_file_size) {
// Mismatching file size (files were probably moved) // Mismatching file size (files were probably moved)
logger->addMessage(tr("File sizes mismatch for torrent %1, pausing it.").arg(name()), Log::CRITICAL); logger->addMessage(tr("File sizes mismatch for torrent '%1', pausing it.").arg(name()), Log::CRITICAL);
m_hasMissingFiles = true; m_hasMissingFiles = true;
if (!isPaused()) if (!isPaused())
pause(); pause();
} }
else { else {
logger->addMessage(tr("Fast resume data was rejected for torrent %1. Reason: %2. Checking again...") logger->addMessage(tr("Fast resume data was rejected for torrent '%1'. Reason: %2. Checking again...")
.arg(name()).arg(Utils::String::fromStdString(p->message())), Log::CRITICAL); .arg(name()).arg(Utils::String::fromStdString(p->message())), Log::CRITICAL);
} }
} }

View file

@ -706,7 +706,7 @@ void AddNewTorrentDialog::setupTreeview()
void AddNewTorrentDialog::handleDownloadFailed(const QString &url, const QString &reason) 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(); this->deleteLater();
} }

View file

@ -45,7 +45,7 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
DeletionConfirmationDlg(QWidget *parent, const int &size, const QString &name): QDialog(parent) { DeletionConfirmationDlg(QWidget *parent, const int &size, const QString &name): QDialog(parent) {
setupUi(this); setupUi(this);
if (size == 1) 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 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))); 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 // Icons

View file

@ -634,13 +634,13 @@ void MainWindow::addTorrentFailed(const QString &error) const
// called when a torrent has finished // called when a torrent has finished
void MainWindow::finishedTorrent(BitTorrent::TorrentHandle *const torrent) const 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 // Notification when disk is full
void MainWindow::fullDiskError(BitTorrent::TorrentHandle *const torrent, QString msg) const 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() void MainWindow::createKeyboardShortcuts()
@ -701,7 +701,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHand
if (pref->recursiveDownloadDisabled()) return; if (pref->recursiveDownloadDisabled()) return;
// Get Torrent name // Get Torrent name
QString torrent_name = 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 *yes = confirmBox.addButton(tr("Yes"), QMessageBox::YesRole);
/*QPushButton *no = */ confirmBox.addButton(tr("No"), QMessageBox::NoRole); /*QPushButton *no = */ confirmBox.addButton(tr("No"), QMessageBox::NoRole);
QPushButton *never = confirmBox.addButton(tr("Never"), 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 void MainWindow::handleDownloadFromUrlFailure(QString url, QString reason) const
{ {
// Display a message box // 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() void MainWindow::on_actionSet_global_upload_limit_triggered()
@ -1589,7 +1589,7 @@ bool MainWindow::addPythonPathToEnv()
return true; return true;
QString python_path = Preferences::getPythonPath(); QString python_path = Preferences::getPythonPath();
if (!python_path.isEmpty()) { 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 // Add it to PATH envvar
QString path_envar = QString::fromLocal8Bit(qgetenv("PATH").constData()); QString path_envar = QString::fromLocal8Bit(qgetenv("PATH").constData());
if (path_envar.isNull()) if (path_envar.isNull())

View file

@ -182,11 +182,11 @@ void PeerListWidget::showPeerListMenu(const QPoint&)
foreach (const BitTorrent::PeerAddress &addr, peersList) { foreach (const BitTorrent::PeerAddress &addr, peersList) {
if (torrent->connectPeer(addr)) { if (torrent->connectPeer(addr)) {
qDebug("Adding peer %s...", qPrintable(addr.ip.toString())); 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++; peerCount++;
} }
else { 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()) if (peerCount < peersList.length())
@ -219,7 +219,7 @@ void PeerListWidget::banSelectedPeers()
int row = m_proxyModel->mapToSource(index).row(); int row = m_proxyModel->mapToSource(index).row();
QString ip = m_listModel->data(m_listModel->index(row, PeerListDelegate::IP_HIDDEN)).toString(); QString ip = m_listModel->data(m_listModel->index(row, PeerListDelegate::IP_HIDDEN)).toString();
qDebug("Banning peer %s...", ip.toLocal8Bit().data()); 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); BitTorrent::Session::instance()->banIP(ip);
} }
// Refresh list // Refresh list

View file

@ -67,7 +67,7 @@ void PeersAdditionDlg::validateInput()
} }
else { else {
QMessageBox::warning(this, tr("Invalid peer"), QMessageBox::warning(this, tr("Invalid peer"),
tr("The peer %1 is invalid.").arg(peer), tr("The peer '%1' is invalid.").arg(peer),
QMessageBox::Ok); QMessageBox::Ok);
m_peersList.clear(); m_peersList.clear();
return; return;

View file

@ -377,7 +377,7 @@ void AutomatedRssDownloader::on_removeRuleBtn_clicked()
// Ask for confirmation // Ask for confirmation
QString confirm_text; QString confirm_text;
if (selection.count() == 1) 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 else
confirm_text = tr("Are you sure you want to remove the selected download rules?"); 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) if (QMessageBox::question(this, tr("Rule deletion confirmation"), confirm_text, QMessageBox::Yes, QMessageBox::No) != QMessageBox::Yes)

View file

@ -365,12 +365,12 @@ void RssFeed::downloadArticleTorrentIfMatching(RssDownloadRuleList* rules, const
// Download the torrent // Download the torrent
const QString& torrent_url = article->torrentUrl(); const QString& torrent_url = article->torrentUrl();
if (torrent_url.isEmpty()) { 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(); article->markAsRead();
return; 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(BitTorrent::Session::instance(), SIGNAL(downloadFromUrlFinished(QString)), article.data(), SLOT(handleTorrentDownloadSuccess(const QString&)), Qt::UniqueConnection);
connect(article.data(), SIGNAL(articleWasRead()), SLOT(handleArticleStateChanged()), Qt::UniqueConnection); connect(article.data(), SIGNAL(articleWasRead()), SLOT(handleArticleStateChanged()), Qt::UniqueConnection);

View file

@ -498,7 +498,7 @@ void RssParser::parseFeed(const ParsingJob& job)
} }
if (!found_channel) { 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; return;
} }

View file

@ -86,9 +86,9 @@ void TorrentImportDlg::on_browseContentBtn_clicked()
QString filter; QString filter;
if (!extension.isEmpty()) { if (!extension.isEmpty()) {
extension = extension.toUpper(); 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()) { if (m_contentPath.isEmpty() || !QFile(m_contentPath).exists()) {
m_contentPath = QString::null; m_contentPath = QString::null;
ui->importBtn->setEnabled(false); ui->importBtn->setEnabled(false);

View file

@ -630,12 +630,12 @@ void TrackerFiltersList::handleFavicoDownload(const QString& url, const QString&
bool invalid = (sizes.size() > 0 ? icon.pixmap(sizes.first()).isNull() : true); bool invalid = (sizes.size() > 0 ? icon.pixmap(sizes.first()).isNull() : true);
if (invalid) { if (invalid) {
if (url.endsWith(".ico", Qt::CaseInsensitive)) { 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); Log::WARNING);
downloadFavicon(url.left(url.size() - 4) + ".png"); downloadFavicon(url.left(url.size() - 4) + ".png");
} }
else { 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); 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 // Don't use getHost() on the url here. Print the full url. The error might relate to
// that. // 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); Log::WARNING);
if (url.endsWith(".ico", Qt::CaseInsensitive)) if (url.endsWith(".ico", Qt::CaseInsensitive))
downloadFavicon(url.left(url.size() - 4) + ".png"); downloadFavicon(url.left(url.size() - 4) + ".png");

View file

@ -251,7 +251,7 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
qDebug("Version to be installed: %.2f", new_version); qDebug("Version to be installed: %.2f", new_version);
if (!isUpdateNeeded(plugin_name, new_version)) { if (!isUpdateNeeded(plugin_name, new_version)) {
qDebug("Apparently update is not needed, we have a more recent version"); qDebug("Apparently update is not needed, we have a more recent version");
QMessageBox::information(this, tr("Search plugin install"), 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"), 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; return;
} }
// Process with install // Process with install
@ -276,12 +276,12 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
// restore backup // restore backup
QFile::copy(dest_path+".bak", dest_path); QFile::copy(dest_path+".bak", dest_path);
Utils::Fs::forceRemove(dest_path+".bak"); Utils::Fs::forceRemove(dest_path+".bak");
QMessageBox::warning(this, tr("Search plugin install"), tr("%1 search engine plugin could not be updated, keeping old version.", "%1 is the name of the search engine").arg(plugin_name)); QMessageBox::warning(this, tr("Search plugin install"), tr("'%1' search engine plugin could not be updated, keeping old version.", "%1 is the name of the search engine").arg(plugin_name));
return; return;
} else { } else {
// Remove broken file // Remove broken file
Utils::Fs::forceRemove(dest_path); Utils::Fs::forceRemove(dest_path);
QMessageBox::warning(this, tr("Search plugin install"), tr("%1 search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name)); QMessageBox::warning(this, tr("Search plugin install"), tr("'%1' search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name));
return; return;
} }
} }
@ -291,10 +291,10 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
qreal version = SearchEngine::getPluginVersion(Utils::Fs::searchEngineLocation() + "/engines/" + plugin_name + ".py"); qreal version = SearchEngine::getPluginVersion(Utils::Fs::searchEngineLocation() + "/engines/" + plugin_name + ".py");
QTreeWidgetItem *item = findItemWithID(plugin_name); QTreeWidgetItem *item = findItemWithID(plugin_name);
item->setText(ENGINE_VERSION, QString::number(version, 'f', 2)); item->setText(ENGINE_VERSION, QString::number(version, 'f', 2));
QMessageBox::information(this, tr("Search plugin install"), tr("%1 search engine plugin was successfully updated.", "%1 is the name of the search engine").arg(plugin_name)); QMessageBox::information(this, tr("Search plugin install"), tr("'%1' search engine plugin was successfully updated.", "%1 is the name of the search engine").arg(plugin_name));
return; return;
} else { } else {
QMessageBox::information(this, tr("Search plugin install"), tr("%1 search engine plugin was successfully installed.", "%1 is the name of the search engine").arg(plugin_name)); QMessageBox::information(this, tr("Search plugin install"), tr("'%1' search engine plugin was successfully installed.", "%1 is the name of the search engine").arg(plugin_name));
return; return;
} }
} }
@ -491,6 +491,6 @@ void engineSelectDlg::handleDownloadFailure(const QString &url, const QString &r
// a plugin update download has been failed // a plugin update download has been failed
QString plugin_name = url.split('/').last(); QString plugin_name = url.split('/').last();
plugin_name.replace(".py", "", Qt::CaseInsensitive); plugin_name.replace(".py", "", Qt::CaseInsensitive);
QMessageBox::warning(this, tr("Search plugin update"), tr("Sorry, %1 search plugin installation failed.", "%1 is the name of the search engine").arg(plugin_name)); QMessageBox::warning(this, tr("Search plugin update"), tr("Sorry, '%1' search plugin installation failed.", "%1 is the name of the search engine").arg(plugin_name));
} }
} }