Commit 31eaf32a authored by Sergey Belyashov's avatar Sergey Belyashov

Fix untranslated messages

Change-Id: I21ff7f3f70116944ba08ea18bdeeb258c0984f09
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent da2b1cfa
......@@ -93,7 +93,7 @@ bool BeautifierPlugin::initialize(const QStringList &arguments, QString *errorSt
m_tools << new Uncrustify::Uncrustify(this);
Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::MENU_ID);
menu->menu()->setTitle(QLatin1String("Beautifier"));
menu->menu()->setTitle(QCoreApplication::translate("Beautifier", Constants::OPTION_TR_CATEGORY));
Core::ActionManager::actionContainer(Core::Constants::M_TOOLS)->addMenu(menu);
for (int i = 0, total = m_tools.count(); i < total; ++i) {
......
......@@ -670,7 +670,8 @@ void MainWindow::registerDefaultActions()
// Show Sidebar Action
m_toggleSideBarAction = new QAction(QIcon(QLatin1String(Constants::ICON_TOGGLE_SIDEBAR)),
tr(Constants::TR_SHOW_SIDEBAR), this);
QCoreApplication::translate("Core", Constants::TR_SHOW_SIDEBAR),
this);
m_toggleSideBarAction->setCheckable(true);
cmd = ActionManager::registerAction(m_toggleSideBarAction, Constants::TOGGLE_SIDEBAR);
cmd->setAttribute(Command::CA_UpdateText);
......
......@@ -40,6 +40,7 @@
#include "id.h"
#include "imode.h"
#include <QCoreApplication>
#include <QDebug>
#include <QSettings>
......@@ -222,9 +223,9 @@ void NavigationWidget::updateToggleText()
d->m_toggleSideBarAction->setEnabled(haveData && NavigationWidgetPlaceHolder::m_current);
if (isShown())
d->m_toggleSideBarAction->setToolTip(tr(Constants::TR_HIDE_SIDEBAR));
d->m_toggleSideBarAction->setToolTip(QCoreApplication::translate("Core", Constants::TR_HIDE_SIDEBAR));
else
d->m_toggleSideBarAction->setToolTip(tr(Constants::TR_SHOW_SIDEBAR));
d->m_toggleSideBarAction->setToolTip(QCoreApplication::translate("Core", Constants::TR_SHOW_SIDEBAR));
}
void NavigationWidget::placeHolderChanged(NavigationWidgetPlaceHolder *holder)
......
......@@ -54,6 +54,7 @@
#include <utils/qtcassert.h>
#include <utils/styledbar.h>
#include <QCoreApplication>
#include <QHBoxLayout>
#include <QHelpEngine>
#include <QHelpSearchEngine>
......@@ -132,15 +133,18 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
}
if (style != SideBarWidget) {
m_toggleSideBarAction = new QAction(QIcon(QLatin1String(Core::Constants::ICON_TOGGLE_SIDEBAR)),
tr(Core::Constants::TR_SHOW_SIDEBAR), toolBar);
QCoreApplication::translate("Core", Core::Constants::TR_SHOW_SIDEBAR),
toolBar);
m_toggleSideBarAction->setCheckable(true);
m_toggleSideBarAction->setChecked(false);
cmd = Core::ActionManager::registerAction(m_toggleSideBarAction,
Core::Constants::TOGGLE_SIDEBAR, context);
connect(m_toggleSideBarAction, &QAction::toggled, m_toggleSideBarAction,
[this](bool checked) {
m_toggleSideBarAction->setText(checked ? tr(Core::Constants::TR_HIDE_SIDEBAR)
: tr(Core::Constants::TR_SHOW_SIDEBAR));
m_toggleSideBarAction->setText(
QCoreApplication::translate("Core",
checked ? Core::Constants::TR_HIDE_SIDEBAR
: Core::Constants::TR_SHOW_SIDEBAR));
});
addSideBar();
m_toggleSideBarAction->setChecked(m_sideBar->isVisibleTo(this));
......
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