Fix string messages

Found during translating.

Change-Id: I9626b3393d7b53300f7c806acbc5e12bc58574d2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jarek Kobus
2017-09-08 14:20:43 +02:00
parent 808f192ff8
commit b506fce0fe
11 changed files with 14 additions and 16 deletions

View File

@@ -141,7 +141,7 @@ bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
if (sdkToolsVersion >= gradleScriptRevokedSdkVersion &&
!version->sourcePath().appendPath("src/3rdparty/gradle").exists()) {
emit addOutput(tr("The installed SDK tools version (%1) does not include Gradle scripts. The "
"minimum Qt version required for Gradle build to work is %2")
"minimum Qt version required for Gradle build to work is %2.")
.arg(sdkToolsVersion.toString()).arg("5.9.0/5.6.3"), OutputFormat::Stderr);
return false;
}

View File

@@ -580,7 +580,7 @@ static void searchFinished(SearchResult *search, QFutureWatcher<Usage> *watcher)
auto renameCheckBox = qobject_cast<QCheckBox *>(search->additionalReplaceWidget());
if (renameCheckBox) {
renameCheckBox->setText(CppFindReferences::tr("Re&name %1 files").arg(filesToRename.size()));
renameCheckBox->setText(CppFindReferences::tr("Re&name %n files", nullptr, filesToRename.size()));
renameCheckBox->setToolTip(CppFindReferences::tr("Files:\n%1").arg(filesToRename.join('\n')));
renameCheckBox->setVisible(true);
}

View File

@@ -2511,7 +2511,7 @@ void CdbEngine::parseOutputLine(QString line)
// output(32): ModLoad: 00007ffb 00007ffb C:\Windows\system32\KERNEL32.DLL
QRegExp moduleRegExp("[0-9a-fA-F]+(`[0-9a-fA-F]+)? [0-9a-fA-F]+(`[0-9a-fA-F]+)? (.*)");
if (moduleRegExp.indexIn(line) > -1)
showStatusMessage(tr("Module loaded: ") + moduleRegExp.cap(3).trimmed(), 3000);
showStatusMessage(tr("Module loaded: %1").arg(moduleRegExp.cap(3).trimmed()), 3000);
} else {
showMessage(line, LogMisc);
}

View File

@@ -973,7 +973,7 @@ void GdbServerPortsGatherer::start()
void GdbServerPortsGatherer::handlePortListReady()
{
Utils::PortList portList = device()->freePorts();
appendMessage(tr("Found %1 free ports").arg(portList.count()), NormalMessageFormat);
appendMessage(tr("Found %n free ports.", nullptr, portList.count()), NormalMessageFormat);
if (m_useGdbServer) {
m_gdbServerPort = m_portsGatherer.getNextFreePort(&portList);
if (!m_gdbServerPort.isValid()) {

View File

@@ -191,7 +191,7 @@ void PortsGatherer::start()
});
connect(&m_portsGatherer, &DeviceUsedPortsGatherer::portListReady, this, [this] {
m_portList = device()->freePorts();
appendMessage(tr("Found %1 free ports").arg(m_portList.count()) + '\n', NormalMessageFormat);
appendMessage(tr("Found %n free ports.", nullptr, m_portList.count()) + '\n', NormalMessageFormat);
reportStarted();
});
m_portsGatherer.start(device());

View File

@@ -80,10 +80,6 @@ const char positionCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContext
const char layoutCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout");
const char stackedContainerCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Stacked Container");
const char selectParentDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Select Parent: %1");
const char selectDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Select: %1");
const char deSelectDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Deselect: ");
const char cutSelectionDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Cut");
const char copySelectionDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Copy");
const char pasteSelectionDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Paste");

View File

@@ -352,7 +352,8 @@ void HighlightDefinitionHandler::keywordStarted(const QXmlAttributes &atts)
// Handle broken files. makefile.xml references an invalid list.
Core::MessageManager::write(
QCoreApplication::translate("GenericHighlighter",
"Generic highlighter warning: ") + e.message());
"Generic highlighter warning: %1")
.arg(e.message()));
}
rule->setInsensitive(atts.value(kInsensitive));
ruleElementStarted(atts, QSharedPointer<Rule>(rule));

View File

@@ -253,7 +253,8 @@ void Highlighter::highlightBlock(const QString &text)
} catch (const HighlighterException &e) {
Core::MessageManager::write(
QCoreApplication::translate("GenericHighlighter",
"Generic highlighter error: ") + e.message(),
"Generic highlighter error: %1")
.arg(e.message()),
Core::MessageManager::WithFocus);
m_isBroken = true;
}