Commit c9d72a15 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fix translated messages in WinRT-plugin.



Use plural form, remove white space from the messages,
use double quotes for file names. Use the winrtrunner.exe
only in messages about the file not being found.

Change-Id: I5d5ffc2ffc6b6dc86c97327e6f47c6e5c0b2ef11
Reviewed-by: default avatarOliver Wolff <oliver.wolff@digia.com>
parent 31799cc3
......@@ -130,7 +130,7 @@ void WinRtDeviceFactory::onProcessFinished(int exitCode, QProcess::ExitStatus ex
}
if (exitCode != 0) {
MessageManager::write(tr("winrtrunner.exe returned with exit code %1.")
MessageManager::write(tr("winrtrunner returned with exit code %1.")
.arg(exitCode), MessageManager::Flash);
return;
}
......@@ -238,8 +238,12 @@ void WinRtDeviceFactory::parseRunnerOutput(const QByteArray &output) const
deviceManager->addDevice(ProjectExplorer::IDevice::ConstPtr(device));
}
}
MessageManager::write(tr("Found %1 Windows Runtime devices. %2 of them are new.").arg(numFound)
.arg(numFound - numSkipped));
QString message = tr("Found %n Windows Runtime devices.", 0, numFound);
if (const int numNew = numFound - numSkipped) {
message += QLatin1Char(' ');
message += tr("%n of them are new.", 0, numNew);
}
MessageManager::write(message);
}
} // Internal
......
......@@ -69,7 +69,7 @@ WinRtRunControl::WinRtRunControl(WinRtRunConfiguration *runConfiguration, RunMod
m_isWinPhone = (qt->type() == QLatin1String(Constants::WINRT_WINPHONEQT));
m_runnerFilePath = qt->binPath().toString() + QStringLiteral("/winrtrunner.exe");
if (!QFile::exists(m_runnerFilePath)) {
appendMessage(tr("Cannot find winrtrunner.exe in '%1'.").arg(
appendMessage(tr("Cannot find winrtrunner.exe in \"%1\".").arg(
QDir::toNativeSeparators(qt->binPath().toString())),
Utils::ErrorMessageFormat);
return;
......@@ -127,12 +127,13 @@ void WinRtRunControl::onProcessFinished(int exitCode, QProcess::ExitStatus exitS
QTC_CHECK(m_state == StartedState);
if (exitStatus == QProcess::CrashExit) {
appendMessage(tr("winrtrunner crashed\n"), Utils::ErrorMessageFormat);
appendMessage(tr("winrtrunner crashed.") + QLatin1Char('\n'), Utils::ErrorMessageFormat);
} else if (exitCode != 0) {
appendMessage(tr("winrtrunner returned with exit code %1\n").arg(exitCode),
Utils::ErrorMessageFormat);
appendMessage(tr("winrtrunner returned with exit code %1.").arg(exitCode)
+ QLatin1Char('\n'), Utils::ErrorMessageFormat);
} else {
appendMessage(tr("winrtrunner finished successfully.\n"), Utils::NormalMessageFormat);
appendMessage(tr("winrtrunner finished successfully.")
+ QLatin1Char('\n'), Utils::NormalMessageFormat);
}
m_process->disconnect();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment