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 && if (sdkToolsVersion >= gradleScriptRevokedSdkVersion &&
!version->sourcePath().appendPath("src/3rdparty/gradle").exists()) { !version->sourcePath().appendPath("src/3rdparty/gradle").exists()) {
emit addOutput(tr("The installed SDK tools version (%1) does not include Gradle scripts. The " 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); .arg(sdkToolsVersion.toString()).arg("5.9.0/5.6.3"), OutputFormat::Stderr);
return false; return false;
} }
@@ -189,7 +189,7 @@ void AndroidBuildApkStep::processFinished(int exitCode, QProcess::ExitStatus sta
bool AndroidBuildApkStep::verifyKeystorePassword() bool AndroidBuildApkStep::verifyKeystorePassword()
{ {
if (!m_keystorePath.exists()) { if (!m_keystorePath.exists()) {
addOutput(tr("Cannot sign the package. Invalid keystore path(%1).") addOutput(tr("Cannot sign the package. Invalid keystore path (%1).")
.arg(m_keystorePath.toString()), OutputFormat::ErrorMessage); .arg(m_keystorePath.toString()), OutputFormat::ErrorMessage);
return false; return false;
} }

View File

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

View File

@@ -2511,7 +2511,7 @@ void CdbEngine::parseOutputLine(QString line)
// output(32): ModLoad: 00007ffb 00007ffb C:\Windows\system32\KERNEL32.DLL // 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]+)? (.*)"); QRegExp moduleRegExp("[0-9a-fA-F]+(`[0-9a-fA-F]+)? [0-9a-fA-F]+(`[0-9a-fA-F]+)? (.*)");
if (moduleRegExp.indexIn(line) > -1) 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 { } else {
showMessage(line, LogMisc); showMessage(line, LogMisc);
} }

View File

@@ -315,7 +315,7 @@ QWidget *LocalsAndExpressionsOptionsPage::widget()
label->setText(QLatin1String("<html><head/><body>\n<p>") label->setText(QLatin1String("<html><head/><body>\n<p>")
+ tr("The debugging helpers are used to produce a nice " + tr("The debugging helpers are used to produce a nice "
"display of objects of certain types like QString or " "display of objects of certain types like QString or "
"std::map in the &quot;Locals and Expressions&quot; view. ") "std::map in the &quot;Locals and Expressions&quot; view.")
+ QLatin1String("</p></body></html>")); + QLatin1String("</p></body></html>"));
auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox); auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox);

View File

@@ -973,7 +973,7 @@ void GdbServerPortsGatherer::start()
void GdbServerPortsGatherer::handlePortListReady() void GdbServerPortsGatherer::handlePortListReady()
{ {
Utils::PortList portList = device()->freePorts(); 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) { if (m_useGdbServer) {
m_gdbServerPort = m_portsGatherer.getNextFreePort(&portList); m_gdbServerPort = m_portsGatherer.getNextFreePort(&portList);
if (!m_gdbServerPort.isValid()) { if (!m_gdbServerPort.isValid()) {

View File

@@ -3997,7 +3997,7 @@ void GdbEngine::loadInitScript()
tr("Cannot find debugger initialization script"), tr("Cannot find debugger initialization script"),
tr("The debugger settings point to a script file at \"%1\" " tr("The debugger settings point to a script file at \"%1\" "
"which is not accessible. If a script file is not needed, " "which is not accessible. If a script file is not needed, "
"consider clearing that entry to avoid this warning. " "consider clearing that entry to avoid this warning."
).arg(script)); ).arg(script));
} }
} else { } else {

View File

@@ -191,7 +191,7 @@ void PortsGatherer::start()
}); });
connect(&m_portsGatherer, &DeviceUsedPortsGatherer::portListReady, this, [this] { connect(&m_portsGatherer, &DeviceUsedPortsGatherer::portListReady, this, [this] {
m_portList = device()->freePorts(); 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(); reportStarted();
}); });
m_portsGatherer.start(device()); m_portsGatherer.start(device());

View File

@@ -177,7 +177,7 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Limit application output to </string> <string>Limit application output to</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -80,10 +80,6 @@ const char positionCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContext
const char layoutCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout"); const char layoutCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout");
const char stackedContainerCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Stacked Container"); 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 cutSelectionDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Cut");
const char copySelectionDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Copy"); const char copySelectionDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Copy");
const char pasteSelectionDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Paste"); 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. // Handle broken files. makefile.xml references an invalid list.
Core::MessageManager::write( Core::MessageManager::write(
QCoreApplication::translate("GenericHighlighter", QCoreApplication::translate("GenericHighlighter",
"Generic highlighter warning: ") + e.message()); "Generic highlighter warning: %1")
.arg(e.message()));
} }
rule->setInsensitive(atts.value(kInsensitive)); rule->setInsensitive(atts.value(kInsensitive));
ruleElementStarted(atts, QSharedPointer<Rule>(rule)); ruleElementStarted(atts, QSharedPointer<Rule>(rule));

View File

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