Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/user_interaction.py')
-rw-r--r--archinstall/lib/user_interaction.py31
1 files changed, 14 insertions, 17 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index f8822bac..94a05e89 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -30,7 +30,7 @@ from .mirrors import list_mirrors
# TODO: Some inconsistencies between the selection processes.
# Some return the keys from the options, some the values?
-from .translation import Translation
+from .translation import Translation, DeferredTranslation
from .disk.validators import fs_types
from .packages.packages import validate_package_list
@@ -428,22 +428,22 @@ def ask_to_configure_network() -> Dict[str, Any]:
# Optionally configure one network interface.
# while 1:
# {MAC: Ifname}
-
- iso_config = _('Copy ISO network configuration to installation')
- network_manager = _('Use NetworkManager (necessary to configure internet graphically in GNOME and KDE)')
-
interfaces = {
- 'ISO-CONFIG': iso_config,
- 'NetworkManager': network_manager,
+ 'iso_config': str(_('Copy ISO network configuration to installation')),
+ 'network_manager': str(_('Use NetworkManager (necessary to configure internet graphically in GNOME and KDE)')),
**list_interfaces()
}
nic = Menu(_('Select one network interface to configure'), list(interfaces.values())).run()
- if nic and nic != iso_config:
- if nic == network_manager:
- return {'nic': nic, 'NetworkManager': True}
+ if not nic:
+ return {}
+ if nic == interfaces['iso_config']:
+ return {'type': 'iso_config'}
+ elif nic == interfaces['network_manager']:
+ return {'type': 'network_manager', 'NetworkManager': True}
+ else:
# Current workaround:
# For selecting modes without entering text within brackets,
# printing out this part separate from options, passed in
@@ -491,13 +491,10 @@ def ask_to_configure_network() -> Dict[str, Any]:
if len(dns_input):
dns = dns_input.split(' ')
- return {'nic': nic, 'dhcp': False, 'ip': ip, 'gateway': gateway, 'dns': dns}
+ return {'type': nic, 'dhcp': False, 'ip': ip, 'gateway': gateway, 'dns': dns}
else:
- return {'nic': nic}
- elif nic:
- return nic
-
- return {}
+ # this will contain network iface names
+ return {'type': nic}
def partition_overlap(partitions :list, start :str, end :str) -> bool:
@@ -925,7 +922,7 @@ def select_driver(options :Dict[str, Any] = AVAILABLE_GFX_DRIVERS, force_ask :bo
if drivers:
arguments = storage.get('arguments', {})
- title = ''
+ title = DeferredTranslation('')
if has_amd_graphics():
title += _('For the best compatibility with your AMD hardware, you may want to use either the all open-source or AMD / ATI options.') + '\n'