Commit 8bb0134c authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

tr()-Fixes: Fix translation contexts.



Change-Id: Ic043a097947a80e2fb5cb381c585375c4e5f5eef
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 757fd039
......@@ -40,7 +40,7 @@ namespace {
class StaticAnalysisMessages
{
Q_DECLARE_TR_FUNCTIONS(StaticAnalysisMessages)
Q_DECLARE_TR_FUNCTIONS(QmlJS::StaticAnalysisMessages)
public:
class PrototypeMessageData {
......
......@@ -70,6 +70,7 @@ namespace CMakeProjectManager {
namespace Internal {
class GeneratorInfo
{
Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::GeneratorInfo)
public:
enum Ninja { NoNinja, OfferNinja, ForceNinja };
static QList<GeneratorInfo> generatorInfosFor(ProjectExplorer::Kit *k, Ninja n, bool hasCodeBlocks);
......@@ -148,7 +149,7 @@ QString GeneratorInfo::displayName() const
if (!m_kit)
return QString();
if (m_isNinja)
return QApplication::tr("Ninja (%1)").arg(m_kit->displayName());
return tr("Ninja (%1)").arg(m_kit->displayName());
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(m_kit);
ProjectExplorer::Abi targetAbi = tc->targetAbi();
if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) {
......@@ -156,16 +157,16 @@ QString GeneratorInfo::displayName() const
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2008Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor) {
return QApplication::tr("NMake Generator (%1)").arg(m_kit->displayName());
return tr("NMake Generator (%1)").arg(m_kit->displayName());
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
if (Utils::HostOsInfo::isWindowsHost())
return QApplication::tr("MinGW Generator (%1)").arg(m_kit->displayName());
return tr("MinGW Generator (%1)").arg(m_kit->displayName());
else
return QApplication::tr("Unix Generator (%1)").arg(m_kit->displayName());
return tr("Unix Generator (%1)").arg(m_kit->displayName());
}
} else {
// Non windows
return QApplication::tr("Unix Generator (%1)").arg(m_kit->displayName());
return tr("Unix Generator (%1)").arg(m_kit->displayName());
}
return QString();
}
......
......@@ -200,7 +200,7 @@ QFuture<void> BuiltinIndexingSupport::refreshSourceFiles(const QStringList &sour
if (sourceFiles.count() > 1) {
Core::ICore::progressManager()->addTask(result,
QCoreApplication::translate("IndexingSupport", "Parsing"),
QCoreApplication::translate("CppTools::Internal::BuiltinIndexingSupport", "Parsing"),
QLatin1String(CppTools::Constants::TASK_INDEX));
}
......
......@@ -36,6 +36,7 @@
#include <qmljs/iscriptevaluator.h>
#include <QVariant>
#include <QCoreApplication>
using namespace QmlJS;
......@@ -174,7 +175,8 @@ void QmlConsoleModel::evaluate(const QString &expression)
} else {
ConsoleItem *root = manager->rootItem();
ConsoleItem *item = constructLogItemTree(
root, QObject::tr("Can only evaluate during a QML debug session."));
root, QCoreApplication::translate("QmlJSTools::Internal::QmlConsoleModel",
"Can only evaluate during a QML debug session."));
if (item) {
QmlConsoleModel::qmlConsoleItemModel()->appendEditableRow();
manager->printToConsolePane(item);
......
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