forked from qt-creator/qt-creator
TextEditor: Tr::tr
Change-Id: I28aa68e25c53c3a4d1c370074d7b3318944dc45a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "tabsettingswidget.h"
|
||||
|
||||
#include "tabsettings.h"
|
||||
#include "texteditortr.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
@@ -18,7 +19,7 @@ namespace TextEditor {
|
||||
QString continuationTooltip()
|
||||
{
|
||||
// FIXME: This is unfair towards translators.
|
||||
return QCoreApplication::translate("TextEditor::TabSettingsWidget",
|
||||
return Tr::tr(
|
||||
"<html><head/><body>\n"
|
||||
"Influences the indentation of continuation lines.\n"
|
||||
"\n"
|
||||
@@ -50,37 +51,37 @@ TabSettingsWidget::TabSettingsWidget(QWidget *parent) :
|
||||
QGroupBox(parent)
|
||||
{
|
||||
resize(254, 189);
|
||||
setTitle(tr("Tabs And Indentation"));
|
||||
setTitle(Tr::tr("Tabs And Indentation"));
|
||||
|
||||
m_codingStyleWarning = new QLabel(
|
||||
tr("<i>Code indentation is configured in <a href=\"C++\">C++</a> "
|
||||
Tr::tr("<i>Code indentation is configured in <a href=\"C++\">C++</a> "
|
||||
"and <a href=\"QtQuick\">Qt Quick</a> settings.</i>"));
|
||||
m_codingStyleWarning->setVisible(false);
|
||||
m_codingStyleWarning->setWordWrap(true);
|
||||
m_codingStyleWarning->setToolTip(
|
||||
tr("The text editor indentation setting is used for non-code files only. See the C++ "
|
||||
Tr::tr("The text editor indentation setting is used for non-code files only. See the C++ "
|
||||
"and Qt Quick coding style settings to configure indentation for code files."));
|
||||
|
||||
m_tabPolicy = new QComboBox(this);
|
||||
m_tabPolicy->setMinimumContentsLength(28);
|
||||
m_tabPolicy->addItem(tr("Spaces Only"));
|
||||
m_tabPolicy->addItem(tr("Tabs Only"));
|
||||
m_tabPolicy->addItem(tr("Mixed"));
|
||||
m_tabPolicy->addItem(Tr::tr("Spaces Only"));
|
||||
m_tabPolicy->addItem(Tr::tr("Tabs Only"));
|
||||
m_tabPolicy->addItem(Tr::tr("Mixed"));
|
||||
|
||||
auto tabSizeLabel = new QLabel(tr("Ta&b size:"));
|
||||
auto tabSizeLabel = new QLabel(Tr::tr("Ta&b size:"));
|
||||
|
||||
m_tabSize = new QSpinBox(this);
|
||||
m_tabSize->setRange(1, 20);
|
||||
|
||||
auto indentSizeLabel = new QLabel(tr("&Indent size:"));
|
||||
auto indentSizeLabel = new QLabel(Tr::tr("&Indent size:"));
|
||||
|
||||
m_indentSize = new QSpinBox(this);
|
||||
m_indentSize->setRange(1, 20);
|
||||
|
||||
m_continuationAlignBehavior = new QComboBox;
|
||||
m_continuationAlignBehavior->addItem(tr("Not At All"));
|
||||
m_continuationAlignBehavior->addItem(tr("With Spaces"));
|
||||
m_continuationAlignBehavior->addItem(tr("With Regular Indent"));
|
||||
m_continuationAlignBehavior->addItem(Tr::tr("Not At All"));
|
||||
m_continuationAlignBehavior->addItem(Tr::tr("With Spaces"));
|
||||
m_continuationAlignBehavior->addItem(Tr::tr("With Regular Indent"));
|
||||
m_continuationAlignBehavior->setToolTip(continuationTooltip());
|
||||
|
||||
tabSizeLabel->setBuddy(m_tabSize);
|
||||
@@ -91,10 +92,10 @@ TabSettingsWidget::TabSettingsWidget(QWidget *parent) :
|
||||
|
||||
Column {
|
||||
m_codingStyleWarning,
|
||||
tr("Tab policy:"),
|
||||
Tr::tr("Tab policy:"),
|
||||
indent(m_tabPolicy),
|
||||
Row { tabSizeLabel, m_tabSize, indentSizeLabel, m_indentSize, st },
|
||||
tr("Align continuation lines:"),
|
||||
Tr::tr("Align continuation lines:"),
|
||||
indent(m_continuationAlignBehavior)
|
||||
}.attachTo(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user