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:
hjk
2022-09-29 15:26:31 +02:00
parent 9f25c2dedf
commit ab4c9b9679
65 changed files with 509 additions and 2228 deletions

View File

@@ -1,9 +1,11 @@
// Copyright (C) 2018 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 "cmakeprojectconstants.h"
#include "cmakespecificsettings.h"
#include "cmakeprojectconstants.h"
#include "cmakeprojectmanagertr.h"
#include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -11,8 +13,7 @@
using namespace Utils;
namespace CMakeProjectManager {
namespace Internal {
namespace CMakeProjectManager::Internal {
CMakeSpecificSettings::CMakeSpecificSettings()
{
@@ -25,10 +26,10 @@ CMakeSpecificSettings::CMakeSpecificSettings()
registerAspect(&afterAddFileSetting);
afterAddFileSetting.setSettingsKey("ProjectPopupSetting");
afterAddFileSetting.setDefaultValue(AfterAddFileAction::AskUser);
afterAddFileSetting.addOption(tr("Ask about copying file paths"));
afterAddFileSetting.addOption(tr("Do not copy file paths"));
afterAddFileSetting.addOption(tr("Copy file paths"));
afterAddFileSetting.setToolTip(tr("Determines whether file paths are copied "
afterAddFileSetting.addOption(::CMakeProjectManager::Tr::tr("Ask about copying file paths"));
afterAddFileSetting.addOption(::CMakeProjectManager::Tr::tr("Do not copy file paths"));
afterAddFileSetting.addOption(::CMakeProjectManager::Tr::tr("Copy file paths"));
afterAddFileSetting.setToolTip(::CMakeProjectManager::Tr::tr("Determines whether file paths are copied "
"to the clipboard for pasting to the CMakeLists.txt file when you "
"add new files to CMake projects."));
@@ -41,21 +42,22 @@ CMakeSpecificSettings::CMakeSpecificSettings()
registerAspect(&packageManagerAutoSetup);
packageManagerAutoSetup.setSettingsKey("PackageManagerAutoSetup");
packageManagerAutoSetup.setDefaultValue(false);
packageManagerAutoSetup.setLabelText(tr("Package manager auto setup"));
packageManagerAutoSetup.setToolTip(tr("Add the CMAKE_PROJECT_INCLUDE_BEFORE variable "
packageManagerAutoSetup.setLabelText(::CMakeProjectManager::Tr::tr("Package manager auto setup"));
packageManagerAutoSetup.setToolTip(::CMakeProjectManager::Tr::tr("Add the CMAKE_PROJECT_INCLUDE_BEFORE variable "
"pointing to a CMake script that will install dependencies from the conanfile.txt, "
"conanfile.py, or vcpkg.json file from the project source directory."));
registerAspect(&askBeforeReConfigureInitialParams);
askBeforeReConfigureInitialParams.setSettingsKey("AskReConfigureInitialParams");
askBeforeReConfigureInitialParams.setDefaultValue(true);
askBeforeReConfigureInitialParams.setLabelText(tr("Ask before re-configuring with "
askBeforeReConfigureInitialParams.setLabelText(::CMakeProjectManager::Tr::tr("Ask before re-configuring with "
"initial parameters"));
registerAspect(&showSourceSubFolders);
showSourceSubFolders.setSettingsKey("ShowSourceSubFolders");
showSourceSubFolders.setDefaultValue(true);
showSourceSubFolders.setLabelText(tr("Show subfolders inside source group folders"));
showSourceSubFolders.setLabelText(
::CMakeProjectManager::Tr::tr("Show subfolders inside source group folders"));
}
// CMakeSpecificSettingsPage
@@ -63,7 +65,7 @@ CMakeSpecificSettings::CMakeSpecificSettings()
CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *settings)
{
setId(Constants::Settings::GENERAL_ID);
setDisplayName(tr("General"));
setDisplayName(::CMakeProjectManager::Tr::tr("General"));
setDisplayCategory("CMake");
setCategory(Constants::Settings::CATEGORY);
setCategoryIconPath(Constants::Icons::SETTINGS_CATEGORY);
@@ -74,7 +76,7 @@ CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *sett
using namespace Layouting;
Column {
Group {
title(::CMakeProjectManager::Internal::CMakeSpecificSettings::tr("Adding Files")),
title(::CMakeProjectManager::Tr::tr("Adding Files")),
Column { s.afterAddFileSetting }
},
s.packageManagerAutoSetup,
@@ -85,5 +87,4 @@ CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *sett
});
}
} // Internal
} // CMakeProjectManager
} // CMakeProjectManager::Internal