mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-24 04:05:59 +08:00
[QuickAccent]Add Crimean Tatar character set (#32862)
* Update Languages.cs Add Crimean Tatar Language * Update PowerAccentPage.xaml Add Crimean Tatar language * Update PowerAccentViewModel.cs Add Crimean Tatar language * Update Resources.resw Add Crimean Tatar language * Update Languages.cs Add Crimean Tatar language * Update expect.txt Add "CHR" to spellcheker false positives (ISO code for Crimean Tatar language) * Update expect.txt Add "CRH" to spellcheker false positives (ISO code for Crimean Tatar language) * Update Languages.cs * Update src/modules/poweraccent/PowerAccent.Core/Languages.cs Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> --------- Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
This commit is contained in:
parent
949df59c9e
commit
a54dc0e52a
1
.github/actions/spell-check/expect.txt
vendored
1
.github/actions/spell-check/expect.txt
vendored
@ -250,6 +250,7 @@ CREATESCHEDULEDTASK
|
||||
CREATESTRUCT
|
||||
CREATEWINDOWFAILED
|
||||
CRECT
|
||||
CRH
|
||||
critsec
|
||||
Crossdevice
|
||||
CRSEL
|
||||
|
@ -11,6 +11,7 @@ namespace PowerAccent.Core
|
||||
{
|
||||
ALL,
|
||||
CA,
|
||||
CRH,
|
||||
CUR,
|
||||
CY,
|
||||
CZ,
|
||||
@ -54,6 +55,7 @@ namespace PowerAccent.Core
|
||||
{
|
||||
Language.ALL => GetDefaultLetterKeyALL(letter), // ALL
|
||||
Language.CA => GetDefaultLetterKeyCA(letter), // Catalan
|
||||
Language.CRH => GetDefaultLetterKeyCRH(letter), // Crimean Tatar
|
||||
Language.CUR => GetDefaultLetterKeyCUR(letter), // Currency
|
||||
Language.CY => GetDefaultLetterKeyCY(letter), // Welsh
|
||||
Language.CZ => GetDefaultLetterKeyCZ(letter), // Czech
|
||||
@ -100,6 +102,7 @@ namespace PowerAccent.Core
|
||||
if (!_allLanguagesCache.TryGetValue(letter, out string[] cachedValue))
|
||||
{
|
||||
cachedValue = GetDefaultLetterKeyCA(letter)
|
||||
.Union(GetDefaultLetterKeyCRH(letter))
|
||||
.Union(GetDefaultLetterKeyCUR(letter))
|
||||
.Union(GetDefaultLetterKeyCY(letter))
|
||||
.Union(GetDefaultLetterKeyCZ(letter))
|
||||
@ -192,6 +195,26 @@ namespace PowerAccent.Core
|
||||
};
|
||||
}
|
||||
|
||||
// Crimean Tatar
|
||||
private static string[] GetDefaultLetterKeyCRH(LetterKey letter)
|
||||
{
|
||||
return letter switch
|
||||
{
|
||||
LetterKey.VK_A => new[] { "â" },
|
||||
LetterKey.VK_C => new[] { "ç" },
|
||||
LetterKey.VK_E => new[] { "€" },
|
||||
LetterKey.VK_G => new[] { "ğ" },
|
||||
LetterKey.VK_H => new[] { "₴" },
|
||||
LetterKey.VK_I => new[] { "ı", "İ" },
|
||||
LetterKey.VK_N => new[] { "ñ" },
|
||||
LetterKey.VK_O => new[] { "ö" },
|
||||
LetterKey.VK_S => new[] { "ş" },
|
||||
LetterKey.VK_T => new[] { "₺" },
|
||||
LetterKey.VK_U => new[] { "ü" },
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
}
|
||||
|
||||
// Currencies (source: https://www.eurochange.co.uk/travel-money/world-currency-abbreviations-symbols-and-codes-travel-money)
|
||||
private static string[] GetDefaultLetterKeyCUR(LetterKey letter)
|
||||
{
|
||||
|
@ -54,6 +54,7 @@
|
||||
<!-- These should be in the same order as the array items in PowerAccentViewModel.cs -->
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_All" />
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Catalan" />
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Crimean" />
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Currency" />
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Croatian" />
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Czech" />
|
||||
|
@ -3447,6 +3447,9 @@ Activate by holding the key for the character you want to add an accent to, then
|
||||
<data name="QuickAccent_SelectedLanguage_Catalan.Content" xml:space="preserve">
|
||||
<value>Catalan</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage_Crimean.Content" xml:space="preserve">
|
||||
<value>Crimean Tatar</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage_Currency.Content" xml:space="preserve">
|
||||
<value>Currency</value>
|
||||
</data>
|
||||
|
@ -25,6 +25,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
"ALL",
|
||||
"CA",
|
||||
"CRH",
|
||||
"CUR",
|
||||
"HR",
|
||||
"CZ",
|
||||
|
Loading…
Reference in New Issue
Block a user