forked from qt-creator/qt-creator
QmlJSTools: Convert to using Tr::tr
Change-Id: I40595e560fb2499226bd2c914a0b78ed68f830ab Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "qmljsqtstylecodeformatter.h"
|
||||
#include "qmljstoolsconstants.h"
|
||||
#include "qmljstoolssettings.h"
|
||||
#include "qmljstoolstr.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
@@ -124,9 +125,9 @@ void QmlJSCodeStylePreferencesWidget::updatePreview()
|
||||
QmlJSCodeStyleSettingsPage::QmlJSCodeStyleSettingsPage()
|
||||
{
|
||||
setId(Constants::QML_JS_CODE_STYLE_SETTINGS_ID);
|
||||
setDisplayName(QCoreApplication::translate("QmlJSTools", Constants::QML_JS_CODE_STYLE_SETTINGS_NAME));
|
||||
setDisplayName(Tr::tr(Constants::QML_JS_CODE_STYLE_SETTINGS_NAME));
|
||||
setCategory(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML);
|
||||
setDisplayCategory(QCoreApplication::translate("QmlJSEditor", "Qt Quick"));
|
||||
setDisplayCategory(Tr::tr("Qt Quick"));
|
||||
setCategoryIconPath(":/qmljstools/images/settingscategory_qml.png");
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "qmljscodestylesettingswidget.h"
|
||||
|
||||
#include "qmljscodestylesettings.h"
|
||||
#include "qmljstoolstr.h"
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
|
||||
@@ -22,9 +22,9 @@ QmlJSCodeStyleSettingsWidget::QmlJSCodeStyleSettingsWidget(QWidget *parent)
|
||||
using namespace Utils::Layouting;
|
||||
Column {
|
||||
Group {
|
||||
title(tr("Qml JS Code Style")),
|
||||
title(Tr::tr("Qml JS Code Style")),
|
||||
Form {
|
||||
tr("&Line length:"), m_lineLengthSpinBox, br,
|
||||
Tr::tr("&Line length:"), m_lineLengthSpinBox, br,
|
||||
}
|
||||
}
|
||||
}.attachTo(this, WithoutMargins);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "qmljsfunctionfilter.h"
|
||||
|
||||
#include "qmljslocatordata.h"
|
||||
#include "qmljstoolstr.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <utils/algorithm.h>
|
||||
@@ -21,7 +21,7 @@ FunctionFilter::FunctionFilter(LocatorData *data, QObject *parent)
|
||||
, m_data(data)
|
||||
{
|
||||
setId("Functions");
|
||||
setDisplayName(tr("QML Functions"));
|
||||
setDisplayName(Tr::tr("QML Functions"));
|
||||
setDefaultShortcutString("m");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "qmljstoolsplugin.h"
|
||||
#include "qmljsmodelmanager.h"
|
||||
#include "qmljsbundleprovider.h"
|
||||
#include "qmljscodestylesettingspage.h"
|
||||
#include "qmljsfunctionfilter.h"
|
||||
#include "qmljslocatordata.h"
|
||||
#include "qmljscodestylesettingspage.h"
|
||||
#include "qmljsmodelmanager.h"
|
||||
#include "qmljstoolsconstants.h"
|
||||
#include "qmljstoolsplugin.h"
|
||||
#include "qmljstoolssettings.h"
|
||||
#include "qmljsbundleprovider.h"
|
||||
#include "qmljstoolstr.h"
|
||||
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -34,7 +35,7 @@ public:
|
||||
QmlJSToolsSettings settings;
|
||||
ModelManager modelManager;
|
||||
|
||||
QAction resetCodeModelAction{QmlJSToolsPlugin::tr("Reset Code Model"), nullptr};
|
||||
QAction resetCodeModelAction{Tr::tr("Reset Code Model"), nullptr};
|
||||
|
||||
LocatorData locatorData;
|
||||
FunctionFilter functionFilter{&locatorData};
|
||||
@@ -70,7 +71,7 @@ QmlJSToolsPluginPrivate::QmlJSToolsPluginPrivate()
|
||||
ActionContainer *mtools = ActionManager::actionContainer(Core::Constants::M_TOOLS);
|
||||
ActionContainer *mqmljstools = ActionManager::createMenu(Constants::M_TOOLS_QMLJS);
|
||||
QMenu *menu = mqmljstools->menu();
|
||||
menu->setTitle(QmlJSToolsPlugin::tr("&QML/JS"));
|
||||
menu->setTitle(Tr::tr("&QML/JS"));
|
||||
menu->setEnabled(true);
|
||||
mtools->addMenu(mqmljstools);
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "qmljstoolssettings.h"
|
||||
#include "qmljstoolsconstants.h"
|
||||
#include "qmljscodestylepreferences.h"
|
||||
#include "qmljscodestylepreferencesfactory.h"
|
||||
#include "qmljstoolsconstants.h"
|
||||
#include "qmljstoolssettings.h"
|
||||
#include "qmljstoolstr.h"
|
||||
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <texteditor/tabsettings.h>
|
||||
@@ -48,7 +49,7 @@ QmlJSToolsSettings::QmlJSToolsSettings()
|
||||
// Qt style
|
||||
auto qtCodeStyle = new QmlJSCodeStylePreferences;
|
||||
qtCodeStyle->setId("qt");
|
||||
qtCodeStyle->setDisplayName(tr("Qt"));
|
||||
qtCodeStyle->setDisplayName(Tr::tr("Qt"));
|
||||
qtCodeStyle->setReadOnly(true);
|
||||
TabSettings qtTabSettings;
|
||||
qtTabSettings.m_tabPolicy = TabSettings::SpacesOnlyTabPolicy;
|
||||
@@ -98,7 +99,7 @@ QmlJSToolsSettings::QmlJSToolsSettings()
|
||||
|
||||
// create custom code style out of old settings
|
||||
ICodeStylePreferences *oldCreator = pool->createCodeStyle(
|
||||
"legacy", legacyTabSettings, QVariant(), tr("Old Creator"));
|
||||
"legacy", legacyTabSettings, QVariant(), Tr::tr("Old Creator"));
|
||||
|
||||
// change the current delegate and save
|
||||
m_globalCodeStyle->setCurrentDelegate(oldCreator);
|
||||
|
||||
Reference in New Issue
Block a user