forked from qt-creator/qt-creator
GenericProjectManager: Tr::tr
Change-Id: I7ed1fac9dd6b4517cbc90a8c03a1c67d1e5404ae Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
|
||||
#include "filesselectionwizardpage.h"
|
||||
|
||||
#include "genericprojectwizard.h"
|
||||
#include "genericprojectconstants.h"
|
||||
#include "genericprojectmanagertr.h"
|
||||
#include "genericprojectwizard.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
@@ -32,7 +33,7 @@ FilesSelectionWizardPage::FilesSelectionWizardPage(GenericProjectWizardDialog *g
|
||||
connect(m_filesWidget, &ProjectExplorer::SelectableFilesWidget::selectedFilesChanged,
|
||||
this, &FilesSelectionWizardPage::completeChanged);
|
||||
|
||||
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Files"));
|
||||
setProperty(Utils::SHORT_TITLE_PROPERTY, Tr::tr("Files"));
|
||||
}
|
||||
|
||||
void FilesSelectionWizardPage::initializePage()
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
#include "genericmakestep.h"
|
||||
#include "genericproject.h"
|
||||
#include "genericprojectconstants.h"
|
||||
#include "genericprojectmanagertr.h"
|
||||
|
||||
#include <projectexplorer/buildinfo.h>
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectexplorertr.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
@@ -29,7 +31,7 @@ namespace Internal {
|
||||
GenericBuildConfiguration::GenericBuildConfiguration(Target *parent, Utils::Id id)
|
||||
: BuildConfiguration(parent, id)
|
||||
{
|
||||
setConfigWidgetDisplayName(tr("Generic Manager"));
|
||||
setConfigWidgetDisplayName(GenericProjectManager::Tr::tr("Generic Manager"));
|
||||
setBuildDirectoryHistoryCompleter("Generic.BuildDir.History");
|
||||
|
||||
setInitializer([this](const BuildInfo &) {
|
||||
@@ -54,12 +56,12 @@ GenericBuildConfigurationFactory::GenericBuildConfigurationFactory()
|
||||
|
||||
setBuildGenerator([](const Kit *, const FilePath &projectPath, bool forSetup) {
|
||||
BuildInfo info;
|
||||
info.typeName = BuildConfiguration::tr("Build");
|
||||
info.typeName = ProjectExplorer::Tr::tr("Build");
|
||||
info.buildDirectory = forSetup ? Project::projectDirectory(projectPath) : projectPath;
|
||||
|
||||
if (forSetup) {
|
||||
//: The name of the build configuration created by default for a generic project.
|
||||
info.displayName = BuildConfiguration::tr("Default");
|
||||
info.displayName = ProjectExplorer::Tr::tr("Default");
|
||||
}
|
||||
|
||||
return QList<BuildInfo>{info};
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "genericbuildconfiguration.h"
|
||||
#include "genericmakestep.h"
|
||||
#include "genericprojectconstants.h"
|
||||
#include "genericprojectmanagertr.h"
|
||||
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
@@ -613,7 +614,7 @@ void GenericBuildSystem::removeFiles(const FilePaths &filesToRemove)
|
||||
{
|
||||
if (removeFiles(nullptr, filesToRemove, nullptr) == RemovedFilesFromProject::Error) {
|
||||
TaskHub::addTask(BuildSystemTask(Task::Error,
|
||||
GenericProject::tr("Project files list update failed."),
|
||||
Tr::tr("Project files list update failed."),
|
||||
filesFilePath()));
|
||||
}
|
||||
}
|
||||
@@ -660,7 +661,7 @@ void GenericProject::configureAsExampleProject(ProjectExplorer::Kit *kit)
|
||||
if (auto factory = BuildConfigurationFactory::find(k, projectFilePath())) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
BuildInfo buildInfo;
|
||||
buildInfo.displayName = tr("Build %1").arg(i + 1);
|
||||
buildInfo.displayName = Tr::tr("Build %1").arg(i + 1);
|
||||
buildInfo.factory = factory;
|
||||
buildInfo.kitId = kit->id();
|
||||
buildInfo.buildDirectory = projectFilePath();
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
#include "genericprojectplugin.h"
|
||||
|
||||
#include "genericbuildconfiguration.h"
|
||||
#include "genericprojectwizard.h"
|
||||
#include "genericprojectconstants.h"
|
||||
#include "genericprojectfileseditor.h"
|
||||
#include "genericmakestep.h"
|
||||
#include "genericproject.h"
|
||||
#include "genericprojectconstants.h"
|
||||
#include "genericprojectfileseditor.h"
|
||||
#include "genericprojectmanagertr.h"
|
||||
#include "genericprojectwizard.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
@@ -45,7 +46,7 @@ public:
|
||||
GenericMakeStepFactory makeStepFactory;
|
||||
GenericBuildConfigurationFactory buildConfigFactory;
|
||||
|
||||
QAction editFilesAction{GenericProjectPlugin::tr("Edit Files..."), nullptr};
|
||||
QAction editFilesAction{Tr::tr("Edit Files..."), nullptr};
|
||||
};
|
||||
|
||||
GenericProjectPlugin::~GenericProjectPlugin()
|
||||
@@ -77,7 +78,7 @@ GenericProjectPluginPrivate::GenericProjectPluginPrivate()
|
||||
genericProject->editFilesTriggered();
|
||||
});
|
||||
|
||||
const auto removeDirAction = new QAction(GenericProjectPlugin::tr("Remove Directory"), this);
|
||||
const auto removeDirAction = new QAction(Tr::tr("Remove Directory"), this);
|
||||
Command * const cmd = ActionManager::registerAction(removeDirAction, "GenericProject.RemoveDir",
|
||||
Context(PEC::C_PROJECT_TREE));
|
||||
ActionManager::actionContainer(PEC::M_FOLDERCONTEXT)->addAction(cmd, PEC::G_FOLDER_OTHER);
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "genericprojectwizard.h"
|
||||
#include "genericprojectconstants.h"
|
||||
|
||||
#include "filesselectionwizardpage.h"
|
||||
#include "genericprojectconstants.h"
|
||||
#include "genericprojectmanagertr.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
@@ -43,18 +45,18 @@ GenericProjectWizardDialog::GenericProjectWizardDialog(const Core::BaseFileWizar
|
||||
QWidget *parent) :
|
||||
Core::BaseFileWizard(factory, QVariantMap(), parent)
|
||||
{
|
||||
setWindowTitle(tr("Import Existing Project"));
|
||||
setWindowTitle(Tr::tr("Import Existing Project"));
|
||||
|
||||
// first page
|
||||
m_firstPage = new Utils::FileWizardPage;
|
||||
m_firstPage->setTitle(tr("Project Name and Location"));
|
||||
m_firstPage->setFileNameLabel(tr("Project name:"));
|
||||
m_firstPage->setPathLabel(tr("Location:"));
|
||||
m_firstPage->setTitle(Tr::tr("Project Name and Location"));
|
||||
m_firstPage->setFileNameLabel(Tr::tr("Project name:"));
|
||||
m_firstPage->setPathLabel(Tr::tr("Location:"));
|
||||
addPage(m_firstPage);
|
||||
|
||||
// second page
|
||||
m_secondPage = new FilesSelectionWizardPage(this);
|
||||
m_secondPage->setTitle(tr("File Selection"));
|
||||
m_secondPage->setTitle(Tr::tr("File Selection"));
|
||||
addPage(m_secondPage);
|
||||
}
|
||||
|
||||
@@ -93,10 +95,10 @@ GenericProjectWizard::GenericProjectWizard()
|
||||
{
|
||||
setSupportedProjectTypes({Constants::GENERICPROJECT_ID});
|
||||
setIcon(ProjectExplorer::Icons::WIZARD_IMPORT_AS_PROJECT.icon());
|
||||
setDisplayName(tr("Import Existing Project"));
|
||||
setDisplayName(Tr::tr("Import Existing Project"));
|
||||
setId("Z.Makefile");
|
||||
setDescription(tr("Imports existing projects that do not use qmake, CMake, Qbs, Meson, or Autotools. "
|
||||
"This allows you to use %1 as a code editor.")
|
||||
setDescription(Tr::tr("Imports existing projects that do not use qmake, CMake, Qbs, Meson, or Autotools. "
|
||||
"This allows you to use %1 as a code editor.")
|
||||
.arg(Core::Constants::IDE_DISPLAY_NAME));
|
||||
setCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY));
|
||||
setDisplayCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY_DISPLAY));
|
||||
|
||||
Reference in New Issue
Block a user