index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | codefiles <11915375+codefiles@users.noreply.github.com> | 2023-11-20 06:55:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-20 12:55:45 +0100 |
commit | 6ee6d1eda05d3f69f6aaabac55a741e693449994 (patch) | |
tree | cf9b82bd0d5ebe0d31adf6398ea872253f51868f | |
parent | 30a374a65b84c2d7dfbb13a4643fb27f31bc71e2 (diff) |
-rw-r--r-- | archinstall/lib/interactions/general_conf.py | 29 |
diff --git a/archinstall/lib/interactions/general_conf.py b/archinstall/lib/interactions/general_conf.py index b12a6fb8..a879552e 100644 --- a/archinstall/lib/interactions/general_conf.py +++ b/archinstall/lib/interactions/general_conf.py @@ -3,7 +3,7 @@ from __future__ import annotations import pathlib from typing import List, Any, Optional, TYPE_CHECKING -from ..locale import list_timezones, list_keyboard_languages +from ..locale import list_timezones from ..menu import MenuSelectionType, Menu, TextInput from ..models.audio_configuration import Audio, AudioConfiguration from ..output import warn @@ -87,29 +87,16 @@ def ask_for_audio_selection( def select_language(preset: Optional[str] = None) -> Optional[str]: - """ - Asks the user to select a language - Usually this is combined with :ref:`archinstall.list_keyboard_languages`. - - :return: The language/dictionary key of the selected language - :rtype: str - """ - kb_lang = list_keyboard_languages() - # sort alphabetically and then by length - sorted_kb_lang = sorted(kb_lang, key=lambda x: (len(x), x)) + from ..locale.locale_menu import select_kb_layout - choice = Menu( - _('Select keyboard layout'), - sorted_kb_lang, - preset_values=preset, - sort=False - ).run() + # We'll raise an exception in an upcoming version. + # from ..exceptions import Deprecated + # raise Deprecated("select_language() has been deprecated, use select_kb_layout() instead.") - match choice.type_: - case MenuSelectionType.Skip: return preset - case MenuSelectionType.Selection: return choice.single_value + # No need to translate this i feel, as it's a short lived message. + warn("select_language() is deprecated, use select_kb_layout() instead. select_language() will be removed in a future version") - return None + return select_kb_layout(preset) def select_archinstall_language(languages: List[Language], preset: Language) -> Language: |