From fcd4c9e194749704f4eae352c54ec5167670e005 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 2 Mar 2011 12:01:34 +0100 Subject: [PATCH] L10n: tr()-Fixes. --- src/plugins/bazaar/cloneoptionspanel.ui | 6 +++--- src/plugins/bazaar/pullorpushdialog.ui | 6 +++--- .../coreplugin/dialogs/externaltoolconfig.cpp | 4 ++-- .../coreplugin/dialogs/externaltoolconfig.ui | 19 +++++++------------ src/plugins/coreplugin/externaltool.cpp | 6 ++++-- src/plugins/debugger/commonoptionspage.cpp | 2 +- src/plugins/debugger/qml/qmlengine.cpp | 17 +++++++++-------- .../qt4projectmanager/qmldebugginglibrary.cpp | 4 ++-- .../qt-maemo/maemotoolchain.cpp | 2 +- .../qt-s60/s60deployconfigurationwidget.cpp | 12 ++++++------ src/plugins/vcsbase/vcsbaseclient.cpp | 2 +- src/plugins/vcsbase/vcsjobrunner.cpp | 6 +++--- src/plugins/vcsbase/vcsjobrunner.h | 2 +- 13 files changed, 43 insertions(+), 45 deletions(-) diff --git a/src/plugins/bazaar/cloneoptionspanel.ui b/src/plugins/bazaar/cloneoptionspanel.ui index 41bf17a69a3..55ae024b6d6 100644 --- a/src/plugins/bazaar/cloneoptionspanel.ui +++ b/src/plugins/bazaar/cloneoptionspanel.ui @@ -7,11 +7,11 @@ 0 0 283 - 255 + 278 - Form + @@ -38,7 +38,7 @@ - By default branch will fail if the target directory exists, but does not already have a control directory. + By default, branch will fail if the target directory exists, but does not already have a control directory. This flag will allow branch to proceed diff --git a/src/plugins/bazaar/pullorpushdialog.ui b/src/plugins/bazaar/pullorpushdialog.ui index 95349d85e84..eaedc39d23c 100644 --- a/src/plugins/bazaar/pullorpushdialog.ui +++ b/src/plugins/bazaar/pullorpushdialog.ui @@ -47,7 +47,7 @@ - e.g. https://[user[:pass]@]host[:port]/[path] + for example https://[user[:pass]@]host[:port]/[path] Specify Url: @@ -60,7 +60,7 @@ false - e.g. https://[user[:pass]@]host[:port]/[path] + for example https://[user[:pass]@]host[:port]/[path] @@ -97,7 +97,7 @@ unconditionally - By default push will fail if the target directory exists, but does not already have a control directory. + By default, push will fail if the target directory exists, but does not already have a control directory. This flag will allow push to proceed diff --git a/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp b/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp index 66cf997f8c8..97afca4e15a 100644 --- a/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp +++ b/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp @@ -449,8 +449,8 @@ void ExternalToolConfig::setTools(const QMap > &t itemCopy.append(new ExternalTool(tool)); toolsCopy.insert(it.key(), itemCopy); } - if (!toolsCopy.contains(QLatin1String(""))) - toolsCopy.insert(QLatin1String(""), QList()); + if (!toolsCopy.contains(QString())) + toolsCopy.insert(QString(), QList()); m_model->setTools(toolsCopy); ui->toolTree->expandAll(); } diff --git a/src/plugins/coreplugin/dialogs/externaltoolconfig.ui b/src/plugins/coreplugin/dialogs/externaltoolconfig.ui index bf48f677e03..129e111af53 100644 --- a/src/plugins/coreplugin/dialogs/externaltoolconfig.ui +++ b/src/plugins/coreplugin/dialogs/externaltoolconfig.ui @@ -138,17 +138,15 @@ - + - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">What to do with the executable's standard output. -<ul><li>Ignore: Do nothing with it</li><li>Show in pane: Show it in the general output pane</li><li>Replace selection: Replace the current selection in the current document with it</li></ul></p></body></html> + <html><head/><body> +<p>What to do with the executable's standard output. +<ul><li>Ignore: Do nothing with it</li><li>Show in pane: Show it in the general output pane</li><li>Replace selection: Replace the current selection in the current document with it</li></ul></p></body></html> + Output: @@ -177,11 +175,8 @@ p, li { white-space: pre-wrap; } - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">What to do with the executable's standard error output.</p> + <html><head><body> +<p >What to do with the executable's standard error output.</p> <ul><li>Ignore: Do nothing with it</li> <li>Show in pane: Show it in the general output pane</li> <li>Replace selection: Replace the current selection in the current document with it</li> diff --git a/src/plugins/coreplugin/externaltool.cpp b/src/plugins/coreplugin/externaltool.cpp index ffbd237d5ca..a61bd038bf3 100644 --- a/src/plugins/coreplugin/externaltool.cpp +++ b/src/plugins/coreplugin/externaltool.cpp @@ -437,7 +437,8 @@ ExternalTool * ExternalTool::createFromFile(const QString &fileName, QString *er QFile file(info.absoluteFilePath()); if (!file.open(QIODevice::ReadOnly)) { if (errorMessage) - *errorMessage = tr("Could not open tool specification %1 for reading").arg(fileName); + *errorMessage = tr("Could not open tool specification %1 for reading: %2"). + arg(fileName, file.errorString()); return 0; } const QByteArray &bytes = file.readAll(); @@ -470,7 +471,8 @@ bool ExternalTool::save(QString *errorMessage) const QFile file(m_fileName); if (!file.open(QIODevice::WriteOnly)) { if (errorMessage) - *errorMessage = tr("Could not write tool specification %1").arg(m_fileName); + *errorMessage = tr("Could not write tool specification %1: %2"). + arg(m_fileName, file.errorString()); return false; } QXmlStreamWriter out(&file); diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp index b0b3ac28568..0c59fa470ba 100644 --- a/src/plugins/debugger/commonoptionspage.cpp +++ b/src/plugins/debugger/commonoptionspage.cpp @@ -243,7 +243,7 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent) cmd = am->registerAction(m_dumpLogAction, DUMP_LOG, globalcontext); //cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+L"))); - cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+F11"))); + cmd->setDefaultKeySequence(QKeySequence(QCoreApplication::translate("Debugger", "Ctrl+Shift+F11"))); mdebug->addAction(cmd); #endif #endif diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 099fcd491a4..cb52e02aa58 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -291,7 +291,8 @@ bool QmlEngine::canDisplayTooltip() const void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/) { - static QString qddserver = QLatin1String("QDeclarativeDebugServer: "); + static const QString qddserver = QLatin1String("QDeclarativeDebugServer: "); + static const QString cannotRetrieveDebuggingOutput = Utils::AbstractProcess::msgWinCannotRetrieveDebuggingOutput(); const int index = msg.indexOf(qddserver); if (index != -1) { @@ -325,9 +326,8 @@ void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/) QMessageBox *infoBox = new QMessageBox(core->mainWindow()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(tr("Qt Creator")); - //: %3 is detailed error message - infoBox->setText(tr("Could not connect to the in-process QML debugger:\n" - "%3") + //: %1 is detailed error message + infoBox->setText(tr("Could not connect to the in-process QML debugger:\n%1") .arg(errorMessage)); infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help); infoBox->setDefaultButton(QMessageBox::Ok); @@ -338,7 +338,7 @@ void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/) infoBox->show(); } - } else if (msg.contains(Utils::AbstractProcess::msgWinCannotRetrieveDebuggingOutput())) { + } else if (msg.contains(cannotRetrieveDebuggingOutput)) { // we won't get debugging output, so just try to connect ... d->m_adapter.beginConnection(); } @@ -821,13 +821,14 @@ void QmlEngine::messageReceived(const QByteArray &message) QString error; stream >> error; - logString += QLatin1String(" ") + error; + logString += QLatin1Char(' '); + logString += error; logMessage(LogReceive, logString); QString msg = stackFrames.isEmpty() - ? tr("

An Uncaught Exception occurred:

%2

") + ? tr("

An uncaught exception occurred:

%1

") .arg(Qt::escape(error)) - : tr("

An Uncaught Exception occurred in %1:

%2

") + : tr("

An uncaught exception occurred in %1:

%2

") .arg(stackFrames.value(0).file, Qt::escape(error)); showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg); } else { diff --git a/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp b/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp index 0f4dfdf1a3a..87cd1d4a363 100644 --- a/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp +++ b/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp @@ -76,7 +76,7 @@ bool QmlDebuggingLibrary::build(const QString &directory, const QString &makeCo const Utils::Environment &env, const QString &targetMode, const QStringList &qmakeArguments, QString *output, QString *errorMessage) { - return buildHelper(QCoreApplication::translate("Qt4ProjectManager::QmlDebuggingLibrary", "Qml Debugging"), + return buildHelper(QCoreApplication::translate("Qt4ProjectManager::QmlDebuggingLibrary", "QML Debugging"), QLatin1String("qmljsdebugger.pro"), directory, makeCommand, qmakeCommand, mkspec, env, targetMode, qmakeArguments, output, errorMessage); @@ -111,7 +111,7 @@ QString QmlDebuggingLibrary::copy(const QString &qtInstallData, QString *errorMe } } *errorMessage = QCoreApplication::translate("Qt4ProjectManager::QmlDebuggingLibrary", - "Qml Debugging library could not be built in any of the directories:\n- %1\n\nReason: %2") + "QML Debugging library could not be built in any of the directories:\n- %1\n\nReason: %2") .arg(directories.join(QLatin1String("\n- ")), *errorMessage); return QString(); } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp index 04144c4c7af..25f5c7f8288 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp @@ -193,7 +193,7 @@ void MaemoToolChain::setQtVersionId(int id) m_targetAbi = version->qtAbis().at(0); updateId(); - setDisplayName(MaemoToolChainFactory::tr("Maemo Gcc for %1").arg(version->displayName())); + setDisplayName(MaemoToolChainFactory::tr("Maemo GCC for %1").arg(version->displayName())); } int MaemoToolChain::qtVersionId() const diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp index bccf9cdd9f4..281167e876b 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp @@ -546,7 +546,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo() m_codaInfoDevice->sendSymbianOsDataGetQtVersionCommand(Coda::CodaCallback(this, &S60DeployConfigurationWidget::getQtVersionCommandResult)); m_deviceInfoButton->setEnabled(false); } else - setDeviceInfoLabel(tr("Currently there is no information about device for this connection type."), true); + setDeviceInfoLabel(tr("Currently there is no information about the device for this connection type."), true); } void S60DeployConfigurationWidget::getQtVersionCommandResult(const Coda::CodaCommandResult &result) @@ -570,7 +570,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo() startTable(resultString); QTextStream str(&resultString); - addToTable(str, tr("Qt version: "), ver); + addToTable(str, tr("Qt version:"), ver); QString systemVersion; int symVer = obj.value("symbianVersion").toInt(); @@ -620,7 +620,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo() systemVersion.append(tr("Unrecognised S60 version 0x%1").arg(symVer, 0, 16)); break; } - addToTable(str, tr("OS version: "), systemVersion); + addToTable(str, tr("OS version:"), systemVersion); finishTable(resultString); } setDeviceInfoLabel(resultString); @@ -638,7 +638,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo() QVariantHash obj = result.values[0].toVariant().toHash(); QString romVersion = obj.value("romVersion", tr("unknown")).toString(); romVersion.replace('\n', " "); // The ROM string is split across multiple lines, for some reason. - addToTable(str, tr("ROM version: "), romVersion); + addToTable(str, tr("ROM version:"), romVersion); QString pr = obj.value("prInfo").toString(); if (pr.length()) @@ -668,7 +668,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo() addErrorToTable(str, tr("CODA version: "), tr("Error reading CODA version")); } else { QVariantList version = obj.value("version").toList(); - addToTable(str, tr("CODA version: "), + addToTable(str, tr("CODA version:"), QString("%1.%2.%3").arg(version[0].toInt()) .arg(version[1].toInt()) .arg(version[2].toInt())); @@ -703,7 +703,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo() if (x && y) { startTable(resultString); QTextStream str(&resultString); - addToTable(str, tr("Screen size: "), QString("%1x%2").arg(x).arg(y)); + addToTable(str, tr("Screen size:"), QString("%1x%2").arg(x).arg(y)); finishTable(resultString); setDeviceInfoLabel(resultString); } diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index fd67c274f97..15dda5ff2a9 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -194,7 +194,7 @@ bool VCSBaseClient::vcsFullySynchronousExec(const QString &workingDir, if (!Utils::SynchronousProcess::readDataFromProcess(vcsProcess, m_clientSettings.timeoutMilliSeconds(), output, &stdErr, true)) { Utils::SynchronousProcess::stopProcess(vcsProcess); - outputWindow->appendError(VCSJobRunner::msgTimeout(m_clientSettings.timeoutSeconds())); + outputWindow->appendError(VCSJobRunner::msgTimeout(binary, m_clientSettings.timeoutSeconds())); return false; } if (!stdErr.isEmpty()) diff --git a/src/plugins/vcsbase/vcsjobrunner.cpp b/src/plugins/vcsbase/vcsjobrunner.cpp index 35c031c2222..a2fbdc3140a 100644 --- a/src/plugins/vcsbase/vcsjobrunner.cpp +++ b/src/plugins/vcsbase/vcsjobrunner.cpp @@ -197,9 +197,9 @@ QString VCSJobRunner::msgStartFailed(const QString &binary, const QString &why) arg(QDir::toNativeSeparators(binary), why); } -QString VCSJobRunner::msgTimeout(int timeoutSeconds) +QString VCSJobRunner::msgTimeout(const QString &binary, int timeoutSeconds) { - return tr("Timed out after %1s waiting for mercurial process to finish.").arg(timeoutSeconds); + return tr("Timed out after %1s waiting for the process %2 to finish.").arg(timeoutSeconds).arg(binary); } // Set environment for a VCS process to run in locale "C". Note that there appears @@ -281,7 +281,7 @@ void VCSJobRunner::task(const QSharedPointer &job) if (!Utils::SynchronousProcess::readDataFromProcess(*vcsProcess, m_timeoutMS, &stdOutput, &stdErr, false)) { Utils::SynchronousProcess::stopProcess(*vcsProcess); - emit error(msgTimeout(m_timeoutMS / 1000)); + emit error(msgTimeout(m_binary, m_timeoutMS / 1000)); return; } diff --git a/src/plugins/vcsbase/vcsjobrunner.h b/src/plugins/vcsbase/vcsjobrunner.h index 36c174369be..c5de2f203d0 100644 --- a/src/plugins/vcsbase/vcsjobrunner.h +++ b/src/plugins/vcsbase/vcsjobrunner.h @@ -108,7 +108,7 @@ public: void restart(); static QString msgStartFailed(const QString &binary, const QString &why); - static QString msgTimeout(int timeoutSeconds); + static QString msgTimeout(const QString &binary, int timeoutSeconds); // Set environment for a VCS process to run in locale "C" static void setProcessEnvironment(QProcess *p);