[Quick Accent] Add Serbian language accents (#22288)

This commit is contained in:
damienleroy
2022-11-26 19:46:07 +01:00
committed by GitHub
parent 5f4514a88e
commit 357fb8f66d
4 changed files with 25 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ namespace PowerAccent.Core
RO, RO,
SK, SK,
SP, SP,
SR,
SV, SV,
TK, TK,
} }
@@ -59,6 +60,7 @@ namespace PowerAccent.Core
case Language.RO: return GetDefaultLetterKeyRO(letter); // Romanian case Language.RO: return GetDefaultLetterKeyRO(letter); // Romanian
case Language.SK: return GetDefaultLetterKeySK(letter); // Slovak case Language.SK: return GetDefaultLetterKeySK(letter); // Slovak
case Language.SP: return GetDefaultLetterKeySP(letter); // Spain case Language.SP: return GetDefaultLetterKeySP(letter); // Spain
case Language.SR: return GetDefaultLetterKeySR(letter); // Serbian
case Language.SV: return GetDefaultLetterKeySV(letter); // Swedish case Language.SV: return GetDefaultLetterKeySV(letter); // Swedish
case Language.TK: return GetDefaultLetterKeyTK(letter); // Turkish case Language.TK: return GetDefaultLetterKeyTK(letter); // Turkish
} }
@@ -705,5 +707,23 @@ namespace PowerAccent.Core
return Array.Empty<string>(); return Array.Empty<string>();
} }
// Serbian
private static string[] GetDefaultLetterKeySR(LetterKey letter)
{
switch (letter)
{
case LetterKey.VK_C:
return new string[] { "ć", "č" };
case LetterKey.VK_D:
return new string[] { "đ" };
case LetterKey.VK_S:
return new string[] { "š" };
case LetterKey.VK_Z:
return new string[] { "ž" };
}
return Array.Empty<string>();
}
} }
} }

View File

@@ -2600,6 +2600,9 @@ Activate by holding the key for the character you want to add an accent to, then
<data name="QuickAccent_SelectedLanguage_Romanian.Content" xml:space="preserve"> <data name="QuickAccent_SelectedLanguage_Romanian.Content" xml:space="preserve">
<value>Romanian</value> <value>Romanian</value>
</data> </data>
<data name="QuickAccent_SelectedLanguage_Serbian.Content" xml:space="preserve">
<value>Serbian</value>
</data>
<data name="QuickAccent_SelectedLanguage_Hungarian.Content" xml:space="preserve"> <data name="QuickAccent_SelectedLanguage_Hungarian.Content" xml:space="preserve">
<value>Hungarian</value> <value>Hungarian</value>
</data> </data>

View File

@@ -42,6 +42,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
"RO", "RO",
"SK", "SK",
"SP", "SP",
"SR",
"SV", "SV",
"TK", "TK",
"CY", "CY",

View File

@@ -79,6 +79,7 @@
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Romanian" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Romanian" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Slovakian" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Slovakian" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Spanish" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Spanish" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Serbian" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Swedish" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Swedish" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Turkish" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Turkish" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Welsh" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Welsh" />