From 63967389145a4f957de329091fd7dda1428b19cf Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 17 May 2017 08:20:41 +0200 Subject: Fix strings Change-Id: Ide8d1fb32e1e371716d5576d0f51771484463fb5 Reviewed-by: Karsten Heimrich --- src/assistant/assistant/aboutdialog.cpp | 2 +- src/assistant/assistant/helpbrowsersupport.cpp | 2 +- src/assistant/help/qhelpcollectionhandler.cpp | 12 ++++++------ src/assistant/help/qhelpdbreader.cpp | 2 +- src/assistant/help/qhelpgenerator.cpp | 12 ++++++------ src/linguist/linguist/mainwindow.ui | 24 ++++++++++++------------ 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/assistant/assistant/aboutdialog.cpp b/src/assistant/assistant/aboutdialog.cpp index 6ab795ab3..d599489e2 100644 --- a/src/assistant/assistant/aboutdialog.cpp +++ b/src/assistant/assistant/aboutdialog.cpp @@ -88,7 +88,7 @@ void AboutLabel::setSource(const QUrl &url) || !HelpViewer::canOpenPage(url.path()))) { if (!QDesktopServices::openUrl(url)) { QMessageBox::warning(this, tr("Warning"), - tr("Unable to launch external application.\n"), tr("OK")); + tr("Unable to launch external application."), tr("OK")); } } } diff --git a/src/assistant/assistant/helpbrowsersupport.cpp b/src/assistant/assistant/helpbrowsersupport.cpp index 746cef82f..1fcf2453c 100644 --- a/src/assistant/assistant/helpbrowsersupport.cpp +++ b/src/assistant/assistant/helpbrowsersupport.cpp @@ -61,7 +61,7 @@ QString HelpBrowserSupport::msgError404() QString HelpBrowserSupport::msgPageNotFound() { - return QCoreApplication::translate("HelpViewer", "The page could not be found!"); + return QCoreApplication::translate("HelpViewer", "The page could not be found"); } QString HelpBrowserSupport::msgAllDocumentationSets() diff --git a/src/assistant/help/qhelpcollectionhandler.cpp b/src/assistant/help/qhelpcollectionhandler.cpp index e6e5ce41e..163eefed1 100644 --- a/src/assistant/help/qhelpcollectionhandler.cpp +++ b/src/assistant/help/qhelpcollectionhandler.cpp @@ -72,7 +72,7 @@ bool QHelpCollectionHandler::isDBOpened() { if (m_dbOpened) return true; - emit error(tr("The collection file '%1' is not set up yet."). + emit error(tr("The collection file \"%1\" is not set up yet."). arg(m_collectionFile)); return false; } @@ -134,7 +134,7 @@ bool QHelpCollectionHandler::copyCollectionFile(const QString &fileName) const QFileInfo fi(fileName); if (fi.exists()) { - emit error(tr("The collection file '%1' already exists."). + emit error(tr("The collection file \"%1\" already exists."). arg(fileName)); return false; } @@ -284,7 +284,7 @@ bool QHelpCollectionHandler::removeCustomFilter(const QString &filterName) filterNameId = m_query.value(0).toInt(); if (filterNameId < 0) { - emit error(tr("Unknown filter '%1'.").arg(filterName)); + emit error(tr("Unknown filter \"%1\".").arg(filterName)); return false; } @@ -387,7 +387,7 @@ bool QHelpCollectionHandler::registerDocumentation(const QString &fileName) const QString &ns = reader.namespaceName(); if (ns.isEmpty()) { - emit error(tr("Invalid documentation file '%1'.").arg(fileName)); + emit error(tr("Invalid documentation file \"%1\".").arg(fileName)); return false; } @@ -554,7 +554,7 @@ int QHelpCollectionHandler::registerNamespace(const QString &nspace, const QStri if (m_query.exec()) namespaceId = m_query.lastInsertId().toInt(); if (namespaceId < 1) { - emit error(tr("Cannot register namespace '%1'.").arg(nspace)); + emit error(tr("Cannot register namespace \"%1\".").arg(nspace)); return -1; } return namespaceId; @@ -578,7 +578,7 @@ void QHelpCollectionHandler::optimizeDatabase(const QString &fileName) db.setDatabaseName(fileName); if (!db.open()) { QSqlDatabase::removeDatabase(QLatin1String("optimize")); - emit error(tr("Cannot open database '%1' to optimize.").arg(fileName)); + emit error(tr("Cannot open database \"%1\" to optimize.").arg(fileName)); return; } diff --git a/src/assistant/help/qhelpdbreader.cpp b/src/assistant/help/qhelpdbreader.cpp index 6574ac90e..0caf4ffd3 100644 --- a/src/assistant/help/qhelpdbreader.cpp +++ b/src/assistant/help/qhelpdbreader.cpp @@ -99,7 +99,7 @@ bool QHelpDBReader::initDB() /*: The placeholders are: %1 - The name of the database which cannot be opened %2 - The unique id for the connection %3 - The actual error string */ - m_error = tr("Cannot open database '%1' '%2': %3").arg(m_dbName, m_uniqueId, db.lastError().text()); + m_error = tr("Cannot open database \"%1\" \"%2\": %3").arg(m_dbName, m_uniqueId, db.lastError().text()); return false; } return true; diff --git a/src/assistant/help/qhelpgenerator.cpp b/src/assistant/help/qhelpgenerator.cpp index d341a04de..2224e8654 100644 --- a/src/assistant/help/qhelpgenerator.cpp +++ b/src/assistant/help/qhelpgenerator.cpp @@ -183,7 +183,7 @@ bool QHelpGenerator::generate(QHelpDataInterface *helpData, insertMetaData(helpData->metaData()); if (!registerVirtualFolder(helpData->virtualFolder(), helpData->namespaceName())) { - d->error = tr("Cannot register namespace %1.").arg(helpData->namespaceName()); + d->error = tr("Cannot register namespace \"%1\".").arg(helpData->namespaceName()); cleanupDB(); return false; } @@ -483,13 +483,13 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa QFile fi(rootPath + QDir::separator() + fileName); if (!fi.exists()) { - emit warning(tr("The file %1 does not exist! Skipping it.") + emit warning(tr("The file %1 does not exist, skipping it...") .arg(QDir::cleanPath(rootPath + QDir::separator() + fileName))); continue; } if (!fi.open(QIODevice::ReadOnly)) { - emit warning(tr("Cannot open file %1! Skipping it.") + emit warning(tr("Cannot open file %1, skipping it...") .arg(QDir::cleanPath(rootPath + QDir::separator() + fileName))); continue; } @@ -797,7 +797,7 @@ bool QHelpGenerator::checkLinks(const QHelpDataInterface &helpData) const QFileInfo fileInfo(helpData.rootPath() + QDir::separator() + file); const QString &canonicalFileName = fileInfo.canonicalFilePath(); if (!fileInfo.exists()) - emit warning(tr("File '%1' does not exist.").arg(file)); + emit warning(tr("File \"%1\" does not exist.").arg(file)); else files.insert(canonicalFileName); } @@ -816,7 +816,7 @@ bool QHelpGenerator::checkLinks(const QHelpDataInterface &helpData) continue; QFile htmlFile(fileName); if (!htmlFile.open(QIODevice::ReadOnly)) { - emit warning(tr("File '%1' cannot be opened.").arg(fileName)); + emit warning(tr("File \"%1\" cannot be opened.").arg(fileName)); continue; } const QRegExp linkPattern(QLatin1String("<(?:a href|img src)=\"?([^#\">]+)[#\">]")); @@ -835,7 +835,7 @@ bool QHelpGenerator::checkLinks(const QHelpDataInterface &helpData) QFileInfo(curDir + QDir::separator() + linkedFileName).canonicalFilePath(); if (!files.contains(canonicalLinkedFileName) && !invalidLinks.contains(canonicalLinkedFileName)) { - emit warning(tr("File '%1' contains an invalid link to file '%2'"). + emit warning(tr("File \"%1\" contains an invalid link to file \"%2\""). arg(fileName).arg(linkedFileName)); allLinksOk = false; invalidLinks.append(canonicalLinkedFileName); diff --git a/src/linguist/linguist/mainwindow.ui b/src/linguist/linguist/mainwindow.ui index fbf9d83a9..c09015912 100644 --- a/src/linguist/linguist/mainwindow.ui +++ b/src/linguist/linguist/mainwindow.ui @@ -501,10 +501,10 @@ &Accelerators - Toggle the validity check of accelerators + Toggles the validity check of accelerators - Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window. + Toggles the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window. QAction::NoRole @@ -515,13 +515,13 @@ true - Surrounding &Whitespace. + Surrounding &Whitespace - Toggle the validity check of surrounding whitespace. + Toggles the validity check of surrounding whitespace. - Toggle the validity check of surrounding whitespace. If the check fails, a message is shown in the warnings window. + Toggles the validity check of surrounding whitespace. If the check fails, a message is shown in the warnings window. QAction::NoRole @@ -535,10 +535,10 @@ &Ending Punctuation - Toggle the validity check of ending punctuation + Toggles the validity check of ending punctuation - Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window. + Toggles the validity check of ending punctuation. If the check fails, a message is shown in the warnings window. QAction::NoRole @@ -552,10 +552,10 @@ &Phrase matches - Toggle checking that phrase suggestions are used + Toggles checking that phrase suggestions are used - Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window. + Toggles checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window. QAction::NoRole @@ -569,10 +569,10 @@ Place &Marker Matches - Toggle the validity check of place markers + Toggles the validity check of place markers - Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window. + Toggles the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window. QAction::NoRole @@ -899,7 +899,7 @@ Visualize whitespace - Toggle visualize whitespace in editors + Toggles visualize whitespace in editors -- cgit v1.2.1