From 9e066c7b17ecc7399a94763003b23e751bab93e5 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 13 Sep 2017 15:56:47 +0200 Subject: [PATCH] Move HTML out of translated strings Change-Id: I4664427086619f33e9a882eb3f0a5f2f52e1b42a Reviewed-by: Jochen Becher Reviewed-by: Leena Miettinen Reviewed-by: Friedemann Kleint Reviewed-by: Eike Ziller --- .../qmt/model_widgets_ui/propertiesviewmview.cpp | 2 +- src/plugins/clearcase/versionselector.cpp | 7 ++++--- .../cmakeprojectmanager/cmakekitinformation.cpp | 4 ++-- src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp | 2 +- src/plugins/cpaster/kdepasteprotocol.cpp | 3 ++- src/plugins/debugger/breakhandler.cpp | 10 +++++----- src/plugins/debugger/commonoptionspage.cpp | 9 +++++---- src/plugins/debugger/debuggeritemmanager.cpp | 9 +++++---- src/plugins/modeleditor/actionhandler.cpp | 3 ++- 9 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/libs/modelinglib/qmt/model_widgets_ui/propertiesviewmview.cpp b/src/libs/modelinglib/qmt/model_widgets_ui/propertiesviewmview.cpp index f0d18509fed..519f9ca15cb 100644 --- a/src/libs/modelinglib/qmt/model_widgets_ui/propertiesviewmview.cpp +++ b/src/libs/modelinglib/qmt/model_widgets_ui/propertiesviewmview.cpp @@ -1180,7 +1180,7 @@ void PropertiesView::MView::onClassMembersStatusChanged(bool valid) if (valid) m_classMembersStatusLabel->clear(); else - m_classMembersStatusLabel->setText(tr("Invalid syntax.")); + m_classMembersStatusLabel->setText("" + tr("Invalid syntax.") + ""); } void PropertiesView::MView::onParseClassMembers() diff --git a/src/plugins/clearcase/versionselector.cpp b/src/plugins/clearcase/versionselector.cpp index 42067fd0417..453ce132ab7 100644 --- a/src/plugins/clearcase/versionselector.cpp +++ b/src/plugins/clearcase/versionselector.cpp @@ -39,9 +39,10 @@ VersionSelector::VersionSelector(const QString &fileName, const QString &message { ui->setupUi(this); ui->headerLabel->setText(ui->headerLabel->text().arg(fileName)); - ui->loadedText->setHtml(tr("

Note: You will not be able to check in " - "this file without merging the changes (not supported by the " - "plugin)

")); + ui->loadedText->setHtml("

" + + tr("Note: You will not be able to check in this file without merging " + "the changes (not supported by the plugin)") + + "

"); m_stream = new QTextStream(message.toLocal8Bit(), QIODevice::ReadOnly | QIODevice::Text); QString line; while (!m_stream->atEnd() && !line.contains(QLatin1String("1) Loaded version"))) diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp index 3a52d6911ce..b59fb5e2353 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp @@ -450,9 +450,9 @@ KitInformation::ItemList CMakeGeneratorKitInformation::toUserOutput(const Kit *k } else { message = tr("Generator: %1
Extra generator: %2").arg(info.generator).arg(info.extraGenerator); if (!info.platform.isEmpty()) - message += tr("
Platform: %1").arg(info.platform); + message += "
" + tr("Platform: %1").arg(info.platform); if (!info.toolset.isEmpty()) - message += tr("
Toolset: %1").arg(info.toolset); + message += "
" + tr("Toolset: %1").arg(info.toolset); } return ItemList() << qMakePair(tr("CMake Generator"), message); } diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp index 98e6b4efc22..3740aee8be5 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp @@ -115,7 +115,7 @@ void CMakeTargetNode::setTargetInformation(const QList &artifac m_tooltip += QCoreApplication::translate("CMakeTargetNode", "No build artifacts"); } else { const QStringList tmp = Utils::transform(artifacts, &Utils::FileName::toUserOutput); - m_tooltip += QCoreApplication::translate("CMakeTargetNode", "Build artifacts:
") + m_tooltip += QCoreApplication::translate("CMakeTargetNode", "Build artifacts:") + "
" + tmp.join("
"); } } diff --git a/src/plugins/cpaster/kdepasteprotocol.cpp b/src/plugins/cpaster/kdepasteprotocol.cpp index c5c09cb9bf5..bafe229e3d6 100644 --- a/src/plugins/cpaster/kdepasteprotocol.cpp +++ b/src/plugins/cpaster/kdepasteprotocol.cpp @@ -286,7 +286,8 @@ void KdePasteProtocol::paste(const QString &text, Protocol::ContentType ct, int QString details = tr("Pasting to KDE paster needs authentication.
" "Enter your KDE Identity credentials to continue."); if (m_loginFailed) - details.prepend(tr("Login failed

")); + details.prepend("" + + tr("Login failed") + "

"); AuthenticationDialog authDialog(details, Core::ICore::dialogParent()); authDialog.setWindowTitle("Authenticate for KDE paster"); diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index df579b8a602..3488be43047 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -447,9 +447,9 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent) m_labelUseFullPath->setToolTip(pathToolTip); const QString moduleToolTip = - tr("

Specifying the module (base name of the library or executable) " - "for function or file type breakpoints can significantly speed up " - "debugger startup times (CDB, LLDB)."); + "

" + tr("Specifying the module (base name of the library or executable) " + "for function or file type breakpoints can significantly speed up " + "debugger startup times (CDB, LLDB).") + "

"; m_lineEditModule = new QLineEdit(groupBoxAdvanced); m_lineEditModule->setToolTip(moduleToolTip); m_labelModule = new QLabel(tr("&Module:"), groupBoxAdvanced); @@ -457,8 +457,8 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent) m_labelModule->setToolTip(moduleToolTip); const QString commandsToolTip = - tr("

Debugger commands to be executed when the breakpoint is hit. " - "This feature is only available for GDB."); + "

" + tr("Debugger commands to be executed when the breakpoint is hit. " + "This feature is only available for GDB.") + "

"; m_textEditCommands = new SmallTextEdit(groupBoxAdvanced); m_textEditCommands->setToolTip(commandsToolTip); m_labelCommands = new QLabel(tr("&Commands:"), groupBoxAdvanced); diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp index 7aeb3a7cb5e..d78e1b89481 100644 --- a/src/plugins/debugger/commonoptionspage.cpp +++ b/src/plugins/debugger/commonoptionspage.cpp @@ -320,10 +320,11 @@ QWidget *LocalsAndExpressionsOptionsPage::widget() auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox); groupBoxCustomDumperCommands->setTitle(tr("Debugging Helper Customization")); - groupBoxCustomDumperCommands->setToolTip(tr( - "

Python commands entered here will be executed after built-in " - "debugging helpers have been loaded and fully initialized. You can load additional " - "debugging helpers or modify existing ones here.

")); + groupBoxCustomDumperCommands->setToolTip("

" + + tr("Python commands entered here will be executed after built-in " + "debugging helpers have been loaded and fully initialized. You can " + "load additional debugging helpers or modify existing ones here.") + + "

"); auto textEditCustomDumperCommands = new QTextEdit(groupBoxCustomDumperCommands); textEditCustomDumperCommands->setAcceptRichText(false); diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 9f543f01ab7..f78f9807995 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -401,10 +401,11 @@ void DebuggerItemConfigWidget::load(const DebuggerItem *item) const bool is64bit = is64BitWindowsSystem(); const QString versionString = is64bit ? tr("64-bit version") : tr("32-bit version"); //: Label text for path configuration. %2 is "x-bit version". - text = tr("

Specify the path to the " - "Windows Console Debugger executable" - " (%2) here.

"""). - arg(QLatin1String(debuggingToolsWikiLinkC), versionString); + text = "

" + + tr("Specify the path to the " + "Windows Console Debugger executable" + " (%2) here.").arg(QLatin1String(debuggingToolsWikiLinkC), versionString) + + "

"; versionCommand = QLatin1String("-version"); } else { versionCommand = QLatin1String("--version"); diff --git a/src/plugins/modeleditor/actionhandler.cpp b/src/plugins/modeleditor/actionhandler.cpp index d03730ccfe0..7af2c6c5fbc 100644 --- a/src/plugins/modeleditor/actionhandler.cpp +++ b/src/plugins/modeleditor/actionhandler.cpp @@ -218,7 +218,8 @@ void ActionHandler::createActions() registerCommand(Constants::ACTION_ADD_CANVAS_DIAGRAM, nullptr, Core::Context(), true, tr("Add Canvas Diagram")); d->synchronizeBrowserAction = registerCommand( Constants::ACTION_SYNC_BROWSER, nullptr, Core::Context(), true, - tr("Synchronize Browser and Diagram
Press&Hold for options"))->action(); + tr("Synchronize Browser and Diagram") + "
" + + tr("Press && Hold for options") + "")->action(); d->synchronizeBrowserAction->setIcon(Utils::Icons::LINK.icon()); d->synchronizeBrowserAction->setCheckable(true);