mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01: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:
1
.github/actions/spell-check/expect.txt
vendored
1
.github/actions/spell-check/expect.txt
vendored
@@ -250,6 +250,7 @@ CREATESCHEDULEDTASK
|
|||||||
CREATESTRUCT
|
CREATESTRUCT
|
||||||
CREATEWINDOWFAILED
|
CREATEWINDOWFAILED
|
||||||
CRECT
|
CRECT
|
||||||
|
CRH
|
||||||
critsec
|
critsec
|
||||||
Crossdevice
|
Crossdevice
|
||||||
CRSEL
|
CRSEL
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace PowerAccent.Core
|
|||||||
{
|
{
|
||||||
ALL,
|
ALL,
|
||||||
CA,
|
CA,
|
||||||
|
CRH,
|
||||||
CUR,
|
CUR,
|
||||||
CY,
|
CY,
|
||||||
CZ,
|
CZ,
|
||||||
@@ -54,6 +55,7 @@ namespace PowerAccent.Core
|
|||||||
{
|
{
|
||||||
Language.ALL => GetDefaultLetterKeyALL(letter), // ALL
|
Language.ALL => GetDefaultLetterKeyALL(letter), // ALL
|
||||||
Language.CA => GetDefaultLetterKeyCA(letter), // Catalan
|
Language.CA => GetDefaultLetterKeyCA(letter), // Catalan
|
||||||
|
Language.CRH => GetDefaultLetterKeyCRH(letter), // Crimean Tatar
|
||||||
Language.CUR => GetDefaultLetterKeyCUR(letter), // Currency
|
Language.CUR => GetDefaultLetterKeyCUR(letter), // Currency
|
||||||
Language.CY => GetDefaultLetterKeyCY(letter), // Welsh
|
Language.CY => GetDefaultLetterKeyCY(letter), // Welsh
|
||||||
Language.CZ => GetDefaultLetterKeyCZ(letter), // Czech
|
Language.CZ => GetDefaultLetterKeyCZ(letter), // Czech
|
||||||
@@ -100,6 +102,7 @@ namespace PowerAccent.Core
|
|||||||
if (!_allLanguagesCache.TryGetValue(letter, out string[] cachedValue))
|
if (!_allLanguagesCache.TryGetValue(letter, out string[] cachedValue))
|
||||||
{
|
{
|
||||||
cachedValue = GetDefaultLetterKeyCA(letter)
|
cachedValue = GetDefaultLetterKeyCA(letter)
|
||||||
|
.Union(GetDefaultLetterKeyCRH(letter))
|
||||||
.Union(GetDefaultLetterKeyCUR(letter))
|
.Union(GetDefaultLetterKeyCUR(letter))
|
||||||
.Union(GetDefaultLetterKeyCY(letter))
|
.Union(GetDefaultLetterKeyCY(letter))
|
||||||
.Union(GetDefaultLetterKeyCZ(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)
|
// Currencies (source: https://www.eurochange.co.uk/travel-money/world-currency-abbreviations-symbols-and-codes-travel-money)
|
||||||
private static string[] GetDefaultLetterKeyCUR(LetterKey letter)
|
private static string[] GetDefaultLetterKeyCUR(LetterKey letter)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
<!-- These should be in the same order as the array items in PowerAccentViewModel.cs -->
|
<!-- 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_All" />
|
||||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Catalan" />
|
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Catalan" />
|
||||||
|
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Crimean" />
|
||||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Currency" />
|
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Currency" />
|
||||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Croatian" />
|
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Croatian" />
|
||||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Czech" />
|
<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">
|
<data name="QuickAccent_SelectedLanguage_Catalan.Content" xml:space="preserve">
|
||||||
<value>Catalan</value>
|
<value>Catalan</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="QuickAccent_SelectedLanguage_Crimean.Content" xml:space="preserve">
|
||||||
|
<value>Crimean Tatar</value>
|
||||||
|
</data>
|
||||||
<data name="QuickAccent_SelectedLanguage_Currency.Content" xml:space="preserve">
|
<data name="QuickAccent_SelectedLanguage_Currency.Content" xml:space="preserve">
|
||||||
<value>Currency</value>
|
<value>Currency</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
{
|
{
|
||||||
"ALL",
|
"ALL",
|
||||||
"CA",
|
"CA",
|
||||||
|
"CRH",
|
||||||
"CUR",
|
"CUR",
|
||||||
"HR",
|
"HR",
|
||||||
"CZ",
|
"CZ",
|
||||||
|
|||||||
Reference in New Issue
Block a user