From 31ade5c662d67a5bf2f23d8b23f82c37799da868 Mon Sep 17 00:00:00 2001 From: "Hao Liu (from Dev Box)" Date: Fri, 13 Dec 2024 12:35:58 +0800 Subject: [PATCH] =?UTF-8?q?Add=20=E1=B8=B1=20to=20PowerAccent=20for=20Prot?= =?UTF-8?q?o-Indo-European?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../poweraccent/PowerAccent.Core/Languages.cs | 13 +++++++++++++ .../Settings.UI/Strings/en-us/Resources.resw | 3 +++ .../Settings.UI/ViewModels/PowerAccentViewModel.cs | 1 + 3 files changed, 17 insertions(+) diff --git a/src/modules/poweraccent/PowerAccent.Core/Languages.cs b/src/modules/poweraccent/PowerAccent.Core/Languages.cs index 2838fe958890..4f967f85c3ba 100644 --- a/src/modules/poweraccent/PowerAccent.Core/Languages.cs +++ b/src/modules/poweraccent/PowerAccent.Core/Languages.cs @@ -39,6 +39,7 @@ public enum Language NL, NO, PI, + PIE, PL, PT, RO, @@ -100,6 +101,7 @@ public static string[] GetDefaultLetterKey(LetterKey letter, Language[] langs) Language.NL => GetDefaultLetterKeyNL(letter), // Dutch Language.NO => GetDefaultLetterKeyNO(letter), // Norwegian Language.PI => GetDefaultLetterKeyPI(letter), // Pinyin + Language.PIE => GetDefaultLetterKeyPIE(letter), // Proto-Indo-European Language.PL => GetDefaultLetterKeyPL(letter), // Polish Language.PT => GetDefaultLetterKeyPT(letter), // Portuguese Language.RO => GetDefaultLetterKeyRO(letter), // Romanian @@ -156,6 +158,7 @@ private static string[] GetDefaultLetterKeyALL(LetterKey letter) .Union(GetDefaultLetterKeyNO(letter)) .Union(GetDefaultLetterKeyPI(letter)) .Union(GetDefaultLetterKeyPL(letter)) + .Union(GetDefaultLetterKeyPIE(letter)) .Union(GetDefaultLetterKeyPT(letter)) .Union(GetDefaultLetterKeyRO(letter)) .Union(GetDefaultLetterKeySK(letter)) @@ -463,6 +466,16 @@ private static string[] GetDefaultLetterKeyPI(LetterKey letter) }; } + // Proto-Indo-European + private static string[] GetDefaultLetterKeyPIE(LetterKey letter) + { + return letter switch + { + LetterKey.VK_K => new[] { "ḱ" }, + _ => Array.Empty(), + }; + } + // Turkish private static string[] GetDefaultLetterKeyTK(LetterKey letter) { diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index 7f3b5fdabab7..789a94f004f3 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -3672,6 +3672,9 @@ Activate by holding the key for the character you want to add an accent to, then Pinyin + + Proto Indo European + Polish diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs index 0c4f9db65092..7da5c4ecfbbf 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs @@ -55,6 +55,7 @@ public class PowerAccentViewModel : Observable new PowerAccentLanguageModel("MI", "QuickAccent_SelectedLanguage_Maori", LanguageGroup), new PowerAccentLanguageModel("NO", "QuickAccent_SelectedLanguage_Norwegian", LanguageGroup), new PowerAccentLanguageModel("PI", "QuickAccent_SelectedLanguage_Pinyin", LanguageGroup), + new PowerAccentLanguageModel("PIE", "QuickAccent_SelectedLanguage_Proto_Indo_European", LanguageGroup), new PowerAccentLanguageModel("PL", "QuickAccent_SelectedLanguage_Polish", LanguageGroup), new PowerAccentLanguageModel("PT", "QuickAccent_SelectedLanguage_Portuguese", LanguageGroup), new PowerAccentLanguageModel("RO", "QuickAccent_SelectedLanguage_Romanian", LanguageGroup),