Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Missing Bulgarian character #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion PowerAccent.Core/Languages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace PowerAccent.Core;
public enum Language
{
ALL,
BG,
CUR,
CY,
CZ,
Expand Down Expand Up @@ -38,6 +39,7 @@ public static char[] GetDefaultLetterKey(LetterKey letter, Language lang)
switch (lang)
{
case Language.ALL: return GetDefaultLetterKeyALL(letter); // ALL
case Language.BG: return GetDefaultLetterKeyBG(letter); // Bulgarian
case Language.CUR: return GetDefaultLetterKeyCUR(letter); // Currency
case Language.CY: return GetDefaultLetterKeyCY(letter); // Welsh
case Language.CZ: return GetDefaultLetterKeyCZ(letter); // Czech
Expand Down Expand Up @@ -113,7 +115,7 @@ private static char[] GetDefaultLetterKeyALL(LetterKey letter)
case LetterKey.H:
return new char[] { 'ḣ', 'ĥ', 'ħ' };
case LetterKey.I:
return new char[] { 'ï', 'î', 'í', 'ì', 'ī', 'į', 'i', 'ı', 'İ', 'ι' };
return new char[] { 'ï', 'î', 'í', 'ì', 'ī', 'į', 'i', 'ı', 'İ', 'ι', 'ѝ', 'Ѝ' };
case LetterKey.J:
return new char[] { 'ĵ' };
case LetterKey.K:
Expand Down Expand Up @@ -151,6 +153,20 @@ private static char[] GetDefaultLetterKeyALL(LetterKey letter)
return Array.Empty<char>();
}

// Bulgarian
// Alphabet: "АаБбВвГгДдЕеЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъьЮюЯя"
private static char[] GetDefaultLetterKeyBG(LetterKey letter)
{
switch (letter)
{
// There could be more cases ?
case LetterKey.I:
return new char[] { 'ѝ', 'Ѝ' };
}

return Array.Empty<char>();
}

// Currencies (source: https://www.eurochange.co.uk/travel-money/world-currency-abbreviations-symbols-and-codes-travel-money)
private static char[] GetDefaultLetterKeyCUR(LetterKey letter)
{
Expand Down
Binary file added PowerAccent.UI/Resources/Flags/BG.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.