Fix many typos (#1692)
Signed-off-by: Alexander Seiler <seileralex@gmail.com>
This commit is contained in:
parent
ca09e1e63d
commit
12b7017240
|
|
@ -43,7 +43,7 @@ __version__ = "2.6.0"
|
||||||
storage['__version__'] = __version__
|
storage['__version__'] = __version__
|
||||||
|
|
||||||
|
|
||||||
# add the custome _ as a builtin, it can now be used anywhere in the
|
# add the custom _ as a builtin, it can now be used anywhere in the
|
||||||
# project to mark strings as translatable with _('translate me')
|
# project to mark strings as translatable with _('translate me')
|
||||||
DeferredTranslation.install()
|
DeferredTranslation.install()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ class Profile:
|
||||||
def packages(self) -> List[str]:
|
def packages(self) -> List[str]:
|
||||||
"""
|
"""
|
||||||
Returns a list of packages that should be installed when
|
Returns a list of packages that should be installed when
|
||||||
this profile is among the choosen ones
|
this profile is among the chosen ones
|
||||||
"""
|
"""
|
||||||
return self._packages
|
return self._packages
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ class Profile:
|
||||||
"""
|
"""
|
||||||
Set the custom settings for the profile.
|
Set the custom settings for the profile.
|
||||||
This is also called when the settings are parsed from the config
|
This is also called when the settings are parsed from the config
|
||||||
and can be overriden to perform further actions based on the profile
|
and can be overridden to perform further actions based on the profile
|
||||||
"""
|
"""
|
||||||
self.custom_settings = settings
|
self.custom_settings = settings
|
||||||
|
|
||||||
|
|
@ -179,7 +179,7 @@ class Profile:
|
||||||
def preview_text(self) -> Optional[str]:
|
def preview_text(self) -> Optional[str]:
|
||||||
"""
|
"""
|
||||||
Used for preview text in profiles_bck. If a description is set for a
|
Used for preview text in profiles_bck. If a description is set for a
|
||||||
profile it will automatically display that one in the preivew.
|
profile it will automatically display that one in the preview.
|
||||||
If no preview or a different text should be displayed just
|
If no preview or a different text should be displayed just
|
||||||
"""
|
"""
|
||||||
if self.description:
|
if self.description:
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ class Size:
|
||||||
|
|
||||||
# not sure why we would ever wanna convert to percentages
|
# not sure why we would ever wanna convert to percentages
|
||||||
if target_unit == Unit.Percent and total_size is None:
|
if target_unit == Unit.Percent and total_size is None:
|
||||||
raise ValueError('Missing paramter total size to be able to convert to percentage')
|
raise ValueError('Missing parameter total size to be able to convert to percentage')
|
||||||
|
|
||||||
if self.unit == target_unit:
|
if self.unit == target_unit:
|
||||||
return self
|
return self
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class Fido2:
|
||||||
/dev/hidraw1 Yubico YubiKey OTP+FIDO+CCID
|
/dev/hidraw1 Yubico YubiKey OTP+FIDO+CCID
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# to prevent continous reloading which will slow
|
# to prevent continuous reloading which will slow
|
||||||
# down moving the cursor in the menu
|
# down moving the cursor in the menu
|
||||||
if not cls._loaded or reload:
|
if not cls._loaded or reload:
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
|
|
||||||
def generate_password(length :int = 64) -> str:
|
def generate_password(length :int = 64) -> str:
|
||||||
haystack = string.printable # digits, ascii_letters, punctiation (!"#$[] etc) and whitespace
|
haystack = string.printable # digits, ascii_letters, punctuation (!"#$[] etc) and whitespace
|
||||||
return ''.join(secrets.choice(haystack) for i in range(length))
|
return ''.join(secrets.choice(haystack) for i in range(length))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ from .output import FormattedOutput
|
||||||
from .profile.profile_menu import ProfileConfiguration
|
from .profile.profile_menu import ProfileConfiguration
|
||||||
from .storage import storage
|
from .storage import storage
|
||||||
from .configuration import save_config
|
from .configuration import save_config
|
||||||
from .interactions import add_number_of_parrallel_downloads
|
from .interactions import add_number_of_parallel_downloads
|
||||||
from .interactions import ask_additional_packages_to_install
|
from .interactions import ask_additional_packages_to_install
|
||||||
from .interactions import ask_for_additional_users
|
from .interactions import ask_for_additional_users
|
||||||
from .interactions import ask_for_audio_selection
|
from .interactions import ask_for_audio_selection
|
||||||
|
|
@ -119,7 +119,7 @@ class GlobalMenu(AbstractMenu):
|
||||||
self._menu_options['parallel downloads'] = \
|
self._menu_options['parallel downloads'] = \
|
||||||
Selector(
|
Selector(
|
||||||
_('Parallel Downloads'),
|
_('Parallel Downloads'),
|
||||||
lambda preset: add_number_of_parrallel_downloads(preset),
|
lambda preset: add_number_of_parallel_downloads(preset),
|
||||||
display_func=lambda x: x if x else '0',
|
display_func=lambda x: x if x else '0',
|
||||||
default=0
|
default=0
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ class Installer:
|
||||||
for part_mod in sorted_part_mods:
|
for part_mod in sorted_part_mods:
|
||||||
if luks_handler := luks_handlers.get(part_mod):
|
if luks_handler := luks_handlers.get(part_mod):
|
||||||
# mount encrypted partition
|
# mount encrypted partition
|
||||||
self._mount_luks_partiton(part_mod, luks_handler)
|
self._mount_luks_partition(part_mod, luks_handler)
|
||||||
else:
|
else:
|
||||||
# partition is not encrypted
|
# partition is not encrypted
|
||||||
self._mount_partition(part_mod)
|
self._mount_partition(part_mod)
|
||||||
|
|
@ -219,7 +219,7 @@ class Installer:
|
||||||
if part_mod.fs_type == disk.FilesystemType.Btrfs and part_mod.dev_path:
|
if part_mod.fs_type == disk.FilesystemType.Btrfs and part_mod.dev_path:
|
||||||
self._mount_btrfs_subvol(part_mod.dev_path, part_mod.btrfs_subvols)
|
self._mount_btrfs_subvol(part_mod.dev_path, part_mod.btrfs_subvols)
|
||||||
|
|
||||||
def _mount_luks_partiton(self, part_mod: disk.PartitionModification, luks_handler: Luks2):
|
def _mount_luks_partition(self, part_mod: disk.PartitionModification, luks_handler: Luks2):
|
||||||
# it would be none if it's btrfs as the subvolumes will have the mountpoints defined
|
# it would be none if it's btrfs as the subvolumes will have the mountpoints defined
|
||||||
if part_mod.mountpoint and luks_handler.mapper_dev:
|
if part_mod.mountpoint and luks_handler.mapper_dev:
|
||||||
target = self.target / part_mod.relative_mountpoint
|
target = self.target / part_mod.relative_mountpoint
|
||||||
|
|
@ -315,7 +315,7 @@ class Installer:
|
||||||
raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n Error: {err}')
|
raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n Error: {err}')
|
||||||
|
|
||||||
if not gen_fstab:
|
if not gen_fstab:
|
||||||
raise RequirementError(f'Genrating fstab returned empty value')
|
raise RequirementError(f'Generating fstab returned empty value')
|
||||||
|
|
||||||
with open(fstab_path, 'a') as fp:
|
with open(fstab_path, 'a') as fp:
|
||||||
fp.write(gen_fstab)
|
fp.write(gen_fstab)
|
||||||
|
|
@ -434,7 +434,7 @@ class Installer:
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def activate_time_syncronization(self) -> None:
|
def activate_time_synchronization(self) -> None:
|
||||||
info('Activating systemd-timesyncd for time synchronization using Arch Linux and ntp.org NTP servers')
|
info('Activating systemd-timesyncd for time synchronization using Arch Linux and ntp.org NTP servers')
|
||||||
self.enable_service('systemd-timesyncd')
|
self.enable_service('systemd-timesyncd')
|
||||||
|
|
||||||
|
|
@ -1008,7 +1008,7 @@ When = PostTransaction
|
||||||
Exec = /bin/sh -c \\"/usr/bin/limine bios-install /dev/disk/by-uuid/{root_uuid} && /usr/bin/cp /usr/share/limine/limine-bios.sys /boot/\\"
|
Exec = /bin/sh -c \\"/usr/bin/limine bios-install /dev/disk/by-uuid/{root_uuid} && /usr/bin/cp /usr/share/limine/limine-bios.sys /boot/\\"
|
||||||
""")
|
""")
|
||||||
|
|
||||||
# Limine does not ship with a default configuation file. We are going to
|
# Limine does not ship with a default configuration file. We are going to
|
||||||
# create a basic one that is similar to the one GRUB generates.
|
# create a basic one that is similar to the one GRUB generates.
|
||||||
try:
|
try:
|
||||||
config = f"""
|
config = f"""
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from .disk_conf import (
|
||||||
from .general_conf import (
|
from .general_conf import (
|
||||||
ask_ntp, ask_hostname, ask_for_a_timezone, ask_for_audio_selection,
|
ask_ntp, ask_hostname, ask_for_a_timezone, ask_for_audio_selection,
|
||||||
select_archinstall_language, ask_additional_packages_to_install,
|
select_archinstall_language, ask_additional_packages_to_install,
|
||||||
add_number_of_parrallel_downloads, select_additional_repositories
|
add_number_of_parallel_downloads, select_additional_repositories
|
||||||
)
|
)
|
||||||
|
|
||||||
from .system_conf import (
|
from .system_conf import (
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ def ask_additional_packages_to_install(preset: List[str] = []) -> List[str]:
|
||||||
return packages
|
return packages
|
||||||
|
|
||||||
|
|
||||||
def add_number_of_parrallel_downloads(input_number :Optional[int] = None) -> Optional[int]:
|
def add_number_of_parallel_downloads(input_number :Optional[int] = None) -> Optional[int]:
|
||||||
max_recommended = 5
|
max_recommended = 5
|
||||||
print(_(f"This option enables the number of parallel downloads that can occur during package downloads"))
|
print(_(f"This option enables the number of parallel downloads that can occur during package downloads"))
|
||||||
print(_("Enter the number of parallel downloads to be enabled.\n\nNote:\n"))
|
print(_("Enter the number of parallel downloads to be enabled.\n\nNote:\n"))
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ class ListManager:
|
||||||
self._data = self.handle_action(choice.value, None, self._data)
|
self._data = self.handle_action(choice.value, None, self._data)
|
||||||
elif choice.value in self._terminate_actions:
|
elif choice.value in self._terminate_actions:
|
||||||
break
|
break
|
||||||
else: # an entry of the existing selection was choosen
|
else: # an entry of the existing selection was chosen
|
||||||
selected_entry = data_formatted[choice.value] # type: ignore
|
selected_entry = data_formatted[choice.value] # type: ignore
|
||||||
self._run_actions_on_entry(selected_entry)
|
self._run_actions_on_entry(selected_entry)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ class Menu(TerminalMenu):
|
||||||
:param allow_reset: This will explicitly handle a ctrl+c instead and return that specific state
|
:param allow_reset: This will explicitly handle a ctrl+c instead and return that specific state
|
||||||
:type allow_reset: bool
|
:type allow_reset: bool
|
||||||
|
|
||||||
param allow_reset_warning_msg: If raise_error_on_interrupt is True the warnign is set, a user confirmation is displayed
|
param allow_reset_warning_msg: If raise_error_on_interrupt is True the warning is set, a user confirmation is displayed
|
||||||
type allow_reset_warning_msg: str
|
type allow_reset_warning_msg: str
|
||||||
|
|
||||||
:param extra_bottom_space: Add an extra empty line at the end of the menu
|
:param extra_bottom_space: Add an extra empty line at the end of the menu
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class FormattedOutput:
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
the original values returned a dataclass as dict thru the call to some specific methods
|
the original values returned a dataclass as dict thru the call to some specific methods
|
||||||
this version allows thru the parameter class_formatter to call a dynamicly selected formatting method.
|
this version allows thru the parameter class_formatter to call a dynamically selected formatting method.
|
||||||
Can transmit a filter list to the class_formatter,
|
Can transmit a filter list to the class_formatter,
|
||||||
"""
|
"""
|
||||||
if class_formatter:
|
if class_formatter:
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ class TranslationHandler:
|
||||||
|
|
||||||
def get_language_by_abbr(self, abbr: str) -> Language:
|
def get_language_by_abbr(self, abbr: str) -> Language:
|
||||||
"""
|
"""
|
||||||
Get a language object by its abbrevation, e.g. en
|
Get a language object by its abbreviation, e.g. en
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return next(filter(lambda x: x.abbr == abbr, self._translated_languages))
|
return next(filter(lambda x: x.abbr == abbr, self._translated_languages))
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ def perform_installation(mountpoint: Path):
|
||||||
installation.set_timezone(timezone)
|
installation.set_timezone(timezone)
|
||||||
|
|
||||||
if archinstall.arguments.get('ntp', False):
|
if archinstall.arguments.get('ntp', False):
|
||||||
installation.activate_time_syncronization()
|
installation.activate_time_synchronization()
|
||||||
|
|
||||||
if archinstall.accessibility_tools_in_use():
|
if archinstall.accessibility_tools_in_use():
|
||||||
installation.enable_espeakup()
|
installation.enable_espeakup()
|
||||||
|
|
@ -193,7 +193,7 @@ def perform_installation(mountpoint: Path):
|
||||||
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
|
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
|
||||||
installation.user_set_pw('root', root_pw)
|
installation.user_set_pw('root', root_pw)
|
||||||
|
|
||||||
# This step must be after profile installs to allow profiles_bck to install language pre-requisits.
|
# This step must be after profile installs to allow profiles_bck to install language pre-requisites.
|
||||||
# After which, this step will set the language both for console and x11 if x11 was installed for instance.
|
# After which, this step will set the language both for console and x11 if x11 was installed for instance.
|
||||||
installation.set_keyboard_language(locale_config.kb_layout)
|
installation.set_keyboard_language(locale_config.kb_layout)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class SetupMenu(GlobalMenu):
|
||||||
super().setup_selection_menu_options()
|
super().setup_selection_menu_options()
|
||||||
|
|
||||||
self._menu_options['mode'] = menu.Selector(
|
self._menu_options['mode'] = menu.Selector(
|
||||||
'Excution mode',
|
'Execution mode',
|
||||||
lambda x : select_mode(),
|
lambda x : select_mode(),
|
||||||
display_func=lambda x: x.value if x else '',
|
display_func=lambda x: x.value if x else '',
|
||||||
default=ExecutionMode.Full)
|
default=ExecutionMode.Full)
|
||||||
|
|
@ -249,7 +249,7 @@ def perform_installation(mountpoint: Path, exec_mode: ExecutionMode):
|
||||||
installation.set_timezone(timezone)
|
installation.set_timezone(timezone)
|
||||||
|
|
||||||
if archinstall.arguments.get('ntp', False):
|
if archinstall.arguments.get('ntp', False):
|
||||||
installation.activate_time_syncronization()
|
installation.activate_time_synchronization()
|
||||||
|
|
||||||
if archinstall.accessibility_tools_in_use():
|
if archinstall.accessibility_tools_in_use():
|
||||||
installation.enable_espeakup()
|
installation.enable_espeakup()
|
||||||
|
|
@ -257,7 +257,7 @@ def perform_installation(mountpoint: Path, exec_mode: ExecutionMode):
|
||||||
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
|
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
|
||||||
installation.user_set_pw('root', root_pw)
|
installation.user_set_pw('root', root_pw)
|
||||||
|
|
||||||
# This step must be after profile installs to allow profiles_bck to install language pre-requisits.
|
# This step must be after profile installs to allow profiles_bck to install language pre-requisites.
|
||||||
# After which, this step will set the language both for console and x11 if x11 was installed for instance.
|
# After which, this step will set the language both for console and x11 if x11 was installed for instance.
|
||||||
installation.set_keyboard_language(locale_config.kb_layout)
|
installation.set_keyboard_language(locale_config.kb_layout)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ def perform_installation(mountpoint: Path):
|
||||||
installation.set_timezone(timezone)
|
installation.set_timezone(timezone)
|
||||||
|
|
||||||
if archinstall.arguments.get('ntp', False):
|
if archinstall.arguments.get('ntp', False):
|
||||||
installation.activate_time_syncronization()
|
installation.activate_time_synchronization()
|
||||||
|
|
||||||
if archinstall.accessibility_tools_in_use():
|
if archinstall.accessibility_tools_in_use():
|
||||||
installation.enable_espeakup()
|
installation.enable_espeakup()
|
||||||
|
|
@ -171,7 +171,7 @@ def perform_installation(mountpoint: Path):
|
||||||
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
|
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
|
||||||
installation.user_set_pw('root', root_pw)
|
installation.user_set_pw('root', root_pw)
|
||||||
|
|
||||||
# This step must be after profile installs to allow profiles_bck to install language pre-requisits.
|
# This step must be after profile installs to allow profiles_bck to install language pre-requisites.
|
||||||
# After which, this step will set the language both for console and x11 if x11 was installed for instance.
|
# After which, this step will set the language both for console and x11 if x11 was installed for instance.
|
||||||
installation.set_keyboard_language(locale_config.kb_layout)
|
installation.set_keyboard_language(locale_config.kb_layout)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue