[QuickAccent]Add setting to select language (#20798)

* add selection of country langages

* Add Greek and Iceland countries

* Update src/modules/poweraccent/PowerAccent.Core/PowerAccent.Core.csproj

* fix ß in all section

* remove greek

* improve UI

* langage to language

* remove GR reference

* change 'All' to 'All available'

* adding Romanian and Hungarian

* Missing characters

* Add Italian

* Fix translation key
Remove GameMode activation

* Fix PR build issues

* Callback to get if a letter is part of the language

* Add additional dlls to installer

* Fix new dlls signing

* Fix spelling

* Add description to language selection

Co-authored-by: Damien LEROY <dleroy@veepee.com>
This commit is contained in:
damienleroy
2022-09-29 16:28:14 +02:00
committed by GitHub
parent 1ecaf039ca
commit 5e955f034e
13 changed files with 817 additions and 40 deletions

View File

@@ -55,6 +55,9 @@ public class SettingsService
InputTime = settings.Properties.InputTime.Value;
_keyboardListener.UpdateInputTime(InputTime);
SelectedLang = Enum.TryParse(settings.Properties.SelectedLang.Value, out Language selectedLangValue) ? selectedLangValue : Language.ALL;
switch (settings.Properties.ToolbarPosition.Value)
{
case "Top center":
@@ -85,8 +88,6 @@ public class SettingsService
Position = Position.Center;
break;
}
_keyboardListener.UpdateInputTime(InputTime);
}
}
catch (Exception ex)
@@ -142,31 +143,19 @@ public class SettingsService
}
}
public static char[] GetDefaultLetterKey(LetterKey letter)
private Language _selectedLang;
public Language SelectedLang
{
switch (letter)
get
{
case LetterKey.VK_A:
return new char[] { 'à', 'â', 'á', 'ä', 'ã', 'å', 'æ' };
case LetterKey.VK_C:
return new char[] { 'ć', 'ĉ', 'č', 'ċ', 'ç', 'ḉ' };
case LetterKey.VK_E:
return new char[] { 'é', 'è', 'ê', 'ë', 'ē', 'ė', '€' };
case LetterKey.VK_I:
return new char[] { 'î', 'ï', 'í', 'ì', 'ī' };
case LetterKey.VK_N:
return new char[] { 'ñ', 'ń' };
case LetterKey.VK_O:
return new char[] { 'ô', 'ö', 'ó', 'ò', 'õ', 'ø', 'œ' };
case LetterKey.VK_S:
return new char[] { 'š', 'ß', 'ś' };
case LetterKey.VK_U:
return new char[] { 'û', 'ù', 'ü', 'ú', 'ū' };
case LetterKey.VK_Y:
return new char[] { 'ÿ', 'ý' };
return _selectedLang;
}
throw new ArgumentException("Letter {0} is missing", letter.ToString());
set
{
_selectedLang = value;
}
}
}