From 5f4514a88ea38550164a3672fdcf576160e840ce Mon Sep 17 00:00:00 2001 From: Taras <109293326+taras-janea@users.noreply.github.com> Date: Fri, 25 Nov 2022 19:38:29 +0200 Subject: [PATCH] [QuickAccent] Add accents for Kurdish language (#22297) --- .../poweraccent/PowerAccent.Core/Languages.cs | 30 +++++++++++++++++++ .../Settings.UI/Strings/en-us/Resources.resw | 3 ++ .../ViewModels/PowerAccentViewModel.cs | 1 + .../Settings.UI/Views/PowerAccentPage.xaml | 1 + 4 files changed, 35 insertions(+) diff --git a/src/modules/poweraccent/PowerAccent.Core/Languages.cs b/src/modules/poweraccent/PowerAccent.Core/Languages.cs index f6a58855ea..9f9716b6ba 100644 --- a/src/modules/poweraccent/PowerAccent.Core/Languages.cs +++ b/src/modules/poweraccent/PowerAccent.Core/Languages.cs @@ -20,6 +20,7 @@ namespace PowerAccent.Core HU, IS, IT, + KU, MI, NL, PI, @@ -49,6 +50,7 @@ namespace PowerAccent.Core case Language.HU: return GetDefaultLetterKeyHU(letter); // Hungarian case Language.IS: return GetDefaultLetterKeyIS(letter); // Iceland case Language.IT: return GetDefaultLetterKeyIT(letter); // Italian + case Language.KU: return GetDefaultLetterKeyKU(letter); // Kurdish case Language.MI: return GetDefaultLetterKeyMI(letter); // Maori case Language.NL: return GetDefaultLetterKeyNL(letter); // Dutch case Language.PI: return GetDefaultLetterKeyPI(letter); // Pinyin @@ -640,6 +642,34 @@ namespace PowerAccent.Core return Array.Empty(); } + // Kurdish + private static string[] GetDefaultLetterKeyKU(LetterKey letter) + { + switch (letter) + { + case LetterKey.VK_C: + return new string[] { "ç" }; + case LetterKey.VK_E: + return new string[] { "ê", "€" }; + case LetterKey.VK_I: + return new string[] { "î" }; + case LetterKey.VK_O: + return new string[] { "ö", "ô" }; + case LetterKey.VK_L: + return new string[] { "ł" }; + case LetterKey.VK_N: + return new string[] { "ň" }; + case LetterKey.VK_R: + return new string[] { "ř" }; + case LetterKey.VK_S: + return new string[] { "ş" }; + case LetterKey.VK_U: + return new string[] { "û", "ü" }; + } + + return Array.Empty(); + } + // Welsh private static string[] GetDefaultLetterKeyCY(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 797a6539c3..157efac41a 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -2606,6 +2606,9 @@ Activate by holding the key for the character you want to add an accent to, then Italian + + Kurdish + Welsh diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs index 183df7694d..bd88279e0f 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs @@ -34,6 +34,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels "HU", "IS", "IT", + "KU", "MI", "PI", "PL", diff --git a/src/settings-ui/Settings.UI/Views/PowerAccentPage.xaml b/src/settings-ui/Settings.UI/Views/PowerAccentPage.xaml index 4502fa0aa4..7f9aecbb27 100644 --- a/src/settings-ui/Settings.UI/Views/PowerAccentPage.xaml +++ b/src/settings-ui/Settings.UI/Views/PowerAccentPage.xaml @@ -71,6 +71,7 @@ +