[Quick Accent]Add Catalan language accents (#22228)

* [QuickAccent] Add catalan

* Add missing l·l symbol

and improve order

* Fix build error

* Remove trailing white space

* [QuickAccent] put Catalan language in alphabet order (#22228)

Co-authored-by: CodingNeko <codingneko@gmail.com>
This commit is contained in:
Ivo Carbajo
2022-11-25 13:43:24 +01:00
committed by GitHub
parent b9367c0ca6
commit c057babf2b
4 changed files with 35 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ namespace PowerAccent.Core
public enum Language
{
ALL,
CA,
CUR,
CY,
CZ,
@@ -38,6 +39,7 @@ namespace PowerAccent.Core
switch (lang)
{
case Language.ALL: return GetDefaultLetterKeyALL(letter); // ALL
case Language.CA: return GetDefaultLetterKeyCA(letter); // Catalan
case Language.CUR: return GetDefaultLetterKeyCUR(letter); // Currency
case Language.CY: return GetDefaultLetterKeyCY(letter); // Welsh
case Language.CZ: return GetDefaultLetterKeyCZ(letter); // Czech
@@ -276,6 +278,34 @@ namespace PowerAccent.Core
return Array.Empty<string>();
}
// Catalan
private static string[] GetDefaultLetterKeyCA(LetterKey letter)
{
switch (letter)
{
case LetterKey.VK_A:
return new string[] { "à", "á" };
case LetterKey.VK_C:
return new string[] { "ç" };
case LetterKey.VK_E:
return new string[] { "è", "é", "€" };
case LetterKey.VK_I:
return new string[] { "ì", "í", "ï" };
case LetterKey.VK_N:
return new string[] { "ñ" };
case LetterKey.VK_O:
return new string[] { "ò", "ó" };
case LetterKey.VK_U:
return new string[] { "ù", "ú", "ü" };
case LetterKey.VK_L:
return new string[] { "·" };
case LetterKey.VK_COMMA:
return new string[] { "¿", "?" };
}
return Array.Empty<string>();
}
// Maori
private static string[] GetDefaultLetterKeyMI(LetterKey letter)
{