Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-06-07 01:26:27 +1000
committerGitHub <noreply@github.com>2022-06-06 17:26:27 +0200
commit2d4b2620462a0fb4c9496ed0629d7ab8930fc73a (patch)
treedf1850ae1c717a3f1ea5d0fd39351b6482b35770 /archinstall/lib/user_interaction
parentf2492ca574448fe4bd44604316da322720e70040 (diff)
Handle cyrillic characters (#1309)
* Handle cyrillic characters * Update Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/user_interaction')
-rw-r--r--archinstall/lib/user_interaction/general_conf.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/archinstall/lib/user_interaction/general_conf.py b/archinstall/lib/user_interaction/general_conf.py
index 70a0e73f..15c42b86 100644
--- a/archinstall/lib/user_interaction/general_conf.py
+++ b/archinstall/lib/user_interaction/general_conf.py
@@ -118,10 +118,13 @@ def select_mirror_regions(preset_values: Dict[str, Any] = {}) -> Dict[str, Any]:
case _: return {selected: mirrors[selected] for selected in selected_mirror.value}
-def select_archinstall_language(default='English'):
+def select_archinstall_language(preset_values: str):
languages = Translation.get_available_lang()
- language = Menu(_('Archinstall language'), languages, default_option=default).run()
- return language
+ choice = Menu(_('Archinstall language'), languages, default_option=preset_values).run()
+
+ match choice.type_:
+ case MenuSelectionType.Esc: return preset_values
+ case MenuSelectionType.Selection: return choice.value
def select_profile(preset) -> Optional[Profile]: