Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/swiss.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/swiss.py')
-rw-r--r--examples/swiss.py44
1 files changed, 28 insertions, 16 deletions
diff --git a/examples/swiss.py b/examples/swiss.py
index d0f02dc1..da45cd18 100644
--- a/examples/swiss.py
+++ b/examples/swiss.py
@@ -1,14 +1,14 @@
"""
Script swiss (army knife)
-Designed to make different workflows for the installation process. Which is controled by the argument --mode
+Designed to make different workflows for the installation process. Which is controlled by the argument --mode
mode full guides the full process of installation
mode only_hd only proceeds to the creation of the disk infraestructure (partition, mount points, encryption)
mode only_os processes only the installation of Archlinux and software at --mountpoint (or /mnt/archinstall)
mode minimal (still not implemented)
mode lineal. Instead of a menu, shows a sequence of selection screens (eq. to the old mode for guided.py)
-When using the argument --advanced. an aditional menu for several special parameters needed during installation appears
+When using the argument --advanced. an additional menu for several special parameters needed during installation appears
This script respects the --dry_run argument
@@ -158,29 +158,41 @@ class SetupMenu(archinstall.GeneralMenu):
super().__init__(data_store=storage_area)
def _setup_selection_menu_options(self):
- self.set_option('archinstall-language',
+ self.set_option(
+ 'archinstall-language',
archinstall.Selector(
_('Archinstall language'),
lambda x: self._select_archinstall_language(x),
- default='English',
- enabled=True))
- self.set_option('ntp',
- archinstall.Selector(
- 'Activate NTP',
- lambda x: select_activate_NTP(),
- default='Y',
- enabled=True))
- self.set_option('mode',
+ display_func=lambda x: x.display_name,
+ default=self.translation_handler.get_language_by_abbr('en'),
+ enabled=True
+ )
+ )
+
+ self.set_option(
+ 'ntp',
+ archinstall.Selector(
+ 'Activate NTP',
+ lambda x: select_activate_NTP(),
+ default='Y',
+ enabled=True
+ )
+ )
+
+ self.set_option(
+ 'mode',
archinstall.Selector(
'Excution mode',
lambda x : select_mode(),
default='full',
- enabled=True))
+ enabled=True)
+ )
+
for item in ['LC_ALL','LC_CTYPE','LC_NUMERIC','LC_TIME','LC_MESSAGES','LC_COLLATE']:
self.set_option(item,
archinstall.Selector(
f'{get_locale_mode_text(item)} locale',
- lambda x,item=item: select_installed_locale(item), # the parmeter is needed for the lambda in the loop
+ lambda x,item=item: select_installed_locale(item), # the parameter is needed for the lambda in the loop
enabled=True,
dependencies_not=['LC_ALL'] if item != 'LC_ALL' else []))
self.option('LC_ALL').set_enabled(True)
@@ -255,7 +267,7 @@ class MyMenu(archinstall.GlobalMenu):
self.option(entry).set_enabled(False)
self._update_install_text()
- def post_callback(self,option,value=None):
+ def post_callback(self,option=None,value=None):
self._update_install_text(self._execution_mode)
def _missing_configs(self,mode='full'):
@@ -286,7 +298,7 @@ class MyMenu(archinstall.GlobalMenu):
"""
-Instalation general subroutines
+Installation general subroutines
"""
def get_current_status():