diff --git a/share/qtcreator/translations/README b/share/qtcreator/translations/README index 9e2e28be29cd9b668a5ec4cc9802e15faef09984..f124f8875938d30ffc029cbdedf3dfd01a59aede 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 0f9199f84b0535b74019cfd477d4588fbbda8a3a..8515fa31dc181d5452b1d947ed09741fc779d367 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 8a3490107d5de300827a20ab5d0bf37f81153edf..2d39ffb3aa7f4f75c5383866027da4ca16e73a4b 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 cc0fc14c70169c827ebd71f0371f00c263745557..c0ecd0086ead0d9a702dcf9397988fcbfcd00228 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 c9bf24303bbe8b842175c6cda824c02ec02ceb29..774023315dc8267af62a402833547deb88a575cb 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 84659af29111a12bb39c91a728799223ad6c4a79..1e437815dafe8fb700f4f27a7750a53fca6ab8ff 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 0e46db76f74eb5890b4d1fd1efa610e3e89819c0..dbf9deee52ecd130061d5c882637acbce3a3133b 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 eecc3ad4908d3ada3b8c6532ae49384bb6f21f79..591f420bdfeeeb5688431d61d21b97eb4de24652 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 e176010a7af8c04488324b82e4b13db434500f53..f50eafa595c4a2f5f9a887d3b5b1abf18eebe9be 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 fcb143dcb2492d8329dde3be4d8aad86fb12808e..faf02d941cab3fa0aae4e18ff6981963d2756fdf 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 b2b1982b7e0766789ea437fa49823a23c4a1a625..1af5549e318e863a38ec71ad45f48caa03d154ee 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 220cabc5f24c72e7327298bae167160b6999b2df..62b74f1daa8c8967484740750d3b647df65be8a5 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 4ddf9329b483f426b8496b66d52a6ebca7dc5755..304d7e1b450c6028d66cf32391998bab8adbf5fa 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 c0d77b1387a775f4aa739f7052588ca6ccb96fd5..083e629863fb3e3af224a63d879f2fc086f1f6d1 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 64ad5c9d3b14f8d18ef4b26bcc598ff8d6f378e1..194ff6f66c56ed326aaa50a61b918e0d21d8ed06 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 9c96ef798fe5fa3b414020c1a1c6e2db316a9593..3cf3e5dbec986f222016921489f308ab28dfe4ee 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 5f0413f21c703bf7a5bdb59fa6d603f71ff962c6..1413dfa40fc016f10194b1da3419f5acaf95821f 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 5d8d32545c9b1f62244ce2dbde85e5cf680d1551..baf63ffcbbc1251df7d4bbd473d59409b35841ea 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 ebef6d6288bbcec76c054cd72209beb7068a997a..c5560fbd573d11b2be9264f90cd3b7340517f9fb 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 d6e1873f6963249e746ec4c62f3cb727284ee162..85383867744317c0a9893d12c437b80d582e7d90 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 72e238764360932498bdee18de1d20c73441add4..4d61b78f5a8d1c3a8c9210b83ba8ce0f0e0ccbfa 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 a2212eec2cd74caaaca393af7632b8b734f95b8b..bafd3eab2219397319535c4f379f045c3d62847d 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 ba2fa97eb6f4a84e3118cd9593f06eab1a300b28..13aeceedbe13c4ceba2a9050e667b2a2562ddd7c 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 165898c5b394c455b476d1af66317014d9e87c84..7ff790063b9872ad1384cbd2b518be65b7f73988 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 a5d7c9ec95df26dcf2ce3917dd35e4edb8fadf2a..22008167968e182b0944d0314c06478a5da94b84 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 3d6488bb0615d4caac6d8832ec94e34ce17d12e3..656f6aac6456c0711066ef5f740f1751a5020400 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 21af9efc8b87c12d2d8f734f16a31fbdbbb1b01b..a8f48658c87d9725de20489e8d11cf14a425ffbb 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 5aad51cb21f8acd91faf7579405642e6ccabd4ff..11997e44ab08595e11d139ca43804a9883cce38c 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 bcec96676e548b4e6ca3fa9e68fd7d12e5ed6560..d220d18206371f0d5884bffa9ddd65d17f18ab02 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 725df177202bf69d9e5cc99b494fab8ad14d1612..77a05b64cd98b545dc881940ac617ffe55150e4f 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 d09ed373d236c7a9769ad7608b06256949731714..e27ee84da6d9e27bc15b3b68a2e0ffd84747733e 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)