feat(settings-ui): crash fix - add back the missing default language option to resources (#45766)

Add back the default language option to the resources for better
localization support. This change is fixing a regression:
 Two bugs here:
1. The original commit by Stefan had a case mismatch (Default_language
vs Default_Language) — latent bug
2. Niels's PR used Copilot CLI to find dead strings, which incorrectly
removed a live resource due to the case
  mismatch

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Gordon Lam
2026-02-24 18:12:32 +08:00
committed by GitHub
parent 91634922fc
commit 6fe4361a20
2 changed files with 4 additions and 1 deletions

View File

@@ -4772,6 +4772,9 @@ The break timer font matches the text font.</value>
<data name="LanguageRestartInfoButton.Content" xml:space="preserve"> <data name="LanguageRestartInfoButton.Content" xml:space="preserve">
<value>Restart</value> <value>Restart</value>
</data> </data>
<data name="Default_Language" xml:space="preserve">
<value>Windows default</value>
</data>
<data name="Arabic_Saudi_Arabia_Language" xml:space="preserve"> <data name="Arabic_Saudi_Arabia_Language" xml:space="preserve">
<value>Arabic (Saudi Arabia)</value> <value>Arabic (Saudi Arabia)</value>
</data> </data>

View File

@@ -226,7 +226,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
// Supported languages. Taken from Resources.wxs + default + en-US // Supported languages. Taken from Resources.wxs + default + en-US
private Dictionary<string, string> langTagsAndIds = new Dictionary<string, string> private Dictionary<string, string> langTagsAndIds = new Dictionary<string, string>
{ {
{ string.Empty, "Default_language" }, { string.Empty, "Default_Language" },
{ "ar-SA", "Arabic_Saudi_Arabia_Language" }, { "ar-SA", "Arabic_Saudi_Arabia_Language" },
{ "cs-CZ", "Czech_Language" }, { "cs-CZ", "Czech_Language" },
{ "de-DE", "German_Language" }, { "de-DE", "German_Language" },