mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
localizable default project prefix
This commit is contained in:
@@ -1,16 +1,15 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <projects-common/Data.h>
|
#include <projects-common/Data.h>
|
||||||
|
|
||||||
|
#include <common/utils/resources.h>
|
||||||
|
#include "Generated Files/resource.h"
|
||||||
|
|
||||||
namespace ProjectNameUtils
|
namespace ProjectNameUtils
|
||||||
{
|
{
|
||||||
inline std::wstring CreateProjectName(const std::vector<Project>& projects)
|
inline std::wstring CreateProjectName(const std::vector<Project>& projects)
|
||||||
{
|
{
|
||||||
// new project name
|
std::wstring defaultNamePrefix = GET_RESOURCE_STRING(IDS_DEFAULTPROJECTNAMEPREFIX);
|
||||||
std::wstring defaultNamePrefix = L"Project"; // TODO: localizable
|
|
||||||
int nextProjectIndex = 0;
|
int nextProjectIndex = 0;
|
||||||
for (const auto& proj : projects)
|
for (const auto& proj : projects)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
<!-- Project configurations -->
|
<!-- Project configurations -->
|
||||||
<!-- Props that should be disabled while building on CI server -->
|
<!-- Props that should be disabled while building on CI server -->
|
||||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
|
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||||
|
<Target Name="GenerateResourceFiles" BeforeTargets="PrepareForBuild">
|
||||||
|
<Exec Command="powershell -NonInteractive -executionpolicy Unrestricted $(SolutionDir)tools\build\convert-resx-to-rc.ps1 $(MSBuildThisFileDirectory) resource.base.h resource.h ProjectsSnapshotToolResources.base.rc ProjectsSnapshotToolResources.rc" />
|
||||||
|
</Target>
|
||||||
<!-- C++ source compile-specific things for all configurations -->
|
<!-- C++ source compile-specific things for all configurations -->
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -133,7 +136,7 @@
|
|||||||
<ClInclude Include="JsonUtils.h" />
|
<ClInclude Include="JsonUtils.h" />
|
||||||
<ClInclude Include="NameUtils.h" />
|
<ClInclude Include="NameUtils.h" />
|
||||||
<ClInclude Include="pch.h" />
|
<ClInclude Include="pch.h" />
|
||||||
<ClInclude Include="resource.h" />
|
<ClInclude Include="resource.base.h" />
|
||||||
<ClInclude Include="SnapshotUtils.h" />
|
<ClInclude Include="SnapshotUtils.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -151,7 +154,11 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="ProjectsSnapshotTool.rc" />
|
<ResourceCompile Include="Generated Files/ProjectsSnapshotToolResources.rc" />
|
||||||
|
<None Include="ProjectsSnapshotToolResources.base.rc" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resource.resx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<Import Project="..\..\..\..\deps\spdlog.props" />
|
<Import Project="..\..\..\..\deps\spdlog.props" />
|
||||||
|
|||||||
@@ -18,9 +18,6 @@
|
|||||||
<ClInclude Include="pch.h">
|
<ClInclude Include="pch.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="resource.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="NameUtils.h">
|
<ClInclude Include="NameUtils.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -30,6 +27,9 @@
|
|||||||
<ClInclude Include="SnapshotUtils.h">
|
<ClInclude Include="SnapshotUtils.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="resource.base.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="pch.cpp">
|
<ClCompile Include="pch.cpp">
|
||||||
@@ -44,9 +44,17 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
<None Include="ProjectsSnapshotToolResources.base.rc">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="ProjectsSnapshotTool.rc">
|
<EmbeddedResource Include="Resource.resx">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="Generated Files/ProjectsSnapshotToolResources.rc">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="DefaultProjectName" xml:space="preserve">
|
<data name="DefaultProjectNamePrefix" xml:space="preserve">
|
||||||
<value>Project</value>
|
<value>Project</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user