Commit d75c5fa2 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

sanitize some tr() calls

parent bbaf7893
...@@ -615,13 +615,13 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queu ...@@ -615,13 +615,13 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queu
// check for circular dependencies // check for circular dependencies
if (circularityCheckQueue.contains(spec)) { if (circularityCheckQueue.contains(spec)) {
spec->d->hasError = true; spec->d->hasError = true;
spec->d->errorString = q->tr("Circular dependency detected:\n"); spec->d->errorString = PluginManager::tr("Circular dependency detected:\n");
int index = circularityCheckQueue.indexOf(spec); int index = circularityCheckQueue.indexOf(spec);
for (int i = index; i < circularityCheckQueue.size(); ++i) { for (int i = index; i < circularityCheckQueue.size(); ++i) {
spec->d->errorString.append(q->tr("%1(%2) depends on\n") spec->d->errorString.append(PluginManager::tr("%1(%2) depends on\n")
.arg(circularityCheckQueue.at(i)->name()).arg(circularityCheckQueue.at(i)->version())); .arg(circularityCheckQueue.at(i)->name()).arg(circularityCheckQueue.at(i)->version()));
} }
spec->d->errorString.append(q->tr("%1(%2)").arg(spec->name()).arg(spec->version())); spec->d->errorString.append(PluginManager::tr("%1(%2)").arg(spec->name()).arg(spec->version()));
return false; return false;
} }
circularityCheckQueue.append(spec); circularityCheckQueue.append(spec);
...@@ -629,7 +629,7 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queu ...@@ -629,7 +629,7 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queu
if (spec->state() == PluginSpec::Invalid || spec->state() == PluginSpec::Read) { if (spec->state() == PluginSpec::Invalid || spec->state() == PluginSpec::Read) {
spec->d->hasError = true; spec->d->hasError = true;
spec->d->errorString += "\n"; spec->d->errorString += "\n";
spec->d->errorString += q->tr("Cannot load plugin because dependencies are not resolved"); spec->d->errorString += PluginManager::tr("Cannot load plugin because dependencies are not resolved");
return false; return false;
} }
// add dependencies // add dependencies
...@@ -637,7 +637,7 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queu ...@@ -637,7 +637,7 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queu
if (!loadQueue(depSpec, queue, circularityCheckQueue)) { if (!loadQueue(depSpec, queue, circularityCheckQueue)) {
spec->d->hasError = true; spec->d->hasError = true;
spec->d->errorString = spec->d->errorString =
q->tr("Cannot load plugin because dependency failed to load: %1(%2)\nReason: %3") PluginManager::tr("Cannot load plugin because dependency failed to load: %1(%2)\nReason: %3")
.arg(depSpec->name()).arg(depSpec->version()).arg(depSpec->errorString()); .arg(depSpec->name()).arg(depSpec->version()).arg(depSpec->errorString());
return false; return false;
} }
...@@ -666,7 +666,7 @@ void PluginManagerPrivate::loadPlugin(PluginSpec *spec, PluginSpec::State destSt ...@@ -666,7 +666,7 @@ void PluginManagerPrivate::loadPlugin(PluginSpec *spec, PluginSpec::State destSt
if (depSpec->state() != destState) { if (depSpec->state() != destState) {
spec->d->hasError = true; spec->d->hasError = true;
spec->d->errorString = spec->d->errorString =
q->tr("Cannot load plugin because dependency failed to load: %1(%2)\nReason: %3") PluginManager::tr("Cannot load plugin because dependency failed to load: %1(%2)\nReason: %3")
.arg(depSpec->name()).arg(depSpec->version()).arg(depSpec->errorString()); .arg(depSpec->name()).arg(depSpec->version()).arg(depSpec->errorString());
return; return;
} }
......
...@@ -128,7 +128,7 @@ void CommandPrivate::setCategory(const QString &name) ...@@ -128,7 +128,7 @@ void CommandPrivate::setCategory(const QString &name)
QString CommandPrivate::category() const QString CommandPrivate::category() const
{ {
if (m_category.isEmpty()) if (m_category.isEmpty())
return QObject::tr("Other"); return tr("Other");
return m_category; return m_category;
} }
......
...@@ -301,8 +301,8 @@ QList<IFile *> FileManager::saveModifiedFiles(const QList<IFile *> &files, ...@@ -301,8 +301,8 @@ QList<IFile *> FileManager::saveModifiedFiles(const QList<IFile *> &files,
static QMessageBox::StandardButton skipFailedPrompt(QWidget *parent, const QString &fileName) static QMessageBox::StandardButton skipFailedPrompt(QWidget *parent, const QString &fileName)
{ {
return QMessageBox::question(parent, return QMessageBox::question(parent,
QObject::tr("Can't save file"), FileManager::tr("Can't save file"),
QObject::tr("Can't save changes to '%1'. Do you want to continue and loose your changes?").arg(fileName), FileManager::tr("Can't save changes to '%1'. Do you want to continue and loose your changes?").arg(fileName),
QMessageBox::YesToAll| QMessageBox::Yes|QMessageBox::No, QMessageBox::YesToAll| QMessageBox::Yes|QMessageBox::No,
QMessageBox::No); QMessageBox::No);
} }
......
...@@ -234,7 +234,7 @@ bool ScriptManagerPrivate::runScript(const QString &script, QString *errorMessag ...@@ -234,7 +234,7 @@ bool ScriptManagerPrivate::runScript(const QString &script, QString *errorMessag
const QStringList backTrace = m_engine.uncaughtExceptionBacktrace(); const QStringList backTrace = m_engine.uncaughtExceptionBacktrace();
parseBackTrace(backTrace, *stack); parseBackTrace(backTrace, *stack);
const QString backtrace = backTrace.join(QString(QLatin1Char('\n'))); const QString backtrace = backTrace.join(QString(QLatin1Char('\n')));
*errorMessage = QObject::tr("Exception at line %1: %2\n%3").arg(errorLineNumber).arg(engineError(m_engine)).arg(backtrace); *errorMessage = ScriptManager::tr("Exception at line %1: %2\n%3").arg(errorLineNumber).arg(engineError(m_engine)).arg(backtrace);
} }
m_engine.popContext(); m_engine.popContext();
return !failed; return !failed;
...@@ -301,7 +301,7 @@ QString ScriptManagerPrivate::engineError(QScriptEngine &scriptEngine) ...@@ -301,7 +301,7 @@ QString ScriptManagerPrivate::engineError(QScriptEngine &scriptEngine)
QScriptValue error = scriptEngine.evaluate(QLatin1String("Error")); QScriptValue error = scriptEngine.evaluate(QLatin1String("Error"));
if (error.isValid()) if (error.isValid())
return error.toString(); return error.toString();
return QObject::tr("Unknown error"); return ScriptManager::tr("Unknown error");
} }
} // namespace Internal } // namespace Internal
......
...@@ -69,7 +69,7 @@ bool DebuggerRunner::canRun(RunConfigurationPtr runConfiguration, const QString ...@@ -69,7 +69,7 @@ bool DebuggerRunner::canRun(RunConfigurationPtr runConfiguration, const QString
QString DebuggerRunner::displayName() const QString DebuggerRunner::displayName() const
{ {
return QObject::tr("Debug"); return tr("Debug");
} }
RunControl* DebuggerRunner::run(RunConfigurationPtr runConfiguration, const QString &mode) RunControl* DebuggerRunner::run(RunConfigurationPtr runConfiguration, const QString &mode)
......
...@@ -85,7 +85,7 @@ bool ApplicationRunConfigurationRunner::canRun(QSharedPointer<RunConfiguration> ...@@ -85,7 +85,7 @@ bool ApplicationRunConfigurationRunner::canRun(QSharedPointer<RunConfiguration>
QString ApplicationRunConfigurationRunner::displayName() const QString ApplicationRunConfigurationRunner::displayName() const
{ {
return QObject::tr("Run"); return tr("Run");
} }
RunControl* ApplicationRunConfigurationRunner::run(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode) RunControl* ApplicationRunConfigurationRunner::run(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
......
...@@ -616,8 +616,8 @@ BookmarkManager::BookmarkManager(QHelpEngineCore* _helpEngine) ...@@ -616,8 +616,8 @@ BookmarkManager::BookmarkManager(QHelpEngineCore* _helpEngine)
, helpEngine(_helpEngine) , helpEngine(_helpEngine)
{ {
folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon); folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
treeModel->setHeaderData(0, Qt::Horizontal, QObject::tr("Bookmark")); treeModel->setHeaderData(0, Qt::Horizontal, tr("Bookmark"));
listModel->setHeaderData(0, Qt::Horizontal, QObject::tr("Bookmark")); listModel->setHeaderData(0, Qt::Horizontal, tr("Bookmark"));
connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this, connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this,
SLOT(itemChanged(QStandardItem*))); SLOT(itemChanged(QStandardItem*)));
......
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