L10n: tr()-Fixes.

This commit is contained in:
Friedemann Kleint
2011-03-02 12:01:34 +01:00
parent ce3ab6f766
commit fcd4c9e194
13 changed files with 43 additions and 45 deletions

View File

@@ -7,11 +7,11 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>283</width> <width>283</width>
<height>255</height> <height>278</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string notr="true"/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
@@ -38,7 +38,7 @@
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="useExistingDirCheckBox"> <widget class="QCheckBox" name="useExistingDirCheckBox">
<property name="toolTip"> <property name="toolTip">
<string>By default branch will fail if the target directory exists, but does not already have a control directory. <string>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</string> This flag will allow branch to proceed</string>
</property> </property>
<property name="text"> <property name="text">

View File

@@ -47,7 +47,7 @@
<item row="2" column="0"> <item row="2" column="0">
<widget class="QRadioButton" name="urlButton"> <widget class="QRadioButton" name="urlButton">
<property name="toolTip"> <property name="toolTip">
<string>e.g. https://[user[:pass]@]host[:port]/[path]</string> <string>for example https://[user[:pass]@]host[:port]/[path]</string>
</property> </property>
<property name="text"> <property name="text">
<string>Specify Url:</string> <string>Specify Url:</string>
@@ -60,7 +60,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>e.g. https://[user[:pass]@]host[:port]/[path]</string> <string>for example https://[user[:pass]@]host[:port]/[path]</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -97,7 +97,7 @@ unconditionally</string>
<item row="3" column="0" colspan="2"> <item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="useExistingDirCheckBox"> <widget class="QCheckBox" name="useExistingDirCheckBox">
<property name="toolTip"> <property name="toolTip">
<string>By default push will fail if the target directory exists, but does not already have a control directory. <string>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</string> This flag will allow push to proceed</string>
</property> </property>
<property name="text"> <property name="text">

View File

@@ -449,8 +449,8 @@ void ExternalToolConfig::setTools(const QMap<QString, QList<ExternalTool *> > &t
itemCopy.append(new ExternalTool(tool)); itemCopy.append(new ExternalTool(tool));
toolsCopy.insert(it.key(), itemCopy); toolsCopy.insert(it.key(), itemCopy);
} }
if (!toolsCopy.contains(QLatin1String(""))) if (!toolsCopy.contains(QString()))
toolsCopy.insert(QLatin1String(""), QList<ExternalTool *>()); toolsCopy.insert(QString(), QList<ExternalTool *>());
m_model->setTools(toolsCopy); m_model->setTools(toolsCopy);
ui->toolTree->expandAll(); ui->toolTree->expandAll();
} }

View File

@@ -138,17 +138,15 @@
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="Utils::PathChooser" name="workingDirectory" native="true"/> <widget class="Utils::PathChooser" name="workingDirectory"/>
</item> </item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QLabel" name="outputLabel"> <widget class="QLabel" name="outputLabel">
<property name="toolTip"> <property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;p&gt;What to do with the executable's standard output.
p, li { white-space: pre-wrap; } &lt;ul&gt;&lt;li&gt;Ignore: Do nothing with it&lt;/li&gt;&lt;li&gt;Show in pane: Show it in the general output pane&lt;/li&gt;&lt;li&gt;Replace selection: Replace the current selection in the current document with it&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt; </string>
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;What to do with the executable's standard output.
&lt;ul&gt;&lt;li&gt;Ignore: Do nothing with it&lt;/li&gt;&lt;li&gt;Show in pane: Show it in the general output pane&lt;/li&gt;&lt;li&gt;Replace selection: Replace the current selection in the current document with it&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="text">
<string>Output:</string> <string>Output:</string>
@@ -177,11 +175,8 @@ p, li { white-space: pre-wrap; }
<item row="5" column="0"> <item row="5" column="0">
<widget class="QLabel" name="errorOutputLabel"> <widget class="QLabel" name="errorOutputLabel">
<property name="toolTip"> <property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;html&gt;&lt;head&gt;&lt;body&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;p &gt;What to do with the executable's standard error output.&lt;/p&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;What to do with the executable's standard error output.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Ignore: Do nothing with it&lt;/li&gt; &lt;ul&gt;&lt;li&gt;Ignore: Do nothing with it&lt;/li&gt;
&lt;li&gt;Show in pane: Show it in the general output pane&lt;/li&gt; &lt;li&gt;Show in pane: Show it in the general output pane&lt;/li&gt;
&lt;li&gt;Replace selection: Replace the current selection in the current document with it&lt;/li&gt; &lt;li&gt;Replace selection: Replace the current selection in the current document with it&lt;/li&gt;

View File

@@ -437,7 +437,8 @@ ExternalTool * ExternalTool::createFromFile(const QString &fileName, QString *er
QFile file(info.absoluteFilePath()); QFile file(info.absoluteFilePath());
if (!file.open(QIODevice::ReadOnly)) { if (!file.open(QIODevice::ReadOnly)) {
if (errorMessage) 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; return 0;
} }
const QByteArray &bytes = file.readAll(); const QByteArray &bytes = file.readAll();
@@ -470,7 +471,8 @@ bool ExternalTool::save(QString *errorMessage) const
QFile file(m_fileName); QFile file(m_fileName);
if (!file.open(QIODevice::WriteOnly)) { if (!file.open(QIODevice::WriteOnly)) {
if (errorMessage) 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; return false;
} }
QXmlStreamWriter out(&file); QXmlStreamWriter out(&file);

View File

@@ -243,7 +243,7 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
cmd = am->registerAction(m_dumpLogAction, cmd = am->registerAction(m_dumpLogAction,
DUMP_LOG, globalcontext); DUMP_LOG, globalcontext);
//cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+L"))); //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); mdebug->addAction(cmd);
#endif #endif
#endif #endif

View File

@@ -291,7 +291,8 @@ bool QmlEngine::canDisplayTooltip() const
void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/) 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); const int index = msg.indexOf(qddserver);
if (index != -1) { if (index != -1) {
@@ -325,9 +326,8 @@ void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/)
QMessageBox *infoBox = new QMessageBox(core->mainWindow()); QMessageBox *infoBox = new QMessageBox(core->mainWindow());
infoBox->setIcon(QMessageBox::Critical); infoBox->setIcon(QMessageBox::Critical);
infoBox->setWindowTitle(tr("Qt Creator")); infoBox->setWindowTitle(tr("Qt Creator"));
//: %3 is detailed error message //: %1 is detailed error message
infoBox->setText(tr("Could not connect to the in-process QML debugger:\n" infoBox->setText(tr("Could not connect to the in-process QML debugger:\n%1")
"%3")
.arg(errorMessage)); .arg(errorMessage));
infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help); infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help);
infoBox->setDefaultButton(QMessageBox::Ok); infoBox->setDefaultButton(QMessageBox::Ok);
@@ -338,7 +338,7 @@ void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/)
infoBox->show(); 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 ... // we won't get debugging output, so just try to connect ...
d->m_adapter.beginConnection(); d->m_adapter.beginConnection();
} }
@@ -821,13 +821,14 @@ void QmlEngine::messageReceived(const QByteArray &message)
QString error; QString error;
stream >> error; stream >> error;
logString += QLatin1String(" ") + error; logString += QLatin1Char(' ');
logString += error;
logMessage(LogReceive, logString); logMessage(LogReceive, logString);
QString msg = stackFrames.isEmpty() QString msg = stackFrames.isEmpty()
? tr("<p>An Uncaught Exception occurred:</p><p>%2</p>") ? tr("<p>An uncaught exception occurred:</p><p>%1</p>")
.arg(Qt::escape(error)) .arg(Qt::escape(error))
: tr("<p>An Uncaught Exception occurred in <i>%1</i>:</p><p>%2</p>") : tr("<p>An uncaught exception occurred in <i>%1</i>:</p><p>%2</p>")
.arg(stackFrames.value(0).file, Qt::escape(error)); .arg(stackFrames.value(0).file, Qt::escape(error));
showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg); showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg);
} else { } else {

View File

@@ -76,7 +76,7 @@ bool QmlDebuggingLibrary::build(const QString &directory, const QString &makeCo
const Utils::Environment &env, const QString &targetMode, const Utils::Environment &env, const QString &targetMode,
const QStringList &qmakeArguments, QString *output, QString *errorMessage) 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"), QLatin1String("qmljsdebugger.pro"),
directory, makeCommand, qmakeCommand, mkspec, env, targetMode, directory, makeCommand, qmakeCommand, mkspec, env, targetMode,
qmakeArguments, output, errorMessage); qmakeArguments, output, errorMessage);
@@ -111,7 +111,7 @@ QString QmlDebuggingLibrary::copy(const QString &qtInstallData, QString *errorMe
} }
} }
*errorMessage = QCoreApplication::translate("Qt4ProjectManager::QmlDebuggingLibrary", *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); .arg(directories.join(QLatin1String("\n- ")), *errorMessage);
return QString(); return QString();
} }

View File

@@ -193,7 +193,7 @@ void MaemoToolChain::setQtVersionId(int id)
m_targetAbi = version->qtAbis().at(0); m_targetAbi = version->qtAbis().at(0);
updateId(); 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 int MaemoToolChain::qtVersionId() const

View File

@@ -546,7 +546,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo()
m_codaInfoDevice->sendSymbianOsDataGetQtVersionCommand(Coda::CodaCallback(this, &S60DeployConfigurationWidget::getQtVersionCommandResult)); m_codaInfoDevice->sendSymbianOsDataGetQtVersionCommand(Coda::CodaCallback(this, &S60DeployConfigurationWidget::getQtVersionCommandResult));
m_deviceInfoButton->setEnabled(false); m_deviceInfoButton->setEnabled(false);
} else } 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) void S60DeployConfigurationWidget::getQtVersionCommandResult(const Coda::CodaCommandResult &result)
@@ -570,7 +570,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo()
startTable(resultString); startTable(resultString);
QTextStream str(&resultString); QTextStream str(&resultString);
addToTable(str, tr("Qt version: "), ver); addToTable(str, tr("Qt version:"), ver);
QString systemVersion; QString systemVersion;
int symVer = obj.value("symbianVersion").toInt(); 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)); systemVersion.append(tr("Unrecognised S60 version 0x%1").arg(symVer, 0, 16));
break; break;
} }
addToTable(str, tr("OS version: "), systemVersion); addToTable(str, tr("OS version:"), systemVersion);
finishTable(resultString); finishTable(resultString);
} }
setDeviceInfoLabel(resultString); setDeviceInfoLabel(resultString);
@@ -638,7 +638,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo()
QVariantHash obj = result.values[0].toVariant().toHash(); QVariantHash obj = result.values[0].toVariant().toHash();
QString romVersion = obj.value("romVersion", tr("unknown")).toString(); QString romVersion = obj.value("romVersion", tr("unknown")).toString();
romVersion.replace('\n', " "); // The ROM string is split across multiple lines, for some reason. 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(); QString pr = obj.value("prInfo").toString();
if (pr.length()) if (pr.length())
@@ -668,7 +668,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo()
addErrorToTable(str, tr("CODA version: "), tr("Error reading CODA version")); addErrorToTable(str, tr("CODA version: "), tr("Error reading CODA version"));
} else { } else {
QVariantList version = obj.value("version").toList(); QVariantList version = obj.value("version").toList();
addToTable(str, tr("CODA version: "), addToTable(str, tr("CODA version:"),
QString("%1.%2.%3").arg(version[0].toInt()) QString("%1.%2.%3").arg(version[0].toInt())
.arg(version[1].toInt()) .arg(version[1].toInt())
.arg(version[2].toInt())); .arg(version[2].toInt()));
@@ -703,7 +703,7 @@ void S60DeployConfigurationWidget::updateDeviceInfo()
if (x && y) { if (x && y) {
startTable(resultString); startTable(resultString);
QTextStream str(&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); finishTable(resultString);
setDeviceInfoLabel(resultString); setDeviceInfoLabel(resultString);
} }

View File

@@ -194,7 +194,7 @@ bool VCSBaseClient::vcsFullySynchronousExec(const QString &workingDir,
if (!Utils::SynchronousProcess::readDataFromProcess(vcsProcess, m_clientSettings.timeoutMilliSeconds(), if (!Utils::SynchronousProcess::readDataFromProcess(vcsProcess, m_clientSettings.timeoutMilliSeconds(),
output, &stdErr, true)) { output, &stdErr, true)) {
Utils::SynchronousProcess::stopProcess(vcsProcess); Utils::SynchronousProcess::stopProcess(vcsProcess);
outputWindow->appendError(VCSJobRunner::msgTimeout(m_clientSettings.timeoutSeconds())); outputWindow->appendError(VCSJobRunner::msgTimeout(binary, m_clientSettings.timeoutSeconds()));
return false; return false;
} }
if (!stdErr.isEmpty()) if (!stdErr.isEmpty())

View File

@@ -197,9 +197,9 @@ QString VCSJobRunner::msgStartFailed(const QString &binary, const QString &why)
arg(QDir::toNativeSeparators(binary), 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 // Set environment for a VCS process to run in locale "C". Note that there appears
@@ -281,7 +281,7 @@ void VCSJobRunner::task(const QSharedPointer<VCSJob> &job)
if (!Utils::SynchronousProcess::readDataFromProcess(*vcsProcess, m_timeoutMS, &stdOutput, &stdErr, false)) { if (!Utils::SynchronousProcess::readDataFromProcess(*vcsProcess, m_timeoutMS, &stdOutput, &stdErr, false)) {
Utils::SynchronousProcess::stopProcess(*vcsProcess); Utils::SynchronousProcess::stopProcess(*vcsProcess);
emit error(msgTimeout(m_timeoutMS / 1000)); emit error(msgTimeout(m_binary, m_timeoutMS / 1000));
return; return;
} }

View File

@@ -108,7 +108,7 @@ public:
void restart(); void restart();
static QString msgStartFailed(const QString &binary, const QString &why); 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" // Set environment for a VCS process to run in locale "C"
static void setProcessEnvironment(QProcess *p); static void setProcessEnvironment(QProcess *p);