From 05e1f7bdfd6488cc900a822fa881481cdef04f91 Mon Sep 17 00:00:00 2001
From: Zach Teutsch <88554871+zateutsch@users.noreply.github.com>
Date: Fri, 14 Nov 2025 00:37:53 -0500
Subject: [PATCH] Fixed localization bug (thanks Dustin), validated all working
with Text page resource keys
---
.../KeyboardManagerEditorUI/App.xaml.cs | 1 +
.../Helpers/ResourceLoaderInstance.cs | 4 +--
.../KeyboardManagerEditorUI.csproj | 2 ++
.../KeyboardManagerEditorUI/Pages/Text.xaml | 31 +++++++++----------
.../Strings/en-US/Resources.resw | 24 +++++++-------
.../ViewModels/KeyboardManagerViewModel.cs | 8 +++--
6 files changed, 38 insertions(+), 32 deletions(-)
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorUI/App.xaml.cs b/src/modules/keyboardmanager/KeyboardManagerEditorUI/App.xaml.cs
index 26641ab444..f35c092534 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditorUI/App.xaml.cs
+++ b/src/modules/keyboardmanager/KeyboardManagerEditorUI/App.xaml.cs
@@ -39,6 +39,7 @@ namespace KeyboardManagerEditorUI
///
public App()
{
+ global::System.Diagnostics.Debugger.Break();
this.InitializeComponent();
Task.Run(() =>
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Helpers/ResourceLoaderInstance.cs b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Helpers/ResourceLoaderInstance.cs
index aed419ef01..f841c3081c 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Helpers/ResourceLoaderInstance.cs
+++ b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Helpers/ResourceLoaderInstance.cs
@@ -11,9 +11,9 @@ namespace KeyboardManagerEditorUI.Helpers
static ResourceLoaderInstance()
{
- ResourceLoader = new ResourceLoader("resources.pri");
+ ResourceLoader = new ResourceLoader("PowerToys.KeyboardManagerEditorUI.pri");
}
- internal static string GetString(string resourceId) => ResourceLoader.GetString(resourceId);
+ internal static string GetString(string resourceId) => Microsoft.Windows.ApplicationModel.Resources.ResourceLoader.GetDefaultResourceFilePath(); // ResourceLoader.GetString(resourceId);
}
}
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorUI/KeyboardManagerEditorUI.csproj b/src/modules/keyboardmanager/KeyboardManagerEditorUI/KeyboardManagerEditorUI.csproj
index 3b7f60041c..751c9d6294 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditorUI/KeyboardManagerEditorUI.csproj
+++ b/src/modules/keyboardmanager/KeyboardManagerEditorUI/KeyboardManagerEditorUI.csproj
@@ -16,6 +16,8 @@
false
PowerToys.KeyboardManagerEditorUI
..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\$(MSBuildProjectName)
+
+ PowerToys.KeyboardManagerEditorUI.pri
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Pages/Text.xaml b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Pages/Text.xaml
index 2e6fb00cdb..fcbe3f74fc 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Pages/Text.xaml
+++ b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Pages/Text.xaml
@@ -14,8 +14,8 @@
-
+
+ Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
+ Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
-
+ Foreground="{ThemeResource TextFillColorSecondaryBrush}" />