forked from qt-creator/qt-creator
Move HTML out of translated strings
Change-Id: I4664427086619f33e9a882eb3f0a5f2f52e1b42a Reviewed-by: Jochen Becher <jochen_becher@gmx.de> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1180,7 +1180,7 @@ void PropertiesView::MView::onClassMembersStatusChanged(bool valid)
|
|||||||
if (valid)
|
if (valid)
|
||||||
m_classMembersStatusLabel->clear();
|
m_classMembersStatusLabel->clear();
|
||||||
else
|
else
|
||||||
m_classMembersStatusLabel->setText(tr("<font color=red>Invalid syntax.</font>"));
|
m_classMembersStatusLabel->setText("<font color=red>" + tr("Invalid syntax.") + "</font>");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertiesView::MView::onParseClassMembers()
|
void PropertiesView::MView::onParseClassMembers()
|
||||||
|
@@ -39,9 +39,10 @@ VersionSelector::VersionSelector(const QString &fileName, const QString &message
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->headerLabel->setText(ui->headerLabel->text().arg(fileName));
|
ui->headerLabel->setText(ui->headerLabel->text().arg(fileName));
|
||||||
ui->loadedText->setHtml(tr("<html><head/><body><p><b>Note: You will not be able to check in "
|
ui->loadedText->setHtml("<html><head/><body><p><b>"
|
||||||
"this file without merging the changes (not supported by the "
|
+ tr("Note: You will not be able to check in this file without merging "
|
||||||
"plugin)</b></p></body></html>"));
|
"the changes (not supported by the plugin)")
|
||||||
|
+ "</b></p></body></html>");
|
||||||
m_stream = new QTextStream(message.toLocal8Bit(), QIODevice::ReadOnly | QIODevice::Text);
|
m_stream = new QTextStream(message.toLocal8Bit(), QIODevice::ReadOnly | QIODevice::Text);
|
||||||
QString line;
|
QString line;
|
||||||
while (!m_stream->atEnd() && !line.contains(QLatin1String("1) Loaded version")))
|
while (!m_stream->atEnd() && !line.contains(QLatin1String("1) Loaded version")))
|
||||||
|
@@ -450,9 +450,9 @@ KitInformation::ItemList CMakeGeneratorKitInformation::toUserOutput(const Kit *k
|
|||||||
} else {
|
} else {
|
||||||
message = tr("Generator: %1<br>Extra generator: %2").arg(info.generator).arg(info.extraGenerator);
|
message = tr("Generator: %1<br>Extra generator: %2").arg(info.generator).arg(info.extraGenerator);
|
||||||
if (!info.platform.isEmpty())
|
if (!info.platform.isEmpty())
|
||||||
message += tr("<br>Platform: %1").arg(info.platform);
|
message += "<br/>" + tr("Platform: %1").arg(info.platform);
|
||||||
if (!info.toolset.isEmpty())
|
if (!info.toolset.isEmpty())
|
||||||
message += tr("<br>Toolset: %1").arg(info.toolset);
|
message += "<br/>" + tr("Toolset: %1").arg(info.toolset);
|
||||||
}
|
}
|
||||||
return ItemList() << qMakePair(tr("CMake Generator"), message);
|
return ItemList() << qMakePair(tr("CMake Generator"), message);
|
||||||
}
|
}
|
||||||
|
@@ -115,7 +115,7 @@ void CMakeTargetNode::setTargetInformation(const QList<Utils::FileName> &artifac
|
|||||||
m_tooltip += QCoreApplication::translate("CMakeTargetNode", "No build artifacts");
|
m_tooltip += QCoreApplication::translate("CMakeTargetNode", "No build artifacts");
|
||||||
} else {
|
} else {
|
||||||
const QStringList tmp = Utils::transform(artifacts, &Utils::FileName::toUserOutput);
|
const QStringList tmp = Utils::transform(artifacts, &Utils::FileName::toUserOutput);
|
||||||
m_tooltip += QCoreApplication::translate("CMakeTargetNode", "Build artifacts:<br>")
|
m_tooltip += QCoreApplication::translate("CMakeTargetNode", "Build artifacts:") + "<br>"
|
||||||
+ tmp.join("<br>");
|
+ tmp.join("<br>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -286,7 +286,8 @@ void KdePasteProtocol::paste(const QString &text, Protocol::ContentType ct, int
|
|||||||
QString details = tr("Pasting to KDE paster needs authentication.<br/>"
|
QString details = tr("Pasting to KDE paster needs authentication.<br/>"
|
||||||
"Enter your KDE Identity credentials to continue.");
|
"Enter your KDE Identity credentials to continue.");
|
||||||
if (m_loginFailed)
|
if (m_loginFailed)
|
||||||
details.prepend(tr("<span style='background-color:LightYellow;color:red'>Login failed</span><br/><br/>"));
|
details.prepend("<span style='background-color:LightYellow;color:red'>"
|
||||||
|
+ tr("Login failed") + "</span><br/><br/>");
|
||||||
|
|
||||||
AuthenticationDialog authDialog(details, Core::ICore::dialogParent());
|
AuthenticationDialog authDialog(details, Core::ICore::dialogParent());
|
||||||
authDialog.setWindowTitle("Authenticate for KDE paster");
|
authDialog.setWindowTitle("Authenticate for KDE paster");
|
||||||
|
@@ -447,9 +447,9 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent)
|
|||||||
m_labelUseFullPath->setToolTip(pathToolTip);
|
m_labelUseFullPath->setToolTip(pathToolTip);
|
||||||
|
|
||||||
const QString moduleToolTip =
|
const QString moduleToolTip =
|
||||||
tr("<p>Specifying the module (base name of the library or executable) "
|
"<p>" + tr("Specifying the module (base name of the library or executable) "
|
||||||
"for function or file type breakpoints can significantly speed up "
|
"for function or file type breakpoints can significantly speed up "
|
||||||
"debugger startup times (CDB, LLDB).");
|
"debugger startup times (CDB, LLDB).") + "</p>";
|
||||||
m_lineEditModule = new QLineEdit(groupBoxAdvanced);
|
m_lineEditModule = new QLineEdit(groupBoxAdvanced);
|
||||||
m_lineEditModule->setToolTip(moduleToolTip);
|
m_lineEditModule->setToolTip(moduleToolTip);
|
||||||
m_labelModule = new QLabel(tr("&Module:"), groupBoxAdvanced);
|
m_labelModule = new QLabel(tr("&Module:"), groupBoxAdvanced);
|
||||||
@@ -457,8 +457,8 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent)
|
|||||||
m_labelModule->setToolTip(moduleToolTip);
|
m_labelModule->setToolTip(moduleToolTip);
|
||||||
|
|
||||||
const QString commandsToolTip =
|
const QString commandsToolTip =
|
||||||
tr("<p>Debugger commands to be executed when the breakpoint is hit. "
|
"<p>" + tr("Debugger commands to be executed when the breakpoint is hit. "
|
||||||
"This feature is only available for GDB.");
|
"This feature is only available for GDB.") + "</p>";
|
||||||
m_textEditCommands = new SmallTextEdit(groupBoxAdvanced);
|
m_textEditCommands = new SmallTextEdit(groupBoxAdvanced);
|
||||||
m_textEditCommands->setToolTip(commandsToolTip);
|
m_textEditCommands->setToolTip(commandsToolTip);
|
||||||
m_labelCommands = new QLabel(tr("&Commands:"), groupBoxAdvanced);
|
m_labelCommands = new QLabel(tr("&Commands:"), groupBoxAdvanced);
|
||||||
|
@@ -320,10 +320,11 @@ QWidget *LocalsAndExpressionsOptionsPage::widget()
|
|||||||
|
|
||||||
auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox);
|
auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox);
|
||||||
groupBoxCustomDumperCommands->setTitle(tr("Debugging Helper Customization"));
|
groupBoxCustomDumperCommands->setTitle(tr("Debugging Helper Customization"));
|
||||||
groupBoxCustomDumperCommands->setToolTip(tr(
|
groupBoxCustomDumperCommands->setToolTip("<html><head/><body><p>"
|
||||||
"<html><head/><body><p>Python commands entered here will be executed after built-in "
|
+ 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 have been loaded and fully initialized. You can "
|
||||||
"debugging helpers or modify existing ones here.</p></body></html>"));
|
"load additional debugging helpers or modify existing ones here.")
|
||||||
|
+ "</p></body></html>");
|
||||||
|
|
||||||
auto textEditCustomDumperCommands = new QTextEdit(groupBoxCustomDumperCommands);
|
auto textEditCustomDumperCommands = new QTextEdit(groupBoxCustomDumperCommands);
|
||||||
textEditCustomDumperCommands->setAcceptRichText(false);
|
textEditCustomDumperCommands->setAcceptRichText(false);
|
||||||
|
@@ -401,10 +401,11 @@ void DebuggerItemConfigWidget::load(const DebuggerItem *item)
|
|||||||
const bool is64bit = is64BitWindowsSystem();
|
const bool is64bit = is64BitWindowsSystem();
|
||||||
const QString versionString = is64bit ? tr("64-bit version") : tr("32-bit version");
|
const QString versionString = is64bit ? tr("64-bit version") : tr("32-bit version");
|
||||||
//: Label text for path configuration. %2 is "x-bit version".
|
//: Label text for path configuration. %2 is "x-bit version".
|
||||||
text = tr("<html><body><p>Specify the path to the "
|
text = "<html><body><p>"
|
||||||
"<a href=\"%1\">Windows Console Debugger executable</a>"
|
+ tr("Specify the path to the "
|
||||||
" (%2) here.</p>""</body></html>").
|
"<a href=\"%1\">Windows Console Debugger executable</a>"
|
||||||
arg(QLatin1String(debuggingToolsWikiLinkC), versionString);
|
" (%2) here.").arg(QLatin1String(debuggingToolsWikiLinkC), versionString)
|
||||||
|
+ "</p></body></html>";
|
||||||
versionCommand = QLatin1String("-version");
|
versionCommand = QLatin1String("-version");
|
||||||
} else {
|
} else {
|
||||||
versionCommand = QLatin1String("--version");
|
versionCommand = QLatin1String("--version");
|
||||||
|
@@ -218,7 +218,8 @@ void ActionHandler::createActions()
|
|||||||
registerCommand(Constants::ACTION_ADD_CANVAS_DIAGRAM, nullptr, Core::Context(), true, tr("Add Canvas Diagram"));
|
registerCommand(Constants::ACTION_ADD_CANVAS_DIAGRAM, nullptr, Core::Context(), true, tr("Add Canvas Diagram"));
|
||||||
d->synchronizeBrowserAction = registerCommand(
|
d->synchronizeBrowserAction = registerCommand(
|
||||||
Constants::ACTION_SYNC_BROWSER, nullptr, Core::Context(), true,
|
Constants::ACTION_SYNC_BROWSER, nullptr, Core::Context(), true,
|
||||||
tr("Synchronize Browser and Diagram<br><i><small>Press&Hold for options</small></i>"))->action();
|
tr("Synchronize Browser and Diagram") + "<br><i><small>"
|
||||||
|
+ tr("Press && Hold for options") + "</small></i>")->action();
|
||||||
d->synchronizeBrowserAction->setIcon(Utils::Icons::LINK.icon());
|
d->synchronizeBrowserAction->setIcon(Utils::Icons::LINK.icon());
|
||||||
d->synchronizeBrowserAction->setCheckable(true);
|
d->synchronizeBrowserAction->setCheckable(true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user