Commit 7fa58f1d authored by Sergey Belyashov's avatar Sergey Belyashov
Browse files

Fix missing of some translations



Task-number: QTCREATORBUG-13649
Change-Id: I69f78b3b8d2366003bfce81a2afba0068e716d22
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 044eeacd
......@@ -447,7 +447,7 @@ public:
GlobalMacroExpander()
{
setDisplayName(MacroExpander::tr("Global variables"));
registerPrefix("Env", tr("Access environment variables."),
registerPrefix("Env", MacroExpander::tr("Access environment variables."),
[](const QString &value) { return QString::fromLocal8Bit(qgetenv(value.toLocal8Bit())); });
}
};
......
......@@ -102,7 +102,7 @@ public:
: IMode(parent)
{
setContext(Context(C_ANALYZEMODE, C_NAVIGATION_PANE));
setDisplayName(tr("Analyze"));
setDisplayName(AnalyzerManager::tr("Analyze"));
setIcon(QIcon(QLatin1String(":/images/analyzer_mode.png")));
setPriority(P_MODE_ANALYZE);
setId(MODE_ANALYZE);
......@@ -125,6 +125,7 @@ public:
class AnalyzerManagerPrivate : public QObject
{
Q_DECLARE_TR_FUNCTIONS(Analyzer::AnalyzerManager)
public:
typedef QHash<QString, QVariant> FancyMainWindowSettings;
......
......@@ -64,6 +64,7 @@ public:
class MimeTypeMagicDialog : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::MimeTypeMagicDialog)
public:
explicit MimeTypeMagicDialog(QWidget *parent = 0);
......
......@@ -91,7 +91,7 @@ public:
{
m_iconButton = new IconButton;
m_iconButton->setPixmap(QPixmap(QLatin1String(":/core/images/replace.png")));
m_iconButton->setToolTip(tr("Insert variable"));
m_iconButton->setToolTip(VariableChooser::tr("Insert variable"));
m_iconButton->hide();
connect(m_iconButton.data(), static_cast<void(QAbstractButton::*)(bool)>(&QAbstractButton::clicked),
this, &VariableChooserPrivate::updatePositionAndShow);
......@@ -197,17 +197,17 @@ void VariableTreeView::contextMenuEvent(QContextMenuEvent *ev)
QAction *insertExpandedAction = 0;
if (unexpandedText.isEmpty()) {
insertUnexpandedAction = menu.addAction(tr("Insert unexpanded value"));
insertUnexpandedAction = menu.addAction(VariableChooser::tr("Insert unexpanded value"));
insertUnexpandedAction->setEnabled(false);
} else {
insertUnexpandedAction = menu.addAction(tr("Insert \"%1\"").arg(unexpandedText));
insertUnexpandedAction = menu.addAction(VariableChooser::tr("Insert \"%1\"").arg(unexpandedText));
}
if (expandedText.isEmpty()) {
insertExpandedAction = menu.addAction(tr("Insert expanded value"));
insertExpandedAction = menu.addAction(VariableChooser::tr("Insert expanded value"));
insertExpandedAction->setEnabled(false);
} else {
insertExpandedAction = menu.addAction(tr("Insert \"%1\"").arg(expandedText));
insertExpandedAction = menu.addAction(VariableChooser::tr("Insert \"%1\"").arg(expandedText));
}
......
......@@ -37,6 +37,7 @@
#include <QList>
#include <QObject>
#include <QString>
#include <QCoreApplication>
namespace Utils { class FileName; }
......@@ -49,6 +50,7 @@ class DebuggerItem;
class DEBUGGER_EXPORT DebuggerItemManager : public QObject
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerItemManager)
public:
DebuggerItemManager();
~DebuggerItemManager();
......
......@@ -353,6 +353,7 @@ void DebuggerItemConfigWidget::binaryPathHasChanged()
class DebuggerConfigWidget : public QWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerOptionsPage)
public:
DebuggerConfigWidget()
{
......
......@@ -238,9 +238,9 @@ public:
ToolTipModel()
{
QStringList headers;
headers.append(tr("Name"));
headers.append(tr("Value"));
headers.append(tr("Type"));
headers.append(DebuggerToolTipManager::tr("Name"));
headers.append(DebuggerToolTipManager::tr("Value"));
headers.append(DebuggerToolTipManager::tr("Type"));
setHeader(headers);
m_enabled = true;
auto item = new ToolTipWatchItem;
......
......@@ -32,12 +32,14 @@
#define DEBUGGER_STACKWINDOW_H
#include <utils/basetreeview.h>
#include <QCoreApplication>
namespace Debugger {
namespace Internal {
class StackTreeView : public Utils::BaseTreeView
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::StackTreeView)
public:
StackTreeView();
......
......@@ -199,6 +199,7 @@ public:
class WatchModel : public WatchModelBase
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::WatchModel)
public:
WatchModel(WatchHandler *handler, DebuggerEngine *engine);
......
......@@ -221,7 +221,7 @@ QString DefaultDeployConfigurationFactory::displayNameForId(Core::Id id) const
{
if (id == Constants::DEFAULT_DEPLOYCONFIGURATION_ID)
//: Display name of the default deploy configuration
return tr("Deploy Configuration");
return DeployConfigurationFactory::tr("Deploy Configuration");
return QString();
}
......
......@@ -93,9 +93,9 @@ public:
LineEditValidator(MacroExpander *expander, const QRegularExpression &pattern, QObject *parent) :
QRegularExpressionValidator(pattern, parent)
{
m_expander.setDisplayName(tr("Line Edit Validator Expander"));
m_expander.setDisplayName(JsonFieldPage::tr("Line Edit Validator Expander"));
m_expander.setAccumulating(true);
m_expander.registerVariable("INPUT", tr("The text edit input to fix up."),
m_expander.registerVariable("INPUT", JsonFieldPage::tr("The text edit input to fix up."),
[this]() { return m_currentInput; });
m_expander.registerSubProvider([expander]() -> MacroExpander * { return expander; });
}
......
......@@ -117,9 +117,9 @@ public:
m_factories = ExtensionSystem::PluginManager::getObjects<ToolChainFactory>(
[](ToolChainFactory *factory) { return factory->canCreate();});
m_model.setHeader(QStringList() << tr("Name") << tr("Type"));
m_autoRoot = new TreeItem(QStringList() << tr("Auto-detected") << QString());
m_manualRoot = new TreeItem(QStringList() << tr("Manual") << QString());
m_model.setHeader(QStringList() << ToolChainOptionsPage::tr("Name") << ToolChainOptionsPage::tr("Type"));
m_autoRoot = new TreeItem(QStringList() << ToolChainOptionsPage::tr("Auto-detected") << QString());
m_manualRoot = new TreeItem(QStringList() << ToolChainOptionsPage::tr("Manual") << QString());
m_model.rootItem()->appendChild(m_autoRoot);
m_model.rootItem()->appendChild(m_manualRoot);
foreach (ToolChain *tc, ToolChainManager::toolChains()) {
......@@ -137,7 +137,7 @@ public:
m_toolChainView->header()->setSectionResizeMode(1, QHeaderView::Stretch);
m_toolChainView->expandAll();
m_addButton = new QPushButton(tr("Add"), this);
m_addButton = new QPushButton(ToolChainOptionsPage::tr("Add"), this);
auto addMenu = new QMenu;
foreach (ToolChainFactory *factory, m_factories) {
QAction *action = new QAction(addMenu);
......@@ -147,10 +147,10 @@ public:
}
m_addButton->setMenu(addMenu);
m_cloneButton = new QPushButton(tr("Clone"), this);
m_cloneButton = new QPushButton(ToolChainOptionsPage::tr("Clone"), this);
connect(m_cloneButton, &QAbstractButton::clicked, [this] { createToolChain(0); });
m_delButton = new QPushButton(tr("Remove"), this);
m_delButton = new QPushButton(ToolChainOptionsPage::tr("Remove"), this);
m_container = new DetailsWidget(this);
m_container->setState(DetailsWidget::NoSummary);
......@@ -317,19 +317,19 @@ void ToolChainOptionsWidget::apply()
if (removedTcs.count() == 1) {
QMessageBox::warning(Core::ICore::dialogParent(),
tr("Duplicate Compilers Detected"),
tr("The following compiler was already configured:<br>"
"&nbsp;%1<br>"
"It was not configured again.")
.arg(removedTcs.at(0)));
ToolChainOptionsPage::tr("Duplicate Compilers Detected"),
ToolChainOptionsPage::tr("The following compiler was already configured:<br>"
"&nbsp;%1<br>"
"It was not configured again.")
.arg(removedTcs.at(0)));
} else if (!removedTcs.isEmpty()) {
QMessageBox::warning(Core::ICore::dialogParent(),
tr("Duplicate Compilers Detected"),
tr("The following compilers were already configured:<br>"
"&nbsp;%1<br>"
"They were not configured again.")
.arg(removedTcs.join(QLatin1String(",<br>&nbsp;"))));
ToolChainOptionsPage::tr("Duplicate Compilers Detected"),
ToolChainOptionsPage::tr("The following compilers were already configured:<br>"
"&nbsp;%1<br>"
"They were not configured again.")
.arg(removedTcs.join(QLatin1String(",<br>&nbsp;"))));
}
}
......
......@@ -79,7 +79,7 @@ QbsProfilesSettingsPage::QbsProfilesSettingsPage(QObject *parent)
: Core::IOptionsPage(parent), m_widget(0)
{
setId("AA.QbsProfiles");
setDisplayName(tr("Profiles"));
setDisplayName(QbsProjectManager::tr("Profiles"));
setCategory(Constants::QBS_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("QbsProjectManager",
Constants::QBS_SETTINGS_TR_CATEGORY));
......
......@@ -657,7 +657,7 @@ void TextEditorWidgetPrivate::ctor(const QSharedPointer<TextDocument> &doc)
// (void) new QShortcut(tr("F11"), this, SLOT(slotToggleBlockVisible()));
#ifdef DO_FOO
(void) new QShortcut(tr("CTRL+D"), this, SLOT(doFoo()));
(void) new QShortcut(TextEditorWidget::tr("CTRL+D"), this, SLOT(doFoo()));
#endif
// parentheses matcher
......
......@@ -56,6 +56,7 @@ namespace Internal {
class TextEditorActionHandlerPrivate : public QObject
{
Q_DECLARE_TR_FUNCTIONS(TextEditor::Internal::TextEditorActionHandler)
public:
TextEditorActionHandlerPrivate(TextEditorActionHandler *parent,
Core::Id contextId,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment