forked from qt-creator/qt-creator
CMake: Move to Tr::tr
Change-Id: I169da93b5184351cb915d4c198fd33318fcfe06f Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "cmakekitinformation.h"
|
||||
#include "cmakeproject.h"
|
||||
#include "cmakeprojectconstants.h"
|
||||
#include "cmakeprojectmanagertr.h"
|
||||
#include "cmakeprojectnodes.h"
|
||||
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
@@ -32,10 +33,10 @@ using namespace ProjectExplorer;
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
|
||||
CMakeManager::CMakeManager()
|
||||
: m_runCMakeAction(new QAction(QIcon(), tr("Run CMake"), this))
|
||||
, m_clearCMakeCacheAction(new QAction(QIcon(), tr("Clear CMake Configuration"), this))
|
||||
, m_runCMakeActionContextMenu(new QAction(QIcon(), tr("Run CMake"), this))
|
||||
, m_rescanProjectAction(new QAction(QIcon(), tr("Rescan Project"), this))
|
||||
: m_runCMakeAction(new QAction(QIcon(), Tr::tr("Run CMake"), this))
|
||||
, m_clearCMakeCacheAction(new QAction(QIcon(), Tr::tr("Clear CMake Configuration"), this))
|
||||
, m_runCMakeActionContextMenu(new QAction(QIcon(), Tr::tr("Run CMake"), this))
|
||||
, m_rescanProjectAction(new QAction(QIcon(), Tr::tr("Rescan Project"), this))
|
||||
{
|
||||
Core::ActionContainer *mbuild =
|
||||
Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT);
|
||||
@@ -77,7 +78,7 @@ CMakeManager::CMakeManager()
|
||||
runCMake(ProjectTree::currentBuildSystem());
|
||||
});
|
||||
|
||||
m_buildFileContextMenu = new QAction(tr("Build"), this);
|
||||
m_buildFileContextMenu = new QAction(Tr::tr("Build"), this);
|
||||
command = Core::ActionManager::registerAction(m_buildFileContextMenu,
|
||||
Constants::BUILD_FILE_CONTEXT_MENU,
|
||||
projectContext);
|
||||
@@ -95,15 +96,15 @@ CMakeManager::CMakeManager()
|
||||
rescanProject(ProjectTree::currentBuildSystem());
|
||||
});
|
||||
|
||||
m_buildFileAction = new Utils::ParameterAction(tr("Build File"),
|
||||
tr("Build File \"%1\""),
|
||||
m_buildFileAction = new Utils::ParameterAction(Tr::tr("Build File"),
|
||||
Tr::tr("Build File \"%1\""),
|
||||
Utils::ParameterAction::AlwaysEnabled,
|
||||
this);
|
||||
command = Core::ActionManager::registerAction(m_buildFileAction, Constants::BUILD_FILE);
|
||||
command->setAttribute(Core::Command::CA_Hide);
|
||||
command->setAttribute(Core::Command::CA_UpdateText);
|
||||
command->setDescription(m_buildFileAction->text());
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+B")));
|
||||
command->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+B")));
|
||||
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD);
|
||||
connect(m_buildFileAction, &QAction::triggered, this, [this] { buildFile(); });
|
||||
|
||||
@@ -230,7 +231,7 @@ void CMakeManager::buildFile(Node *node)
|
||||
targetBase = relativeBuildDir / "CMakeFiles" / (targetNode->displayName() + ".dir");
|
||||
} else if (!generator.contains("Makefiles")) {
|
||||
Core::MessageManager::writeFlashing(
|
||||
tr("Build File is not supported for generator \"%1\"").arg(generator));
|
||||
Tr::tr("Build File is not supported for generator \"%1\"").arg(generator));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user