diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-03-05 15:03:23 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-03-05 16:32:30 +0100 |
commit | c9d72a156082fa33423eebe92fe0934090b206d6 (patch) | |
tree | 72029a0347c69909e1e1b774fa378f92ecd5b7bf /src/plugins/winrt | |
parent | 31799cc3040128e8328a8bf34284f2d5d62a2285 (diff) |
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: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/winrt')
-rw-r--r-- | src/plugins/winrt/winrtdevicefactory.cpp | 10 | ||||
-rw-r--r-- | src/plugins/winrt/winrtruncontrol.cpp | 11 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/plugins/winrt/winrtdevicefactory.cpp b/src/plugins/winrt/winrtdevicefactory.cpp index 08231298ba2..8d2490dd55f 100644 --- a/src/plugins/winrt/winrtdevicefactory.cpp +++ b/src/plugins/winrt/winrtdevicefactory.cpp @@ -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 diff --git a/src/plugins/winrt/winrtruncontrol.cpp b/src/plugins/winrt/winrtruncontrol.cpp index 85b01b9425e..436c221941f 100644 --- a/src/plugins/winrt/winrtruncontrol.cpp +++ b/src/plugins/winrt/winrtruncontrol.cpp @@ -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(); |