diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index 6e079a23e727c09053f341c349f361fb9134da38..d3dd0b57fd4933914f2221c54d445358e82cf71e 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -226,8 +226,8 @@ BookmarkView::~BookmarkView() void BookmarkView::contextMenuEvent(QContextMenuEvent *event) { QMenu menu; - QAction *remove = menu.addAction("&Remove Bookmark"); - QAction *removeAll = menu.addAction("Remove all Bookmarks"); + QAction *remove = menu.addAction(tr("&Remove Bookmark")); + QAction *removeAll = menu.addAction(tr("Remove all Bookmarks")); m_contextMenuIndex = indexAt(event->pos()); if (!m_contextMenuIndex.isValid()) remove->setEnabled(false); diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp index ef699b6af2975eb9b02d52bc11555a4c2c83ae62..3d5cdf2bda874fbf36e663b621c3fd5744854b49 100644 --- a/src/plugins/bookmarks/bookmarksplugin.cpp +++ b/src/plugins/bookmarks/bookmarksplugin.cpp @@ -162,7 +162,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *) addAutoReleasedObject(new BookmarkViewFactory(m_bookmarkManager)); m_bookmarkMarginAction = new QAction(this); - m_bookmarkMarginAction->setText("Toggle Bookmark"); + m_bookmarkMarginAction->setText(tr("Toggle Bookmark")); //m_bookmarkAction->setIcon(QIcon(":/gdbdebugger/images/breakpoint.svg")); connect(m_bookmarkMarginAction, SIGNAL(triggered()), this, SLOT(bookmarkMarginActionTriggered())); diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp index 51d57b9e09b9342c43dd58d5a996fe66ab378f49..afb586f6a35f449463fcf2f8c83ce8379e1687a8 100644 --- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp @@ -207,7 +207,7 @@ ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard) m_pc = new Core::Utils::PathChooser(this); m_pc->setPath(m_cmakeWizard->buildDirectory()); connect(m_pc, SIGNAL(changed()), this, SLOT(buildDirectoryChanged())); - fl->addRow("Build directory:", m_pc); + fl->addRow(tr("Build directory:"), m_pc); } void ShadowBuildPage::buildDirectoryChanged() diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index ffd333d23faf7008230c201d63f50941f0e6927f..eab609388ab3768a56e0dbcc0e15f9b7da459baf 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -610,7 +610,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeProject *project) // and then cmake builds in that directory instead of shadow building // We need our own generator for that to work connect(m_pathChooser, SIGNAL(changed()), this, SLOT(buildDirectoryChanged())); - fl->addRow("Build directory:", m_pathChooser); + fl->addRow(tr("Build directory:"), m_pathChooser); } QString CMakeBuildSettingsWidget::displayName() const diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp index 8209f3fc48d32e6ef4f5d99889a698b99f94b686..f67b8081b9136f2e479f160751c63f5ad71bda3f 100644 --- a/src/plugins/cmakeprojectmanager/makestep.cpp +++ b/src/plugins/cmakeprojectmanager/makestep.cpp @@ -256,12 +256,12 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep) setLayout(fl); m_additionalArguments = new QLineEdit(this); - fl->addRow("Additional arguments:", m_additionalArguments); + fl->addRow(tr("Additional arguments:"), m_additionalArguments); connect(m_additionalArguments, SIGNAL(textEdited(const QString &)), this, SLOT(additionalArgumentsEdited())); m_targetsList = new QListWidget; - fl->addRow("Targets:", m_targetsList); + fl->addRow(tr("Targets:"), m_targetsList); // TODO update this list also on rescans of the CMakeLists.txt CMakeProject *pro = m_makeStep->project(); diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp index 52e761bc72ba5d2c59aa87ed841006bd8e7a6c45..bd21813ec7bcc8677bb4e0f075ac025178042f97 100644 --- a/src/plugins/coreplugin/welcomemode.cpp +++ b/src/plugins/coreplugin/welcomemode.cpp @@ -100,12 +100,13 @@ WelcomeModePrivate::WelcomeModePrivate() : #if defined(QT_NO_WEBKIT) -const char *LABEL = "<center><table><tr><td><img src=\":/core/html/images/product_logo.png\"/></td><td width=300>" +const char LABEL[] = Q_TRANSLATE_NOOP("Core::Internal::WelcomeMode", + "<center><table><tr><td><img src=\":/core/html/images/product_logo.png\"/></td><td width=300>" "<h2><br/><br/>Welcome</h2><p> Qt Creator is an intuitive, modern cross platform IDE that enables " "developers to create graphically appealing applications for desktop, " "embedded, and mobile devices. " - "<p><font color=\"red\">(This startup page lacks features due to disabled webkit support)</font>" - "</td></tr></table>"; + "<p><font color=\"red\">(This startup page lacks features due to disabled WebKit support)</font>" + "</td></tr></table>"); #endif // --- WelcomePageData @@ -157,7 +158,7 @@ WelcomeMode::WelcomeMode() : #else m_d->m_label->setWordWrap(true); m_d->m_label->setAlignment(Qt::AlignCenter); - m_d->m_label->setText(LABEL); + m_d->m_label->setText(tr(LABEL)); l->addWidget(m_d->m_label); #endif } diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index d7a88930d903ff2eec40ae91eeb076314423543b..a752a04de3d19d4884254eb331bcfdbfbc0cc805 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -208,7 +208,7 @@ void CodepasterPlugin::fetch() Ui_PasteSelectDialog ui; ui.setupUi(&dialog); - ui.listWidget->addItems(QStringList() << "Waiting for items"); + ui.listWidget->addItems(QStringList() << tr("Waiting for items")); ui.listWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); ui.listWidget->setFrameStyle(QFrame::NoFrame); m_fetcher->list(ui.listWidget); @@ -245,15 +245,15 @@ void CustomFetcher::customRequestFinished(int, bool error) { m_customError = error; if (m_customError || hadError()) { - QMessageBox::warning(0, QLatin1String("CodePaster Error") - , QLatin1String("Could not fetch code") + QMessageBox::warning(0, tr("CodePaster Error") + , tr("Could not fetch code") , QMessageBox::Ok); return; } QByteArray data = body(); if (!m_listWidget) { - QString title = QString::fromLatin1("Code Paster: %1").arg(m_id); + QString title = QString::fromLatin1("CodePaster: %1").arg(m_id); EditorManager::instance()->newFile(Core::Constants::K_DEFAULT_TEXT_EDITOR, &title, data); } else { m_listWidget->clear(); @@ -295,7 +295,7 @@ void CustomPoster::customRequestFinished(int, bool error) QApplication::clipboard()->setText(pastedUrl()); ICore::instance()->messageManager()->printToOutputPane(pastedUrl(), m_output); } else - QMessageBox::warning(0, "Code Paster Error", "Some error occured while posting", QMessageBox::Ok); + QMessageBox::warning(0, tr("CodePaster Error"), tr("Some error occured while posting"), QMessageBox::Ok); #if 0 // Figure out how to access Core::Internal::MessageOutputWindow* messageWindow = ExtensionSystem::PluginManager::instance()->getObject<Core::Internal::MessageOutputWindow>(); diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 43bc047f35d53c15d00db55713baf3c664b0c7e2..a91864370bf1cbd43c4a311a4c615ed14b307e6f 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -68,6 +68,7 @@ #include <Lexer.h> #include <Token.h> +#include <QtCore/QCoreApplication> #include <QtCore/QDebug> #include <QtCore/QMutexLocker> #include <QtCore/QTime> @@ -470,10 +471,8 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type, m_currentDoc->addIncludeFile(fileName, line); if (contents.isEmpty() && ! QFileInfo(fileName).isAbsolute()) { - QString msg; - - msg += fileName; - msg += QLatin1String(": No such file or directory"); + QString msg = QCoreApplication::translate( + "CppPreprocessor", "%1: No such file or directory").arg(fileName); Document::DiagnosticMessage d(Document::DiagnosticMessage::Warning, m_currentDoc->fileName(), diff --git a/src/plugins/debugger/debuggeroutputwindow.cpp b/src/plugins/debugger/debuggeroutputwindow.cpp index b9d3fc9e3d264c067e5e30784f672e9345556efa..816d65c794a0be428281ce67d6d0a364e804a6b9 100644 --- a/src/plugins/debugger/debuggeroutputwindow.cpp +++ b/src/plugins/debugger/debuggeroutputwindow.cpp @@ -67,14 +67,14 @@ public: : QPlainTextEdit(parent) { m_clearContentsAction = new QAction(this); - m_clearContentsAction->setText("Clear contents"); + m_clearContentsAction->setText(tr("Clear contents")); m_clearContentsAction->setEnabled(true); m_clearContentsAction->setShortcut(Qt::ControlModifier + Qt::Key_R); connect(m_clearContentsAction, SIGNAL(triggered(bool)), parent, SLOT(clearContents())); m_saveContentsAction = new QAction(this); - m_saveContentsAction->setText("Save contents"); + m_saveContentsAction->setText(tr("Save contents")); m_saveContentsAction->setEnabled(true); } @@ -149,7 +149,7 @@ private: void focusInEvent(QFocusEvent *ev) { - emit statusMessageRequested("Type Ctrl-<Return> to execute a line.", -1); + emit statusMessageRequested(tr("Type Ctrl-<Return> to execute a line."), -1); QPlainTextEdit::focusInEvent(ev); } diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index feef41394e274e7ddd77744460c920119d74f591..af61154611e0eee9fb801c2af893e822ca56a114 100644 --- a/src/plugins/debugger/gdbengine.cpp +++ b/src/plugins/debugger/gdbengine.cpp @@ -2817,7 +2817,7 @@ void GdbEngine::setToolTipExpression(const QPoint &pos, const QString &exp0) return; if (exp.startsWith('"') && exp.endsWith('"')) { - QToolTip::showText(m_toolTipPos, "String literal " + exp); + QToolTip::showText(m_toolTipPos, tr("String literal %1").arg(exp)); return; } @@ -3713,7 +3713,7 @@ void GdbEngine::handleDebuggingHelperValue3(const GdbResultRecord &record, //qDebug() << "RECEIVED" << record.toString() << " FOR " << data0.toString() // << " STREAM: " << out; if (list.isEmpty()) { - data.setValue("<unavailable>"); + data.setValue(tr("<unavailable>")); data.setAllUnneeded(); insertData(data); } else if (data.type == "QString" || data.type.endsWith("::QString")) { @@ -3746,7 +3746,7 @@ void GdbEngine::handleDebuggingHelperValue3(const GdbResultRecord &record, sendSynchronizedCommand(cmd, WatchDebuggingHelperValue3, var); } } else { - data.setValue("<unavailable>"); + data.setValue(tr("<unavailable>")); data.setAllUnneeded(); insertData(data); } @@ -3840,7 +3840,7 @@ void GdbEngine::setLocals(const QList<GdbMi> &locals) seen[name] = n + 1; WatchData data; data.iname = "local." + name + QString::number(n + 1); - data.name = name + QString(" <shadowed %1>").arg(n); + data.name = tr("%1 <shadowed %2>").arg(name, n); //data.setValue("<shadowed>"); setWatchDataValue(data, item.findChild("value")); data.setType("<shadowed>"); @@ -3999,7 +3999,7 @@ void GdbEngine::handleVarListChildrenHelper(const GdbMi &item, } else if (exp.isEmpty()) { // Happens with anonymous unions data.exp = parent.exp; - data.name = "<n/a>"; + data.name = tr("<n/a>"); data.iname = parent.iname + ".@"; data.type = "<anonymous union>"; } else { @@ -4054,7 +4054,7 @@ void GdbEngine::handleVarListChildren(const GdbResultRecord &record, } else if (record.resultClass == GdbResultError) { data.setError(record.data.findChild("msg").data()); } else { - data.setError("Unknown error: " + record.toString()); + data.setError(tr("Unknown error: ") + record.toString()); } } diff --git a/src/plugins/debugger/scriptengine.cpp b/src/plugins/debugger/scriptengine.cpp index 6bd86e826af950ed27c32e23ad19781a84d4eb14..a0feae918268afa79ab2636700184907e70842d9 100644 --- a/src/plugins/debugger/scriptengine.cpp +++ b/src/plugins/debugger/scriptengine.cpp @@ -473,13 +473,12 @@ void ScriptEngine::setToolTipExpression(const QPoint &pos, const QString &exp0) } if (!hasLetterOrNumber(exp)) { - QToolTip::showText(m_toolTipPos, - "'" + exp + "' contains no identifier"); + QToolTip::showText(m_toolTipPos, tr("'%1' contains no identifier").arg(exp)); return; } if (exp.startsWith('"') && exp.endsWith('"')) { - QToolTip::showText(m_toolTipPos, "String literal " + exp); + QToolTip::showText(m_toolTipPos, tr("String literal %1").arg(exp)); return; } diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index 052d97b5151890180a3e03d3b55a1663946c44fc..fcc2e166d24c70d92bef88b7434b2f12f13b1bee 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -103,12 +103,15 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const return frame.address; } } else if (role == Qt::ToolTipRole) { - return "<table><tr><td>Address:</td><td>" + frame.address + "</td></tr>" - + "<tr><td>Function: </td><td>" + frame.function + "</td></tr>" - + "<tr><td>File: </td><td>" + frame.file + "</td></tr>" - + "<tr><td>Line: </td><td>" + QString::number(frame.line) + "</td></tr>" - + "<tr><td>From: </td><td>" + frame.from + "</td></tr></table>" - + "<tr><td>To: </td><td>" + frame.to + "</td></tr></table>"; + //: Tooltip for variable + return tr("<table><tr><td>Address:</td><td>%1</td></tr>" + "<tr><td>Function: </td><td>%2</td></tr>" + "<tr><td>File: </td><td>%3</td></tr>" + "<tr><td>Line: </td><td>%4</td></tr>" + "<tr><td>From: </td><td>%5</td></tr></table>" + "<tr><td>To: </td><td>%6</td></tr></table>") + .arg(frame.address, frame.function, + frame.file, QString::number(frame.line), frame.from, frame.to); } else 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; diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index eea64c4bca088be0696558955f8689780691e217..105f8384faec5e07b74c956091f9a37ddaa23f11 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -64,7 +64,8 @@ using namespace Debugger::Internal; -static const QString strNotInScope = QLatin1String("<not in scope>"); +static const QString strNotInScope = + QCoreApplication::translate("Debugger::Internal::WatchData", "<not in scope>"); static int watcherCounter = 0; diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index 103d635168af40e56b00478d5b5a280733b8062c..9ed27b57e13cb237bbb13ac86cf32dd5664d34ec 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -360,22 +360,22 @@ void FormEditorW::setupActions() m_toolActionIds.push_back(QLatin1String("FormEditor.WidgetEditor")); createEditModeAction(m_actionGroupEditMode, globalcontext, am, medit, - QLatin1String("Edit widgets"), m_toolActionIds.back(), + tr("Edit widgets"), m_toolActionIds.back(), EditModeWidgetEditor, QLatin1String("widgettool.png"), tr("F3")); m_toolActionIds.push_back(QLatin1String("FormEditor.SignalsSlotsEditor")); createEditModeAction(m_actionGroupEditMode, globalcontext, am, medit, - QLatin1String("Edit signals/slots"), m_toolActionIds.back(), + tr("Edit signals/slots"), m_toolActionIds.back(), EditModeSignalsSlotEditor, QLatin1String("signalslottool.png"), tr("F4")); m_toolActionIds.push_back(QLatin1String("FormEditor.BuddyEditor")); createEditModeAction(m_actionGroupEditMode, globalcontext, am, medit, - QLatin1String("Edit buddies"), m_toolActionIds.back(), + tr("Edit buddies"), m_toolActionIds.back(), EditModeBuddyEditor, QLatin1String("buddytool.png")); m_toolActionIds.push_back(QLatin1String("FormEditor.TabOrderEditor")); createEditModeAction(m_actionGroupEditMode, globalcontext, am, medit, - QLatin1String("Edit tab order"), m_toolActionIds.back(), + tr("Edit tab order"), m_toolActionIds.back(), EditModeTabOrderEditor, QLatin1String("tabordertool.png")); //tool actions diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 407b4e33801d44045bea13e6e39d071a2165eee4..2550f88eb80aac33d001987f37d4ac60c3c5b7ac 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -848,7 +848,7 @@ void FakeVimHandler::Private::showBlackMessage(const QString &msg) void FakeVimHandler::Private::notImplementedYet() { qDebug() << "Not implemented in FakeVim"; - showRedMessage("Not implemented in FakeVim"); + showRedMessage(tr("Not implemented in FakeVim")); updateMiniBuffer(); } @@ -1976,13 +1976,13 @@ void FakeVimHandler::Private::search(const QString &needle0, bool forward) if (oldLine != cursorLineInDocument() - cursorLineOnScreen()) scrollToLineInDocument(cursorLineInDocument() - linesOnScreen() / 2); if (forward) - showRedMessage("search hit BOTTOM, continuing at TOP"); + showRedMessage(tr("search hit BOTTOM, continuing at TOP")); else - showRedMessage("search hit TOP, continuing at BOTTOM"); + showRedMessage(tr("search hit TOP, continuing at BOTTOM")); highlightMatches(needle); } else { m_tc = orig; - showRedMessage("E486: Pattern not found: " + needle); + showRedMessage(tr("E486: Pattern not found: ") + needle); highlightMatches(QString()); } } diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp index 51576d11aa799a5ef8bc121f06cf0fb4baf762d8..c1227fa2cb0ee0878c0441db10b892ba884bf344 100644 --- a/src/plugins/git/changeselectiondialog.cpp +++ b/src/plugins/git/changeselectiondialog.cpp @@ -46,7 +46,7 @@ void ChangeSelectionDialog::selectWorkingDirectory() { static QString location = QString(); location = QFileDialog::getExistingDirectory(this, - QLatin1String("Select Git repository"), + tr("Select Git repository"), location); if (location.isEmpty()) return; @@ -63,7 +63,7 @@ void ChangeSelectionDialog::selectWorkingDirectory() } while (repository.cdUp()); // Did not find a repo - QMessageBox::critical(this, QLatin1String("Error"), - QLatin1String("Selected directory is not a Git repository")); + QMessageBox::critical(this, tr("Error"), + tr("Selected directory is not a Git repository")); } diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 2b93589317c7ec12edb196a6f22bdfe3f6d567f2..99301d3801572c073576c1aefd663391578177f1 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -89,6 +89,7 @@ static inline QString msgParseFilesFailed() static QString formatCommand(const QString &binary, const QStringList &args) { const QString timeStamp = QTime::currentTime().toString(QLatin1String("HH:mm")); + //: <timestamp> Executing: <executable> <arguments> return GitClient::tr("%1 Executing: %2 %3\n").arg(timeStamp, binary, args.join(QString(QLatin1Char(' ')))); } diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 93e387d0ded80f72994762d40aaf5348eef71343..204453936de1233e5710da539cc6fb1a1ceaeb03 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -376,7 +376,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) gitContainer->addAction(createSeparator(actionManager, globalcontext, QLatin1String("Git.Sep.Global"), this)); m_stashAction = new QAction(tr("Stash"), this); - m_stashAction->setToolTip("Saves the current state of your work."); + m_stashAction->setToolTip(tr("Saves the current state of your work.")); command = actionManager->registerAction(m_stashAction, "Git.Stash", globalcontext); command->setAttribute(Core::Command::CA_UpdateText); connect(m_stashAction, SIGNAL(triggered()), this, SLOT(stash())); @@ -389,7 +389,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) gitContainer->addAction(command); m_stashPopAction = new QAction(tr("Stash Pop"), this); - m_stashAction->setToolTip("Restores changes saved to the stash list using \"Stash\"."); + m_stashAction->setToolTip(tr("Restores changes saved to the stash list using \"Stash\".")); command = actionManager->registerAction(m_stashPopAction, "Git.StashPop", globalcontext); command->setAttribute(Core::Command::CA_UpdateText); connect(m_stashPopAction, SIGNAL(triggered()), this, SLOT(stashPop())); @@ -785,7 +785,7 @@ void GitPlugin::updateActions() const QString repository = m_gitClient->findRepositoryForFile(current.absoluteFilePath()); // First check for file commands and if the current file is inside // a Git-repository - const QString file = fileName.isEmpty() ? "File" : "File \"" + fileName + '"'; + const QString file = fileName.isEmpty() ? tr("File") : "\"" + fileName + '"'; m_diffAction->setText(tr("Diff %1").arg(file)); m_statusAction->setText(tr("Status Related to %1").arg(file)); m_logAction->setText(tr("Log of %1").arg(file)); diff --git a/src/plugins/helloworld/helloworldplugin.cpp b/src/plugins/helloworld/helloworldplugin.cpp index 7ed369fe06c826e41abdd7902a24406febedadc2..e877629329ec5a43238a9812fa950d78b8b1fba2 100644 --- a/src/plugins/helloworld/helloworldplugin.cpp +++ b/src/plugins/helloworld/helloworldplugin.cpp @@ -82,7 +82,7 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *error_m QLatin1String("HelloWorld.MainView")); // Create an action to be triggered by a menu entry - QAction *helloWorldAction = new QAction("Say \"&Hello World!\"", this); + QAction *helloWorldAction = new QAction(tr("Say \"&Hello World!\""), this); connect(helloWorldAction, SIGNAL(triggered()), SLOT(sayHelloWorld())); // Register the action with the action manager @@ -143,7 +143,7 @@ void HelloWorldPlugin::sayHelloWorld() // When passing 0 for the parent, the message box becomes an // application-global modal dialog box QMessageBox::information( - 0, "Hello World!", "Hello World! Beautiful day today, isn't it?"); + 0, tr("Hello World!"), tr("Hello World! Beautiful day today, isn't it?")); } Q_EXPORT_PLUGIN(HelloWorldPlugin) diff --git a/src/plugins/helloworld/helloworldwindow.cpp b/src/plugins/helloworld/helloworldwindow.cpp index 7ed3c8cee28a660e67ccc4e00eff63868fc253ff..ddaa144f23559668f7d542a5aa5fb96569ed9d7a 100644 --- a/src/plugins/helloworld/helloworldwindow.cpp +++ b/src/plugins/helloworld/helloworldwindow.cpp @@ -38,6 +38,6 @@ HelloWorldWindow::HelloWorldWindow(QWidget *parent) : QWidget(parent) { QBoxLayout *layout = new QVBoxLayout(this); - layout->addWidget(new QTextEdit("Focus me to activate my context!")); + layout->addWidget(new QTextEdit(tr("Focus me to activate my context!"))); setWindowTitle(tr("Hello, world!")); } diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index af4765d547cd07c695e859f240410f1467d948c3..e9d833de344f9e78ff5160002da6c943299c0252 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -604,8 +604,8 @@ void HelpPlugin::activateContext() if (viewer) { viewer->setSource(QUrl()); - viewer->setHtml("<html><head><title>No Documentation</title></head><body><br/><br/><center>No" - " documentation available.</center></body></html>"); + viewer->setHtml(tr("<html><head><title>No Documentation</title></head><body><br/><br/><center>No" + " documentation available.</center></body></html>")); //activateIndex(); } } diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp index c04854353a6b4650e137a88ee157b620d8824205..71920dd8b5c2ca87562e506bc9356718e4dbcdd9 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp @@ -67,19 +67,19 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE layout->setMargin(0); m_userName = new QLineEdit(this); - layout->addRow("Name:", m_userName); + layout->addRow(tr("Name:"), m_userName); m_executableChooser = new Core::Utils::PathChooser(this); m_executableChooser->setExpectedKind(Core::Utils::PathChooser::Command); - layout->addRow("Executable:", m_executableChooser); + layout->addRow(tr("Executable:"), m_executableChooser); m_commandLineArgumentsLineEdit = new QLineEdit(this); m_commandLineArgumentsLineEdit->setMinimumWidth(200); // this shouldn't be fixed here... - layout->addRow("Arguments:", m_commandLineArgumentsLineEdit); + layout->addRow(tr("Arguments:"), m_commandLineArgumentsLineEdit); m_workingDirectory = new CustomDirectoryPathChooser(this); m_workingDirectory->setExpectedKind(Core::Utils::PathChooser::Directory); - layout->addRow("Working Directory:", m_workingDirectory); + layout->addRow(tr("Working Directory:"), m_workingDirectory); m_useTerminalCheck = new QCheckBox(tr("Run in &Terminal"), this); layout->addRow(QString(), m_useTerminalCheck); @@ -153,7 +153,7 @@ CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Project *pro) m_userSetName(false) { m_workingDirectory = "$BUILDDIR"; - setName("Custom Executable"); + setName(tr("Custom Executable")); } CustomExecutableRunConfiguration::~CustomExecutableRunConfiguration() @@ -190,7 +190,7 @@ QString CustomExecutableRunConfiguration::executable() const QWidget *confWidget = const_cast<CustomExecutableRunConfiguration *>(this)->configurationWidget(); QDialog dialog; dialog.setLayout(new QVBoxLayout()); - dialog.layout()->addWidget(new QLabel("Could not find the executable, please specify one.")); + dialog.layout()->addWidget(new QLabel(tr("Could not find the executable, please specify one."))); dialog.layout()->addWidget(confWidget); QDialogButtonBox *dbb = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); connect(dbb, SIGNAL(accepted()), &dialog, SLOT(accept())); @@ -338,7 +338,7 @@ QSharedPointer<RunConfiguration> CustomExecutableRunConfigurationFactory::create { if (type == "ProjectExplorer.CustomExecutableRunConfiguration") { QSharedPointer<RunConfiguration> rc(new CustomExecutableRunConfiguration(project)); - rc->setName("Custom Executable"); + rc->setName(tr("Custom Executable")); return rc; } else { return QSharedPointer<RunConfiguration>(0); @@ -354,7 +354,7 @@ QStringList CustomExecutableRunConfigurationFactory::canCreate(Project *pro) con QString CustomExecutableRunConfigurationFactory::nameForType(const QString &type) const { if (type == "ProjectExplorer.CustomExecutableRunConfiguration") - return "Custom Executable"; + return tr("Custom Executable"); else - return QString::null; + return QString(); } diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 06bf33a3e3fe1836ee5153b889f81e5accf48211..34b5d83978519f3e3c54172925aafc40771fbc76 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -262,13 +262,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er // build menu Core::ActionContainer *mbuild = am->createMenu(Constants::M_BUILDPROJECT); - mbuild->menu()->setTitle("&Build"); + mbuild->menu()->setTitle(tr("&Build")); menubar->addMenu(mbuild, Core::Constants::G_VIEW); // debug menu Core::ActionContainer *mdebug = am->createMenu(Constants::M_DEBUG); - mdebug->menu()->setTitle("&Debug"); + mdebug->menu()->setTitle(tr("&Debug")); menubar->addMenu(mdebug, Core::Constants::G_VIEW); @@ -428,7 +428,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er // recent projects menu Core::ActionContainer *mrecent = am->createMenu(Constants::M_RECENTPROJECTS); - mrecent->menu()->setTitle("Recent Projects"); + mrecent->menu()->setTitle(tr("Recent Projects")); mfile->addMenu(mrecent, Core::Constants::G_FILE_OPEN); connect(mfile->menu(), SIGNAL(aboutToShow()), this, SLOT(updateRecentProjectMenu())); diff --git a/src/plugins/projectexplorer/projectwizardpage.cpp b/src/plugins/projectexplorer/projectwizardpage.cpp index 2c294e898817b64e282680ede4501ac4a5b8c3f0..5e93e37fbc046e3655aff3918744be42edefec7f 100644 --- a/src/plugins/projectexplorer/projectwizardpage.cpp +++ b/src/plugins/projectexplorer/projectwizardpage.cpp @@ -115,7 +115,8 @@ void ProjectWizardPage::setFilesDisplay(const QStringList &files) QString fileMessage; { QTextStream str(&fileMessage); - str << "<html>Files to be added:<pre>"; + str << "<qt>" << tr("Files to be added:"); + str << "<pre>"; const QStringList::const_iterator cend = files.constEnd(); for (QStringList::const_iterator it = files.constBegin(); it != cend; ++it) str << *it << '\n'; diff --git a/src/plugins/projectexplorer/sessiondialog.cpp b/src/plugins/projectexplorer/sessiondialog.cpp index b500431435665312fc6daa12caf1a3d96f3c485b..c03c15a8d830d69655a2963b7c3de99e316ddc75 100644 --- a/src/plugins/projectexplorer/sessiondialog.cpp +++ b/src/plugins/projectexplorer/sessiondialog.cpp @@ -85,9 +85,9 @@ private: NewSessionInputDialog::NewSessionInputDialog(QStringList sessions) { - setWindowTitle("New session name"); + setWindowTitle(tr("New session name")); QVBoxLayout *hlayout = new QVBoxLayout(this); - QLabel *label = new QLabel("Enter the name of the new session:", this); + QLabel *label = new QLabel(tr("Enter the name of the new session:"), this); hlayout->addWidget(label); m_newSessionLineEdit = new QLineEdit(this); m_newSessionLineEdit->setValidator(new SessionValidator(this, sessions)); diff --git a/src/plugins/qt4projectmanager/projectloadwizard.cpp b/src/plugins/qt4projectmanager/projectloadwizard.cpp index 8881503e91569c655ebd5b37556890b96914d991..acd6c76412467259dec5dc301d83dd4c601c2561 100644 --- a/src/plugins/qt4projectmanager/projectloadwizard.cpp +++ b/src/plugins/qt4projectmanager/projectloadwizard.cpp @@ -183,7 +183,7 @@ void ProjectLoadWizard::setupImportPage(QtVersion *version, QtVersion::QmakeBuil resize(605, 490); // Import Page importPage = new QWizardPage(this); - importPage->setTitle("Import existing settings"); + importPage->setTitle(tr("Import existing settings")); QVBoxLayout *importLayout = new QVBoxLayout(importPage); importLabel = new QLabel(importPage); @@ -201,13 +201,13 @@ void ProjectLoadWizard::setupImportPage(QtVersion *version, QtVersion::QmakeBuil importCheckbox = new QCheckBox(importPage); - importCheckbox->setText("Import existing build settings."); + importCheckbox->setText(tr("Import existing build settings.")); importCheckbox->setChecked(true); importLayout->addWidget(importCheckbox); import2Label = new QLabel(importPage); import2Label->setTextFormat(Qt::RichText); if (m_temporaryVersion) - import2Label->setText(QString("<b>Note:</b> Importing the settings will automatically add the Qt Version from:<br><b>%1</b> to the list of qt versions.") + import2Label->setText(tr("<b>Note:</b> Importing the settings will automatically add the Qt Version from:<br><b>%1</b> to the list of qt versions.") .arg(m_importVersion->path())); importLayout->addWidget(import2Label); addPage(importPage); diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index 37eca5ad3a97612d4fe62bb2a46dbffdb2c66e29..0d5497c43c6b58c1189b550f05865d8f25376608 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -116,8 +116,8 @@ bool QMakeStep::init(const QString &name) Environment environment = m_pro->environment(name); if (!environment.value("QMAKESPEC").isEmpty() && environment.value("QMAKESPEC") != qtVersion->mkspec()) - emit addToOutputWindow(tr("QMAKESPEC set to ") + environment.value("QMAKESPEC") + - tr(" overrides mkspec of selected qt ")+qtVersion->mkspec()); + emit addToOutputWindow(tr("QMAKESPEC from environment (%1) overrides mkspec of selected Qt (%2).") + .arg(environment.value("QMAKESPEC"), qtVersion->mkspec())); QString program = qtVersion->qmakeCommand(); diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp index 96214c5563b27047f4a31af6528a8fa8f6a8f667..7cb7578cb79af187d75da0a92f139a2d9e6d568b 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp @@ -355,7 +355,7 @@ void Qt4RunConfiguration::updateTarget() if (!reader->readProFile(m_proFilePath)) { delete reader; - Core::ICore::instance()->messageManager()->printToOutputPane(QString("Could not parse %1. The Qt4 run configuration %2 can not be started.").arg(m_proFilePath).arg(name())); + Core::ICore::instance()->messageManager()->printToOutputPane(tr("Could not parse %1. The Qt4 run configuration %2 can not be started.").arg(m_proFilePath).arg(name())); return; } diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 08c2e37db65cdb6a17bae9a5b20e1ba8cfb3be3c..4b3a2b344ad3414f25c2b1d59711a7db6eb4d8f4 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -612,10 +612,9 @@ void QtDirWidget::showEnvironmentPage(QTreeWidgetItem *item) } else { //ProjectExplorer::ToolChain::GCC m_ui.msvcComboBox->setVisible(false); makeMingwVisible(false); - m_ui.errorLabel->setText("Found Qt version " - + m_versions.at(index)->qtVersionString() - + " using mkspec " - + m_versions.at(index)->mkspec()); + m_ui.errorLabel->setText(tr("Found Qt version %1, using mkspec %2") + .arg(m_versions.at(index)->qtVersionString(), + m_versions.at(index)->mkspec())); } } else { m_ui.msvcComboBox->setVisible(false); @@ -1475,7 +1474,7 @@ QString QtVersion::buildDebuggingHelperLibrary() break; } - output += QString("\nRuninng %1 ...\n").arg(qmakeCommand()); + output += QString("\nRunning %1 ...\n").arg(qmakeCommand()); proc.start(qmakeCommand(), QStringList()<<"-spec"<< mkspec() <<"gdbmacros.pro"); proc.waitForFinished(); diff --git a/src/plugins/quickopen/quickopentoolwindow.cpp b/src/plugins/quickopen/quickopentoolwindow.cpp index 1204bbcdd545383cf2b86c40a38c1074b8c3f8e2..ee36e4688fe4f02b74a8a209c6dcf6fda3459918 100644 --- a/src/plugins/quickopen/quickopentoolwindow.cpp +++ b/src/plugins/quickopen/quickopentoolwindow.cpp @@ -258,7 +258,7 @@ QuickOpenToolWindow::QuickOpenToolWindow(QuickOpenPlugin *qop) : // Explicitly hide the completion list popup. m_completionList->hide(); - setWindowTitle("Locate..."); + setWindowTitle(tr("Locate...")); resize(200, 90); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); @@ -446,7 +446,7 @@ void QuickOpenToolWindow::show(const QString &text, int selectionStart, int sele void QuickOpenToolWindow::filterSelected() { - QString searchText = "<type here>"; + QString searchText = tr("<type here>"); QAction *action = qobject_cast<QAction*>(sender()); QTC_ASSERT(action, return); IQuickOpenFilter *filter = action->data().value<IQuickOpenFilter*>(); diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index 65083372eb559a78bd3b23cf30a024b5adb2a8b2..a91c0dedf8c8517e7adcb0811381de82c163e153 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -972,6 +972,7 @@ SubversionResponse SubversionPlugin::runSvn(const QStringList &arguments, // Hide passwords, etc in the log window const QString timeStamp = QTime::currentTime().toString(QLatin1String("HH:mm")); + //: <timestamp> Executing: <executable> <arguments> const QString outputText = tr("%1 Executing: %2 %3\n").arg(timeStamp, executable, SubversionSettings::formatArguments(allArgs)); showOutput(outputText, false); diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 5ef655e7997b06b931c7174f2db5c68dca2af3b6..8234e28da23c6c80c75acd5ac64b1404aea2eb61 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -3722,8 +3722,8 @@ void BaseTextEditorEditable::updateCursorPosition() const QTextBlock block = cursor.block(); const int line = block.blockNumber() + 1; const int column = cursor.position() - block.position() + 1; - m_cursorPositionLabel->setText(QString("Line: %1, Col: %2").arg(line).arg(column), - QString("Line: %1, Col: 999").arg(e->blockCount())); + m_cursorPositionLabel->setText(tr("Line: %1, Col: %2").arg(line).arg(column), + tr("Line: %1, Col: 999").arg(e->blockCount())); m_contextHelpId.clear(); if (!block.isVisible()) diff --git a/src/plugins/texteditor/linenumberfilter.cpp b/src/plugins/texteditor/linenumberfilter.cpp index 711f8eb9dad586a4b8427de22c2278e2390052be..a760d46187157f6273b508b18569c699eec079db 100644 --- a/src/plugins/texteditor/linenumberfilter.cpp +++ b/src/plugins/texteditor/linenumberfilter.cpp @@ -52,7 +52,7 @@ QList<FilterEntry> LineNumberFilter::matchesFor(const QString &entry) QList<FilterEntry> value; int line = entry.toInt(&ok); if (line > 0 && currentTextEditor()) - value.append(FilterEntry(this, QString("Line %1").arg(line), QVariant(line))); + value.append(FilterEntry(this, tr("Line %1").arg(line), QVariant(line))); return value; } diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index edb7349eb01ca3c9d51792770d2510bc6417383b..0c4821992cc2aa98d59a48d16c5cf59980b1b0a1 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -337,7 +337,7 @@ void TextEditorActionHandler::gotoAction() QuickOpen::QuickOpenManager *quickopen = QuickOpen::QuickOpenManager::instance(); QTC_ASSERT(quickopen, return); QString shortcut = TextEditorPlugin::instance()->lineNumberFilter()->shortcutString(); - quickopen->show(shortcut + " <line number>", 2, 13); + quickopen->show(shortcut + tr(" <line number>"), 2, 13); } void TextEditorActionHandler::printAction() diff --git a/src/shared/cpaster/view.cpp b/src/shared/cpaster/view.cpp index dfc76b15d9a3a01747c3b14c593b238c64415e7c..e5f852f4323108ef8ff4db6597fa81f8d1b38986 100644 --- a/src/shared/cpaster/view.cpp +++ b/src/shared/cpaster/view.cpp @@ -86,7 +86,7 @@ View::View(QWidget *parent) delete m_ui.uiPatchView; m_ui.uiPatchView = new ColumnIndicatorTextEdit(m_ui.groupBox); m_ui.vboxLayout1->addWidget(m_ui.uiPatchView); - m_ui.buttonBox->button(QDialogButtonBox::Ok)->setText("Paste"); + m_ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Paste")); connect(m_ui.uiPatchList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(contentChanged())); } @@ -97,7 +97,7 @@ View::~View() QString View::getUser() { const QString username = m_ui.uiUsername->text(); - if (username.isEmpty() || username == "<Username>") + if (username.isEmpty() || username == tr("<Username>")) return "Anonymous"; return username; } @@ -105,7 +105,7 @@ QString View::getUser() QString View::getDescription() { const QString description = m_ui.uiDescription->text(); - if (description == "<Description>") + if (description == tr("<Description>")) return QString(); return description; } @@ -113,7 +113,7 @@ QString View::getDescription() QString View::getComment() { const QString comment = m_ui.uiComment->toPlainText(); - if (comment == "<Comment>") + if (comment == tr("<Comment>")) return QString(); return comment; } @@ -138,17 +138,17 @@ int View::show(const QString &user, const QString &description, const QString &c const FileDataList &parts) { if (user.isEmpty()) - m_ui.uiUsername->setText("<Username>"); + m_ui.uiUsername->setText(tr("<Username>")); else m_ui.uiUsername->setText(user); if (description.isEmpty()) - m_ui.uiDescription->setText("<Description>"); + m_ui.uiDescription->setText(tr("<Description>")); else m_ui.uiDescription->setText(description); if (comment.isEmpty()) - m_ui.uiComment->setPlainText("<Comment>"); + m_ui.uiComment->setPlainText(tr("<Comment>")); else m_ui.uiComment->setPlainText(comment);