mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-24 04:05:59 +08:00
[QuickAccent]Add Bulgarian (#33550)
## Summary of the Pull Request Adds Bulgarian to Quick Accent ## Detailed Description of the Pull Request / Additional comments Adds Cyrillic letter short I (й)
This commit is contained in:
parent
b7c8bb201b
commit
f1ca65ca78
@ -10,6 +10,7 @@ namespace PowerAccent.Core
|
||||
public enum Language
|
||||
{
|
||||
ALL,
|
||||
BG,
|
||||
CA,
|
||||
CRH,
|
||||
CUR,
|
||||
@ -54,7 +55,8 @@ namespace PowerAccent.Core
|
||||
{
|
||||
return lang switch
|
||||
{
|
||||
Language.ALL => GetDefaultLetterKeyALL(letter), // ALL
|
||||
Language.ALL => GetDefaultLetterKeyALL(letter), // All
|
||||
Language.BG => GetDefaultLetterKeyBG(letter), // Bulgarian
|
||||
Language.CA => GetDefaultLetterKeyCA(letter), // Catalan
|
||||
Language.CRH => GetDefaultLetterKeyCRH(letter), // Crimean Tatar
|
||||
Language.CUR => GetDefaultLetterKeyCUR(letter), // Currency
|
||||
@ -103,7 +105,8 @@ namespace PowerAccent.Core
|
||||
{
|
||||
if (!_allLanguagesCache.TryGetValue(letter, out string[] cachedValue))
|
||||
{
|
||||
cachedValue = GetDefaultLetterKeyCA(letter)
|
||||
cachedValue = GetDefaultLetterKeyBG(letter)
|
||||
.Union(GetDefaultLetterKeyCA(letter))
|
||||
.Union(GetDefaultLetterKeyCRH(letter))
|
||||
.Union(GetDefaultLetterKeyCUR(letter))
|
||||
.Union(GetDefaultLetterKeyCY(letter))
|
||||
@ -198,6 +201,16 @@ namespace PowerAccent.Core
|
||||
};
|
||||
}
|
||||
|
||||
// Bulgarian
|
||||
private static string[] GetDefaultLetterKeyBG(LetterKey letter)
|
||||
{
|
||||
return letter switch
|
||||
{
|
||||
LetterKey.VK_I => new[] { "й" },
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
}
|
||||
|
||||
// Crimean Tatar
|
||||
private static string[] GetDefaultLetterKeyCRH(LetterKey letter)
|
||||
{
|
||||
|
@ -53,6 +53,7 @@
|
||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.SelectedLangIndex, Mode=TwoWay}">
|
||||
<!-- 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_Bulgarian" />
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Catalan" />
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Crimean" />
|
||||
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Currency" />
|
||||
|
@ -3444,6 +3444,9 @@ Activate by holding the key for the character you want to add an accent to, then
|
||||
<data name="QuickAccent_SelectedLanguage_All.Content" xml:space="preserve">
|
||||
<value>All available</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage_Bulgarian.Content" xml:space="preserve">
|
||||
<value>Bulgarian</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage_Catalan.Content" xml:space="preserve">
|
||||
<value>Catalan</value>
|
||||
</data>
|
||||
|
@ -24,6 +24,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
private readonly string[] _languageOptions =
|
||||
{
|
||||
"ALL",
|
||||
"BG",
|
||||
"CA",
|
||||
"CRH",
|
||||
"CUR",
|
||||
|
Loading…
Reference in New Issue
Block a user