From 3ede1a0b53e8e52167f247536edaf2dc24f95399 Mon Sep 17 00:00:00 2001
From: Arjun Balgovind <32061677+arjunbalgovind@users.noreply.github.com>
Date: Mon, 24 Aug 2020 17:51:48 -0700
Subject: [PATCH] [Localization] Migrate resources to resx for PowerRename
(#6112)
* Added localization code to pipeline and created one LocProject json for Settings
* Fixed typo
* Reordered nuget source
* Moved nuget install to restore step
* Added FZ.rc file to LocProj
* Added FZ resx file and modified rc file
* Fixed file names
* Changed to check folder for LocProject files
* Updated folder
* Changed directory
* Changed to src directory
* Changed language set and name format, removed rc file localization
* Added all projects with resx/resw files
* Added newline to end of file
* Removed nuget source as it is not used
* Updated comments
* Updated keyboard manager to use resx file
* Tweaked resources.resx and added it to project files
* Added comments and added in string table to resx script
* Remove change from bad merge
* Fix syntax error in convert stringtable
* Changed file type to None
* Migrated color picker's resources
* Migrated resources for Microsoft.Launcher
* Migrated resources for fancy zones
* Revert fancyzones changes
* Migrated resources for ImageResizer and modified script to add language specific code
* Added try catch and checks for modification to avoid unnecessary file creation
* Changed tab insertion to 4 spaces to avoid mixed file types in rc file
* Migrated resources for power preview project
* Added LocProject.json file for 5 projects
* added resgen exception check
* Moved non-localizable strings out of resx for powerpreview
* Move out hardcoded strings from dialog box and set them at runtime from string table
* Migrated resources for powerrename
* Added locproj
* Added missing ImageBase extern declaration
* Added build script in UWP UI project since PowerRenameExt is not referenced
* Resolved merge conflicts
---
.../powerrename/UWPui/PowerRenameUWPUI.rc | 4 +-
.../UWPui/PowerRenameUWPUI.vcxproj | 3 +
src/modules/powerrename/dll/LocProject.json | 14 ++
.../powerrename/dll/PowerRenameExt.base.rc | 63 ++++++
.../powerrename/dll/PowerRenameExt.cpp | 2 +-
src/modules/powerrename/dll/PowerRenameExt.rc | 113 ----------
.../powerrename/dll/PowerRenameExt.vcxproj | 12 +-
.../dll/PowerRenameExt.vcxproj.filters | 30 ++-
src/modules/powerrename/dll/Resources.resx | 144 +++++++++++++
src/modules/powerrename/dll/dllmain.cpp | 2 +-
src/modules/powerrename/dll/resource.base.h | 15 ++
src/modules/powerrename/dll/resource.h | 36 ----
src/modules/powerrename/ui/LocProject.json | 14 ++
.../powerrename/ui/PowerRenameUI.base.rc | 84 ++++++++
src/modules/powerrename/ui/PowerRenameUI.cpp | 46 +++-
src/modules/powerrename/ui/PowerRenameUI.h | 1 +
src/modules/powerrename/ui/PowerRenameUI.rc | 155 --------------
.../powerrename/ui/PowerRenameUI.vcxproj | 12 +-
.../ui/PowerRenameUI.vcxproj.filters | 57 +++--
src/modules/powerrename/ui/Resources.resx | 202 ++++++++++++++++++
src/modules/powerrename/ui/resource.base.h | 33 +++
src/modules/powerrename/ui/resource.h | 51 -----
tools/build/convert-resx-to-rc.ps1 | 12 +-
23 files changed, 712 insertions(+), 393 deletions(-)
create mode 100644 src/modules/powerrename/dll/LocProject.json
create mode 100644 src/modules/powerrename/dll/PowerRenameExt.base.rc
delete mode 100644 src/modules/powerrename/dll/PowerRenameExt.rc
create mode 100644 src/modules/powerrename/dll/Resources.resx
create mode 100644 src/modules/powerrename/dll/resource.base.h
delete mode 100644 src/modules/powerrename/dll/resource.h
create mode 100644 src/modules/powerrename/ui/LocProject.json
create mode 100644 src/modules/powerrename/ui/PowerRenameUI.base.rc
delete mode 100644 src/modules/powerrename/ui/PowerRenameUI.rc
create mode 100644 src/modules/powerrename/ui/Resources.resx
create mode 100644 src/modules/powerrename/ui/resource.base.h
delete mode 100644 src/modules/powerrename/ui/resource.h
diff --git a/src/modules/powerrename/UWPui/PowerRenameUWPUI.rc b/src/modules/powerrename/UWPui/PowerRenameUWPUI.rc
index 58c53031ad..46b3bf1232 100644
--- a/src/modules/powerrename/UWPui/PowerRenameUWPUI.rc
+++ b/src/modules/powerrename/UWPui/PowerRenameUWPUI.rc
@@ -3,9 +3,9 @@
#include "../../../common/version.h"
// We need both DLL and UI resource files for UWP UI.
-#include "../dll/PowerRenameExt.rc"
+#include "../dll/Generated Files/PowerRenameExt.rc"
#undef IDC_STATIC
-#include "../ui/PowerRenameUI.rc"
+#include "../ui/Generated Files/PowerRenameUI.rc"
2 VERSIONINFO
FILEVERSION FILE_VERSION
diff --git a/src/modules/powerrename/UWPui/PowerRenameUWPUI.vcxproj b/src/modules/powerrename/UWPui/PowerRenameUWPUI.vcxproj
index 9d763c9604..879ef77530 100644
--- a/src/modules/powerrename/UWPui/PowerRenameUWPUI.vcxproj
+++ b/src/modules/powerrename/UWPui/PowerRenameUWPUI.vcxproj
@@ -11,6 +11,9 @@
x64
+
+
+
16.0
{0485F45C-EA7A-4BB5-804B-3E8D14699387}
diff --git a/src/modules/powerrename/dll/LocProject.json b/src/modules/powerrename/dll/LocProject.json
new file mode 100644
index 0000000000..2109393849
--- /dev/null
+++ b/src/modules/powerrename/dll/LocProject.json
@@ -0,0 +1,14 @@
+{
+ "Projects": [
+ {
+ "LanguageSet": "Azure_Languages",
+ "LocItems": [
+ {
+ "SourceFile": "src\\modules\\powerrename\\dll\\Resources.resx",
+ "CopyOption": "LangIDOnName",
+ "OutputPath": "src\\modules\\powerrename\\dll"
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/modules/powerrename/dll/PowerRenameExt.base.rc b/src/modules/powerrename/dll/PowerRenameExt.base.rc
new file mode 100644
index 0000000000..9d9a78e5de
--- /dev/null
+++ b/src/modules/powerrename/dll/PowerRenameExt.base.rc
@@ -0,0 +1,63 @@
+ÿþ# i n c l u d e <