ClangFormat: Tr::tr()

Change-Id: Iabbe39bfdd3ae24d65610a00d792e16591a1b6ee
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2023-02-04 01:46:50 +01:00
parent 48affa1889
commit 389b9503d7
8 changed files with 26 additions and 40 deletions

View File

@@ -41695,7 +41695,7 @@ Was soll %1 tun?</translation>
</message>
</context>
<context>
<name>ClangFormat::ClangFormatConfigWidget</name>
<name>::ClangFormat</name>
<message>
<source>Clang-Format Style</source>
<translation>Clang-Format-Stil</translation>
@@ -41709,7 +41709,7 @@ Was soll %1 tun?</translation>
</message>
</context>
<context>
<name>ClangFormat::ClangFormatPlugin</name>
<name>::ClangFormat</name>
<message>
<source>Open Used .clang-format Configuration File</source>
<translation>Verwendete .clang-format-Konfigurationsdatei öffnen</translation>
@@ -50556,7 +50556,7 @@ in &quot;%2&quot; aus.
</message>
</context>
<context>
<name>ClangFormat::ClangFormatGlobalConfigWidget</name>
<name>::ClangFormat</name>
<message>
<source>Formatting mode:</source>
<translation>Formatierungsart:</translation>
@@ -50597,9 +50597,6 @@ in &quot;%2&quot; aus.
<source>Override Clang Format configuration file with the chosen configuration.</source>
<translation>Die Clang-Format-Konfigurationsdatei mit der gewählten Konfiguration überschreiben.</translation>
</message>
</context>
<context>
<name>ClangFormatStyleFactory</name>
<message>
<source>ClangFormat</source>
<translation>ClangFormat</translation>

View File

@@ -1695,7 +1695,7 @@ Međutim, korištenje opuštenih i proširenih pravila također znači da nije m
</message>
</context>
<context>
<name>ClangFormat::ClangFormatConfigWidget</name>
<name>::ClangFormat</name>
<message>
<source>Format instead of indenting</source>
<translation>Formatiraj umjesto uvlačenja</translation>
@@ -15655,7 +15655,7 @@ Check the test environment.</source>
</message>
</context>
<context>
<name>ClangFormat::ClangFormatPlugin</name>
<name>::ClangFormat</name>
<message>
<source>Open Used .clang-format Configuration File</source>
<translation>Otvori korištenu konfiguracijsku datoteku .clang-formata</translation>

View File

@@ -42131,7 +42131,7 @@ Output:
</message>
</context>
<context>
<name>ClangFormat::ClangFormatConfigWidget</name>
<name>::ClangFormat</name>
<message>
<source>Format instead of indenting</source>
<translation></translation>
@@ -44212,7 +44212,7 @@ The name of the release build configuration created by default for a qmake proje
</message>
</context>
<context>
<name>ClangFormat::ClangFormatPlugin</name>
<name>::ClangFormat</name>
<message>
<source>Open Used .clang-format Configuration File</source>
<translation>使 clang-format </translation>

View File

@@ -6367,7 +6367,7 @@ However, using the relaxed and extended rules means also that no highlighting/co
</message>
</context>
<context>
<name>ClangFormat::ClangFormatConfigWidget</name>
<name>::ClangFormat</name>
<message>
<source>Apply</source>
<translation>Применить</translation>
@@ -6404,9 +6404,6 @@ However, using the relaxed and extended rules means also that no highlighting/co
<source>Fallback configuration</source>
<translation>Запасная конфигурация</translation>
</message>
</context>
<context>
<name>ClangFormat::ClangFormatPlugin</name>
<message>
<source>Open Used .clang-format Configuration File</source>
<translation>Открыть использованный файл настроек .clang-format</translation>

View File

@@ -6960,14 +6960,11 @@ However, using the relaxed and extended rules means also that no highlighting/co
</message>
</context>
<context>
<name>ClangFormat::ClangFormatConfigWidget</name>
<name>::ClangFormat</name>
<message>
<source>Clang-Format Style</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangFormat::ClangFormatGlobalConfigWidget</name>
<message>
<source>ClangFormat global setting:</source>
<translation type="unfinished"></translation>
@@ -7008,9 +7005,6 @@ However, using the relaxed and extended rules means also that no highlighting/co
<source>Override Clang Format configuration file with the chosen configuration.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangFormat::ClangFormatPlugin</name>
<message>
<source>Open Used .clang-format Configuration File</source>
<translation type="unfinished"></translation>
@@ -7019,9 +7013,6 @@ However, using the relaxed and extended rules means also that no highlighting/co
<source>The ClangFormat plugin has been built against an unmodified Clang. You might experience formatting glitches in certain circumstances. See https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md for more information.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangFormatStyleFactory</name>
<message>
<source>ClangFormat</source>
<translation type="unfinished"></translation>

View File

@@ -7,6 +7,7 @@
#include "clangformatconstants.h"
#include "clangformatfile.h"
#include "clangformatindenter.h"
#include "clangformattr.h"
#include "clangformatutils.h"
// the file was generated by scripts/generateClangFormatChecksLayout.py
@@ -82,7 +83,7 @@ ClangFormatConfigWidget::ClangFormatConfigWidget(TextEditor::ICodeStylePreferenc
d->config = std::make_unique<ClangFormatFile>(filePathToCurrentSettings(codeStyle->currentPreferences()));
resize(489, 305);
d->fallbackConfig = new QLabel(tr("Clang-Format Style"));
d->fallbackConfig = new QLabel(Tr::tr("Clang-Format Style"));
d->checksScrollArea = new QScrollArea();
d->checksWidget = new ClangFormatChecks();

View File

@@ -5,6 +5,7 @@
#include "clangformatconstants.h"
#include "clangformatsettings.h"
#include "clangformattr.h"
#include "clangformatutils.h"
#include <projectexplorer/project.h>
@@ -31,18 +32,18 @@ ClangFormatGlobalConfigWidget::ClangFormatGlobalConfigWidget(ProjectExplorer::Pr
resize(489, 305);
m_projectHasClangFormat = new QLabel(this);
m_formattingModeLabel = new QLabel(tr("Formatting mode:"));
m_formattingModeLabel = new QLabel(Tr::tr("Formatting mode:"));
m_indentingOrFormatting = new QComboBox(this);
m_formatWhileTyping = new QCheckBox(tr("Format while typing"));
m_formatOnSave = new QCheckBox(tr("Format edited code on file save"));
m_overrideDefault = new QCheckBox(tr("Override Clang Format configuration file"));
m_useGlobalSettings = new QCheckBox(tr("Use global settings"));
m_formatWhileTyping = new QCheckBox(Tr::tr("Format while typing"));
m_formatOnSave = new QCheckBox(Tr::tr("Format edited code on file save"));
m_overrideDefault = new QCheckBox(Tr::tr("Override Clang Format configuration file"));
m_useGlobalSettings = new QCheckBox(Tr::tr("Use global settings"));
m_useGlobalSettings->hide();
using namespace Layouting;
Group globalSettingsGroupBox {
title(tr("ClangFormat settings:")),
title(Tr::tr("ClangFormat settings:")),
Column {
m_useGlobalSettings,
Row { m_formattingModeLabel, m_indentingOrFormatting, st },
@@ -94,11 +95,11 @@ void ClangFormatGlobalConfigWidget::initCheckBoxes()
void ClangFormatGlobalConfigWidget::initIndentationOrFormattingCombobox()
{
m_indentingOrFormatting->insertItem(static_cast<int>(ClangFormatSettings::Mode::Indenting),
tr("Indenting only"));
Tr::tr("Indenting only"));
m_indentingOrFormatting->insertItem(static_cast<int>(ClangFormatSettings::Mode::Formatting),
tr("Full formatting"));
Tr::tr("Full formatting"));
m_indentingOrFormatting->insertItem(static_cast<int>(ClangFormatSettings::Mode::Disable),
tr("Disable"));
Tr::tr("Disable"));
m_indentingOrFormatting->setCurrentIndex(
static_cast<int>(getProjectIndentationOrFormattingSettings(m_project)));
@@ -146,7 +147,7 @@ void ClangFormatGlobalConfigWidget::initOverrideCheckBox()
m_projectHasClangFormat->hide();
} else {
m_projectHasClangFormat->show();
m_projectHasClangFormat->setText(tr("The current project has its own .clang-format file which "
m_projectHasClangFormat->setText(Tr::tr("The current project has its own .clang-format file which "
"can be overridden by the settings below."));
}
@@ -160,7 +161,7 @@ void ClangFormatGlobalConfigWidget::initOverrideCheckBox()
this, setEnableOverrideCheckBox);
m_overrideDefault->setToolTip(
tr("Override Clang Format configuration file with the chosen configuration."));
Tr::tr("Override Clang Format configuration file with the chosen configuration."));
m_overrideDefault->setChecked(getProjectOverriddenSettings(m_project));

View File

@@ -37,7 +37,6 @@ namespace ClangFormat {
class ClangFormatStyleFactory : public CppCodeStylePreferencesFactory
{
Q_DECLARE_TR_FUNCTIONS(ClangFormatStyleFactory)
public:
Indenter *createIndenter(QTextDocument *doc) const override
{
@@ -47,7 +46,7 @@ public:
std::pair<CppCodeStyleWidget *, QString> additionalTab(
ICodeStylePreferences *codeStyle, Project *project, QWidget *parent) const override
{
return {new ClangFormatConfigWidget(codeStyle, project, parent), tr("ClangFormat")};
return {new ClangFormatConfigWidget(codeStyle, project, parent), Tr::tr("ClangFormat")};
}
CodeStyleEditorWidget *createAdditionalGlobalSettings(
@@ -72,7 +71,7 @@ void ClangFormatPlugin::initialize()
ActionContainer *contextMenu = ActionManager::actionContainer(CppEditor::Constants::M_CONTEXT);
if (contextMenu) {
auto openClangFormatConfigAction
= new QAction(tr("Open Used .clang-format Configuration File"), this);
= new QAction(Tr::tr("Open Used .clang-format Configuration File"), this);
Command *command = ActionManager::registerAction(openClangFormatConfigAction,
Constants::OPEN_CURRENT_CONFIG_ID);
contextMenu->addSeparator();