From 24cadd34a1c445d6905a70a040724dc1698172d9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@nokia.com> Date: Fri, 10 Sep 2010 10:51:43 +0200 Subject: [PATCH] I10N: First translation fixes for 2.1 Fix README, some spelling errors, remove contractions, exclamation marks, correct some plural forms, join split messages. Add QCoreApplication::translate to non-Q_OBJECT-classes. Fix some lupdate warnings about discarding meta-data (//:). --- share/qtcreator/translations/README | 4 +- src/plugins/debugger/gdb/abstractgdbadapter.h | 1 - src/plugins/debugger/gdb/classicgdbengine.cpp | 2 - src/plugins/debugger/gdb/gdbengine.cpp | 3 +- src/plugins/debugger/snapshothandler.cpp | 28 +++++++------- src/plugins/debugger/snapshothandler.h | 2 - src/plugins/debugger/stackhandler.cpp | 1 - src/plugins/debugger/watchdata.cpp | 4 ++ src/plugins/designer/formwindowfile.cpp | 2 +- src/plugins/help/filtersettingspage.cpp | 38 ++++++++++--------- src/plugins/help/filtersettingspage.h | 1 + src/plugins/imageviewer/imageviewer.cpp | 2 +- .../projectexplorer/buildstepspage.cpp | 2 +- .../projectfilewizardextension.cpp | 10 +++-- .../runsettingspropertiespage.cpp | 2 +- .../librarydetailscontroller.cpp | 2 +- .../qt-maemo/maemoconfigtestdialog.cpp | 2 +- .../qt-maemo/maemodeploystep.cpp | 2 +- .../qt-maemo/maemodeploystepfactory.cpp | 5 ++- .../qt-maemo/maemopackagecreationfactory.cpp | 5 ++- .../qt-maemo/maemopackagecreationstep.cpp | 2 +- .../qt-maemo/maemorunconfigurationwidget.cpp | 12 +++--- .../qt-maemo/maemosettingswidget.cpp | 2 +- .../qt-s60/passphraseforkeydialog.cpp | 2 +- .../qt-s60/s60createpackagestep.cpp | 2 +- .../wizards/qmlstandaloneapp.cpp | 22 ++++++++--- .../resourceeditor/resourceeditorw.cpp | 6 +-- .../tasklist/stopmonitoringhandler.cpp | 11 +++++- .../highlightersettingspage.cpp | 2 +- .../welcome/communitywelcomepagewidget.cpp | 2 +- src/shared/symbianutils/trkutils.cpp | 1 - 31 files changed, 107 insertions(+), 75 deletions(-) diff --git a/share/qtcreator/translations/README b/share/qtcreator/translations/README index 9e2e28be29c..f124f887593 100644 --- a/share/qtcreator/translations/README +++ b/share/qtcreator/translations/README @@ -3,12 +3,14 @@ How To add translations to Qt Creator - Coordinate over the mailing list to avoid duplicate work. +- Read the instructions at http://qt.gitorious.org/qt/pages/QtLocalization + - Add your language to the LANGUAGES line in translations.pro. Don't qualify it with a country unless it is reasonable to expect country-specific variants. Skip this step if updating an existing translation, obviously. -- Run "make ts". +- Run "make ts-<lang>". If your Qt version is too old, you may create a template by running lconvert --drop-translations qtcreator_de.ts -o qtcreator_<yours>.ts diff --git a/src/plugins/debugger/gdb/abstractgdbadapter.h b/src/plugins/debugger/gdb/abstractgdbadapter.h index 0f9199f84b0..8515fa31dc1 100644 --- a/src/plugins/debugger/gdb/abstractgdbadapter.h +++ b/src/plugins/debugger/gdb/abstractgdbadapter.h @@ -31,7 +31,6 @@ #define DEBUGGER_ABSTRACT_GDB_ADAPTER #include <QtCore/QObject> -#include <QtCore/QProcess> #include "gdbengine.h" diff --git a/src/plugins/debugger/gdb/classicgdbengine.cpp b/src/plugins/debugger/gdb/classicgdbengine.cpp index 8a3490107d5..2d39ffb3aa7 100644 --- a/src/plugins/debugger/gdb/classicgdbengine.cpp +++ b/src/plugins/debugger/gdb/classicgdbengine.cpp @@ -441,7 +441,6 @@ void GdbEngine::handleDebuggingHelperValue3Classic(const GdbResponse &response) out.chop(1); QList<QByteArray> list = out.split(' '); if (list.isEmpty()) { - //: Value for variable data.setError(WatchData::msgNotInScope()); data.setAllUnneeded(); insertData(data); @@ -487,7 +486,6 @@ void GdbEngine::handleDebuggingHelperValue3Classic(const GdbResponse &response) } } } else { - //: Value for variable data.setError(WatchData::msgNotInScope()); data.setAllUnneeded(); insertData(data); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index cc0fc14c701..c0ecd0086ea 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -3525,15 +3525,14 @@ WatchData GdbEngine::localVariable(const GdbMi &item, WatchData data; QString nam = _(name); data.iname = "local." + name + QByteArray::number(n + 1); - //: Variable %1 is the variable name, %2 is a simple count. data.name = WatchData::shadowedName(nam, n); if (uninitializedVariables.contains(data.name)) { data.setError(WatchData::msgNotInScope()); return data; } + setWatchDataValue(data, item); //: Type of local variable or parameter shadowed by another //: variable of the same name in a nested block. - setWatchDataValue(data, item); data.setType(GdbEngine::tr("<shadowed>").toUtf8()); data.setHasChildren(false); return data; diff --git a/src/plugins/debugger/snapshothandler.cpp b/src/plugins/debugger/snapshothandler.cpp index c9bf24303bb..774023315dc 100644 --- a/src/plugins/debugger/snapshothandler.cpp +++ b/src/plugins/debugger/snapshothandler.cpp @@ -70,9 +70,9 @@ QString SnapshotData::toString() const { QString res; QTextStream str(&res); - str << SnapshotHandler::tr("Function:") << ' ' << function() << ' ' +/* str << SnapshotHandler::tr("Function:") << ' ' << function() << ' ' << SnapshotHandler::tr("File:") << ' ' << m_location << ' ' - << SnapshotHandler::tr("Date:") << ' ' << m_date.toString(); + << SnapshotHandler::tr("Date:") << ' ' << m_date.toString(); */ return res; } @@ -81,11 +81,12 @@ QString SnapshotData::toToolTip() const QString res; QTextStream str(&res); str << "<html><body><table>" +/* << "<tr><td>" << SnapshotHandler::tr("Function:") << "</td><td>" << function() << "</td></tr>" << "<tr><td>" << SnapshotHandler::tr("File:") << "</td><td>" << QDir::toNativeSeparators(m_location) << "</td></tr>" - << "</table></body></html>"; + << "</table></body></html>"; */ return res; } @@ -167,7 +168,8 @@ QVariant SnapshotHandler::data(const QModelIndex &index, int role) const const DebuggerStartParameters &sp = engine->startParameters(); - if (role == Qt::DisplayRole) { + switch (role) { + case Qt::DisplayRole: switch (index.column()) { case 0: return sp.displayName; @@ -175,18 +177,18 @@ QVariant SnapshotHandler::data(const QModelIndex &index, int role) const return sp.coreFile.isEmpty() ? sp.executable : sp.coreFile; } return QVariant(); - } - if (role == Qt::ToolTipRole) { - //: Tooltip for variable - //return snapshot.toToolTip(); - } + case Qt::ToolTipRole: + return QVariant(); - if (role == Qt::DecorationRole && index.column() == 0) { - // Return icon that indicates whether this is the active stack frame - return (index.row() == m_currentIndex) ? m_positionIcon : m_emptyIcon; - } + case Qt::DecorationRole: // Return icon that indicates whether this is the active stack frame + if (index.column() == 0) + return (index.row() == m_currentIndex) ? m_positionIcon : m_emptyIcon; + break; + default: + break; + } return QVariant(); } diff --git a/src/plugins/debugger/snapshothandler.h b/src/plugins/debugger/snapshothandler.h index 84659af2911..1e437815daf 100644 --- a/src/plugins/debugger/snapshothandler.h +++ b/src/plugins/debugger/snapshothandler.h @@ -30,8 +30,6 @@ #ifndef DEBUGGER_SNAPSHOTHANDLER_H #define DEBUGGER_SNAPSHOTHANDLER_H -#include "stackframe.h" - #include <QtCore/QAbstractItemModel> #include <QtCore/QPointer> diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index 0e46db76f74..dbf9deee52e 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -130,7 +130,6 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const if (role == StackFrameAddressRole) return frame.address; - //: Tooltip for variable if (role == Qt::ToolTipRole) return frame.toToolTip(); diff --git a/src/plugins/debugger/watchdata.cpp b/src/plugins/debugger/watchdata.cpp index eecc3ad4908..591f420bdfe 100644 --- a/src/plugins/debugger/watchdata.cpp +++ b/src/plugins/debugger/watchdata.cpp @@ -244,12 +244,16 @@ QString WatchData::toToolTip() const QString WatchData::msgNotInScope() { + //: Value of variable in Debugger Locals display for variables out of scope (stopped above initialization). static const QString rc = QCoreApplication::translate("Debugger::Internal::WatchData", "<not in scope>"); return rc; } const QString &WatchData::shadowedNameFormat() { + //: Display of variables shadowed by variables of the same name + //: in nested scopes: Variable %1 is the variable name, %2 is a + //: simple count. static const QString format = QCoreApplication::translate("Debugger::Internal::WatchData", "%1 <shadowed %2>"); return format; } diff --git a/src/plugins/designer/formwindowfile.cpp b/src/plugins/designer/formwindowfile.cpp index e176010a7af..f50eafa595c 100644 --- a/src/plugins/designer/formwindowfile.cpp +++ b/src/plugins/designer/formwindowfile.cpp @@ -58,7 +58,7 @@ FormWindowFile::FormWindowFile(QDesignerFormWindowInterface *form, QObject *pare this, SLOT(slotFormWindowRemoved(QDesignerFormWindowInterface*))); } -bool FormWindowFile::save(const QString &name /*= QString()*/) +bool FormWindowFile::save(const QString &name /* = QString() */) { const QString actualName = name.isEmpty() ? fileName() : name; diff --git a/src/plugins/help/filtersettingspage.cpp b/src/plugins/help/filtersettingspage.cpp index fcb143dcb24..faf02d941ca 100644 --- a/src/plugins/help/filtersettingspage.cpp +++ b/src/plugins/help/filtersettingspage.cpp @@ -252,23 +252,27 @@ bool FilterSettingsPage::matches(const QString &s) const return m_searchKeywords.contains(s, Qt::CaseInsensitive); } -void FilterSettingsPage::updateFilterDescription(const QString &filter) +QString FilterSettingsPage::msgFilterLabel(const QString &filter) const { + if (m_filterMap.keys().isEmpty()) + return tr("No user defined filters available or no filter selected."); + const QStringList &checkedList = m_filterMap.value(filter); - if (!m_filterMap.keys().isEmpty()) { - const QString prefix = tr("The filter \"%1\" will").arg(filter); - if (checkedList.isEmpty()) { - m_ui.label->setText(prefix + tr(" show every documentation file " - "available, as no attributes are specified.")); - } else if (checkedList.count() == 1) { - m_ui.label->setText(prefix + tr(" only show documentation files that" - " have the attribute %2 specified.").arg(checkedList.first())); - } else { - m_ui.label->setText(prefix + tr(" only show documentation files that" - " have the attributes %2 specified.").arg(checkedList.join(", "))); - } - } else { - m_ui.label->setText(tr("No user defined filters available or no filter " - "selected.")); - } + if (checkedList.isEmpty()) + return tr("The filter \"%1\" will show every documentation file" + " available, as no attributes are specified.").arg(filter); + + if (checkedList.size() == 1) + return tr("The filter \"%1\" will only show documentation files that" + " have the attribute %2 specified."). + arg(filter, checkedList.first()); + + return tr("The filter \"%1\" will only show documentation files that" + " have the attributes %2 specified."). + arg(filter, checkedList.join(QLatin1String(", "))); +} + +void FilterSettingsPage::updateFilterDescription(const QString &filter) +{ + m_ui.label->setText(msgFilterLabel(filter)); } diff --git a/src/plugins/help/filtersettingspage.h b/src/plugins/help/filtersettingspage.h index b2b1982b7e0..1af5549e318 100644 --- a/src/plugins/help/filtersettingspage.h +++ b/src/plugins/help/filtersettingspage.h @@ -69,6 +69,7 @@ private: void updateFilterDescription(const QString &filter); private: + QString msgFilterLabel(const QString &filter) const; Ui::FilterSettingsPage m_ui; FilterMap m_filterMap; diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp index 220cabc5f24..62b74f1daa8 100644 --- a/src/plugins/imageviewer/imageviewer.cpp +++ b/src/plugins/imageviewer/imageviewer.cpp @@ -202,7 +202,7 @@ QWidget *ImageViewer::toolBar() void ImageViewer::scaleFactorUpdate(qreal factor) { - QString info = tr("%1%").arg(QString::number(factor * 100, 'f', 2)); + const QString info = QString::number(factor * 100, 'f', 2) + QLatin1Char('%'); d_ptr->ui_toolbar.labelInfo->setText(info); } diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp index 4ddf9329b48..304d7e1b450 100644 --- a/src/plugins/projectexplorer/buildstepspage.cpp +++ b/src/plugins/projectexplorer/buildstepspage.cpp @@ -259,7 +259,7 @@ void BuildStepListWidget::stepRemove(int pos) } else { QMessageBox::warning(Core::ICore::instance()->mainWindow(), tr("Removing Step failed"), - tr("Can't remove build step while building"), + tr("Cannot remove build step while building"), QMessageBox::Ok, QMessageBox::Ok); } } diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index c0d77b1387a..083e629863f 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -255,12 +255,14 @@ void ProjectFileWizardExtension::firstExtensionPageShown( // Oh we do have someone that deploys it // then the best match is NONE // We display a label explaining that and rename <None> to - // <Implictly Add> - m_context->page->setNoneLabel(tr("<Implictly Add>")); + // <Implicitly Add> + m_context->page->setNoneLabel(tr("<Implicitly Add>")); QString text = tr("The files are implicitly added to the projects:\n"); - foreach (ProjectEntry project, deployingProjects) - text += project.fileName + "\n"; + foreach (const ProjectEntry &project, deployingProjects) { + text += project.fileName; + text += QLatin1Char('\n'); + } m_context->page->setAdditionalInfo(text); bestProjectIndex = -1; diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.cpp b/src/plugins/projectexplorer/runsettingspropertiespage.cpp index 64ad5c9d3b1..194ff6f66c5 100644 --- a/src/plugins/projectexplorer/runsettingspropertiespage.cpp +++ b/src/plugins/projectexplorer/runsettingspropertiespage.cpp @@ -256,7 +256,7 @@ void RunSettingsWidget::removeRunConfiguration() { RunConfiguration *rc = m_target->activeRunConfiguration(); QMessageBox msgBox(QMessageBox::Question, tr("Remove Run Configuration?"), - tr("Do you really want to delete run configuration <b>%1</b>.").arg(rc->displayName()), + tr("Do you really want to delete the run configuration <b>%1</b>?").arg(rc->displayName()), QMessageBox::Yes|QMessageBox::No, this); msgBox.setDefaultButton(QMessageBox::No); msgBox.setEscapeButton(QMessageBox::No); diff --git a/src/plugins/qt4projectmanager/librarydetailscontroller.cpp b/src/plugins/qt4projectmanager/librarydetailscontroller.cpp index 9c96ef798fe..3cf3e5dbec9 100644 --- a/src/plugins/qt4projectmanager/librarydetailscontroller.cpp +++ b/src/plugins/qt4projectmanager/librarydetailscontroller.cpp @@ -888,7 +888,7 @@ void InternalLibraryDetailsController::updateProFile() if (!configVar.contains(QLatin1String("plugin"))) { const QString relProFilePath = rootDir.relativeFilePath(proFilePath); TargetInformation targetInfo = proFileNode->targetInformation(); - const QString itemToolTip = tr("%1 (%2)").arg(targetInfo.target).arg(relProFilePath); + const QString itemToolTip = QString::fromLatin1("%1 (%2)").arg(targetInfo.target).arg(relProFilePath); m_proFileNodes.append(proFileNode); libraryDetailsWidget()->libraryComboBox->addItem(targetInfo.target); libraryDetailsWidget()->libraryComboBox->setItemData( diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp index 5f0413f21c7..1413dfa40fc 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp @@ -160,7 +160,7 @@ void MaemoConfigTestDialog::handleMadDeveloperTestProcessFinished(int exitStatus } else if (m_madDeveloperTestProcess->exitCode() != 0) { m_ui->errorLabel->setText(m_ui->errorLabel->text() + QLatin1String("<br>") + tr("Mad Developer is not installed.<br>" - "You will not be able to deploy to this device!")); + "You will not be able to deploy to this device.")); } if (m_ui->errorLabel->text().isEmpty()) { QPalette palette = m_ui->errorLabel->palette(); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp index 5d8d32545c9..baf63ffcbbc 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp @@ -278,7 +278,7 @@ MaemoDeviceConfig MaemoDeployStep::deviceConfig() const void MaemoDeployStep::start() { if (!m_canStart) { - raiseError(tr("Can't start deployment, haven't cleaned up from last time yet.")); + raiseError(tr("Cannot start deployment as the clean-up from the last time has not yet been done.")); return; } m_cleanupTimer->stop(); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepfactory.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepfactory.cpp index ebef6d6288b..c5560fbd573 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepfactory.cpp @@ -8,6 +8,8 @@ #include <projectexplorer/target.h> #include <qt4projectmanager/qt4projectmanagerconstants.h> +#include <QtCore/QCoreApplication> + using namespace ProjectExplorer; namespace Qt4ProjectManager { @@ -30,7 +32,8 @@ QStringList MaemoDeployStepFactory::availableCreationIds(BuildStepList *parent) QString MaemoDeployStepFactory::displayNameForId(const QString &id) const { if (id == MaemoDeployStep::Id) - return(tr("Deploy to device")); + return QCoreApplication::translate("Qt4ProjectManager::Internal::MaemoDeployStepFactory", + "Deploy to device"); return QString(); } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationfactory.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationfactory.cpp index d6e1873f696..85383867744 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationfactory.cpp @@ -50,6 +50,8 @@ #include <projectexplorer/target.h> #include <qt4projectmanagerconstants.h> +#include <QtCore/QCoreApplication> + using ProjectExplorer::BuildStepList; using ProjectExplorer::BuildStep; @@ -73,7 +75,8 @@ QStringList MaemoPackageCreationFactory::availableCreationIds(ProjectExplorer::B QString MaemoPackageCreationFactory::displayNameForId(const QString &id) const { if (id == MaemoPackageCreationStep::CreatePackageId) - return tr("Create Debian Package"); + return QCoreApplication::translate("Qt4ProjectManager::Internal::MaemoPackageCreationFactory", + "Create Debian Package"); return QString(); } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp index 72e23876436..4d61b78f5a8 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp @@ -222,7 +222,7 @@ bool MaemoPackageCreationStep::copyDebianFiles() } QDir buildDir(buildDirectory()); if (!buildDir.mkdir("debian")) { - raiseError(tr("Could not create debian directory '%1'.") + raiseError(tr("Could not create Debian directory '%1'.") .arg(debianDirPath)); return false; } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp index a2212eec2cd..bafd3eab221 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp @@ -446,18 +446,18 @@ void MaemoRunConfigurationWidget::updateMountWarning() = m_runConfiguration->remoteMounts()->validMountSpecificationCount(); if (mountDirCount > availablePortCount) { mountWarning = tr("WARNING: You want to mount %1 directories, but " - "your device has only %2 free ports.<br>You will not be able " - "to run this configuration.") - .arg(mountDirCount).arg(availablePortCount); + "your device has only %n free ports.<br>You will not be able " + "to run this configuration.", 0, availablePortCount) + .arg(mountDirCount); } else if (mountDirCount > 0) { const int portsLeftByDebuggers = availablePortCount - 1 - m_runConfiguration->useQmlDebugger(); if (mountDirCount > portsLeftByDebuggers) { mountWarning = tr("WARNING: You want to mount %1 directories, " - "but only %2 ports on the device will be available " + "but only %n ports on the device will be available " "in debug mode. <br>You will not be able to debug your " - "application with this configuration."). - arg(mountDirCount).arg(portsLeftByDebuggers); + "application with this configuration.", 0, portsLeftByDebuggers). + arg(mountDirCount); } } } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp index ba2fa97eb6f..13aeceedbe1 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosettingswidget.cpp @@ -481,7 +481,7 @@ void MaemoSettingsWidget::updatePortsWarningLabel() m_ui->portsWarningLabel->clear(); } else { m_ui->portsWarningLabel->setText(QLatin1String("<font color=\"red\">") - + tr("You'll need at least one port!") + QLatin1String("</font>")); + + tr("You will need at least one port.") + QLatin1String("</font>")); } } diff --git a/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp b/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp index 165898c5b39..7ff790063b9 100644 --- a/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp @@ -60,7 +60,7 @@ PassphraseForKeyDialog::PassphraseForKeyDialog(const QString &keyName, QWidget * m_checkBox = new QCheckBox(this); m_checkBox->setText(tr("Save passphrase")); m_checkBox->setObjectName(QString::fromUtf8("checkBox")); - m_checkBox->setToolTip(tr("This is an insecure option. Password will be saved as a plain text!")); + m_checkBox->setToolTip(tr("This is an insecure option. The password will be saved as a plain text.")); formLayout->setWidget(1, QFormLayout::LabelRole, m_checkBox); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp index a5d7c9ec95d..22008167968 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp @@ -167,7 +167,7 @@ bool S60CreatePackageStep::init() // Try to detect command in environment const QString tmp = buildConfiguration()->environment().searchInPath(m_makeCmd); if (tmp.isEmpty()) { - emit addOutput(tr("Could not find make command: %1 in the build environment").arg(m_makeCmd), BuildStep::ErrorOutput); + emit addOutput(tr("Could not find make command '%1' in the build environment").arg(m_makeCmd), BuildStep::ErrorOutput); return false; } m_makeCmd = tmp; diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp index 3d6488bb061..656f6aac645 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp @@ -33,6 +33,7 @@ #include <QtCore/QFile> #include <QtCore/QRegExp> #include <QtCore/QTextStream> +#include <QtCore/QCoreApplication> #ifndef CREATORLESSTEST #include <coreplugin/icore.h> @@ -233,7 +234,9 @@ bool QmlStandaloneApp::setExternalModules(const QStringList &uris, m_importPaths.clear(); foreach (const QFileInfo &importPath, importPaths) { if (!importPath.exists()) { - m_error = tr("The Qml import path '%1' cannot be found.") + m_error = QCoreApplication::translate( + "Qt4ProjectManager::Internal::QmlStandaloneApp", + "The Qml import path '%1' cannot be found.") .arg(QDir::toNativeSeparators(importPath.filePath())); return false; } else { @@ -255,7 +258,9 @@ bool QmlStandaloneApp::setExternalModules(const QStringList &uris, } } if (modulesCount == m_modules.count()) { // no module was added - m_error = tr("The Qml module '%1' cannot be found.").arg(uri); + m_error = QCoreApplication::translate( + "Qt4ProjectManager::Internal::QmlStandaloneApp", + "The Qml module '%1' cannot be found.").arg(uri); return false; } } @@ -455,7 +460,9 @@ bool QmlStandaloneApp::addCppPlugin(const QString &qmldirLine, QmlModule *module const QStringList qmldirLineElements = qmldirLine.split(QLatin1Char(' '), QString::SkipEmptyParts); if (qmldirLineElements.count() < 2) { - m_error = tr("Invalid '%1' entry in '%2' of module '%3'.") + m_error = QCoreApplication::translate( + "Qt4ProjectManager::Internal::QmlStandaloneApp", + "Invalid '%1' entry in '%2' of module '%3'.") .arg(qmldir_plugin).arg(qmldir).arg(module->uri); return false; } @@ -482,7 +489,9 @@ bool QmlStandaloneApp::addCppPlugin(const QString &qmldirLine, QmlModule *module } else if (proFile_guess4.exists()) { foundProFile = proFile_guess4.canonicalFilePath(); } else { - m_error = tr("No .pro file for plugin '%1' cannot be found.").arg(name); + m_error = QCoreApplication::translate( + "Qt4ProjectManager::Internal::QmlStandaloneApp", + "No .pro file for plugin '%1' cannot be found.").arg(name); return false; } QmlCppPlugin *plugin = @@ -700,7 +709,10 @@ bool QmlStandaloneApp::updateFiles(const QList<GeneratedFileInfo> &list, QString return false; QFile file(info.fileInfo.absoluteFilePath()); if (!file.open(QIODevice::WriteOnly) || file.write(data) == -1) { - error = tr("Could not write file '%1'.").arg(QDir::toNativeSeparators(info.fileInfo.canonicalFilePath())); + error = QCoreApplication::translate( + "Qt4ProjectManager::Internal::QmlStandaloneApp", + "Could not write file '%1'."). + arg(QDir::toNativeSeparators(info.fileInfo.canonicalFilePath())); return false; } } diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index 21af9efc8b8..a8f48658c87 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -107,7 +107,7 @@ bool ResourceEditorW::createNew(const QString &contents) return rc; } -bool ResourceEditorW::open(const QString &fileName /*= QString()*/) +bool ResourceEditorW::open(const QString &fileName /* = QString() */) { if (debugResourceEditorW) qDebug() << "ResourceEditorW::open: " << fileName; @@ -133,10 +133,10 @@ bool ResourceEditorW::open(const QString &fileName /*= QString()*/) return true; } -bool ResourceEditorFile::save(const QString &name /*= QString()*/) +bool ResourceEditorFile::save(const QString &name /* = QString() */) { if (debugResourceEditorW) - qDebug() << ">ResourceEditorW::save: " << name; + qDebug(">ResourceEditorW::save: %s", qPrintable(name)); const QString oldFileName = fileName(); const QString actualName = name.isEmpty() ? oldFileName : name; diff --git a/src/plugins/tasklist/stopmonitoringhandler.cpp b/src/plugins/tasklist/stopmonitoringhandler.cpp index 5aad51cb21f..11997e44ab0 100644 --- a/src/plugins/tasklist/stopmonitoringhandler.cpp +++ b/src/plugins/tasklist/stopmonitoringhandler.cpp @@ -35,6 +35,7 @@ #include <projectexplorer/task.h> #include <QtGui/QAction> +#include <QtCore/QCoreApplication> using namespace TaskList; using namespace TaskList::Internal; @@ -63,7 +64,13 @@ void StopMonitoringHandler::handle(const ProjectExplorer::Task &task) QAction *StopMonitoringHandler::createAction(QObject *parent) { - QAction *stopMonitoringAction = new QAction(tr("Stop monitoring"), parent); - stopMonitoringAction->setToolTip(tr("Stop monitoring task files.")); + const QString text = + QCoreApplication::translate("TaskList::Internal::StopMonitoringHandler", + "Stop monitoring"); + const QString toolTip = + QCoreApplication::translate("TaskList::Internal::StopMonitoringHandler", + "Stop monitoring task files."); + QAction *stopMonitoringAction = new QAction(text, parent); + stopMonitoringAction->setToolTip(toolTip); return stopMonitoringAction; } diff --git a/src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp b/src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp index bcec96676e5..d220d182063 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp +++ b/src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp @@ -174,7 +174,7 @@ void HighlighterSettingsPage::resetDefinitionsLocation() const QString &location = findDefinitionsLocation(); if (location.isEmpty()) QMessageBox::information(0, tr("Autodetect Definitions"), - tr("Existent definitions could not be found.")); + tr("No existing definitions could be found.")); else m_d->m_page.fallbackDefinitionFilesPath->setPath(location); } diff --git a/src/plugins/welcome/communitywelcomepagewidget.cpp b/src/plugins/welcome/communitywelcomepagewidget.cpp index 725df177202..77a05b64cd9 100644 --- a/src/plugins/welcome/communitywelcomepagewidget.cpp +++ b/src/plugins/welcome/communitywelcomepagewidget.cpp @@ -93,8 +93,8 @@ CommunityWelcomePageWidget::CommunityWelcomePageWidget(QWidget *parent) : ui->newsTreeWidget, SLOT(addNewsItem(QString, QString, QString)), Qt::QueuedConnection); connect(this, SIGNAL(startRssFetching(QUrl)), m_rssFetcher, SLOT(fetch(QUrl)), Qt::QueuedConnection); - //: Add localized feed here only if one exists m_rssFetcher->start(QThread::LowestPriority); + //: Add localized feed here only if one exists emit startRssFetching(QUrl(tr("http://labs.trolltech.com/blogs/feed"))); populateWelcomeTreeWidget(supportSites, sizeof(supportSites)/sizeof(Site), ui->supportSitesTreeWidget); diff --git a/src/shared/symbianutils/trkutils.cpp b/src/shared/symbianutils/trkutils.cpp index d09ed373d23..e27ee84da6d 100644 --- a/src/shared/symbianutils/trkutils.cpp +++ b/src/shared/symbianutils/trkutils.cpp @@ -137,7 +137,6 @@ QString Session::deviceDescription(unsigned verbose) const ? QCoreApplication::translate("trk::Session", "big endian") : QCoreApplication::translate("trk::Session", "little endian"); msg = msg.arg(formatCpu(cpuMajor, cpuMinor)).arg(endianness); - //: The separator in a list of strings QString defaultTypeSizeStr; QString fpTypeSizeStr; if (verbose && defaultTypeSize) -- GitLab