From 3b026cb603b3e53000a9a84b0d2682b95d458fa0 Mon Sep 17 00:00:00 2001 From: Softer Date: Thu, 30 Apr 2026 00:33:21 +0300 Subject: [PATCH] Fix broken localization in U2F, LUKS, and gfx driver preview (#4500) --- archinstall/lib/authentication/authentication_handler.py | 2 +- archinstall/lib/disk/encryption_menu.py | 2 +- archinstall/lib/profile/profile_menu.py | 2 +- archinstall/locales/base.pot | 8 ++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/archinstall/lib/authentication/authentication_handler.py b/archinstall/lib/authentication/authentication_handler.py index a0b8e132..9a99ba02 100644 --- a/archinstall/lib/authentication/authentication_handler.py +++ b/archinstall/lib/authentication/authentication_handler.py @@ -81,7 +81,7 @@ class AuthenticationHandler: install_session.pacman.strap('pam-u2f') - print(tr(f'Setting up U2F login: {u2f_config.u2f_login_method.value}')) + print(tr('Setting up U2F login: {}').format(u2f_config.u2f_login_method.value)) # https://developers.yubico.com/pam-u2f/ u2f_auth_file = install_session.target / 'etc/u2f_mappings' diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index 39c631cd..d66ccf92 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -375,7 +375,7 @@ async def select_lvm_vols_to_encrypt( async def select_iteration_time(preset: int | None = None) -> int | None: header = tr('Enter iteration time for LUKS encryption (in milliseconds)') + '\n' header += tr('Higher values increase security but slow down boot time') + '\n' - header += tr(f'Default: {DEFAULT_ITER_TIME}ms, Recommended range: 1000-60000') + '\n' + header += tr('Default: {}ms, Recommended range: 1000-60000').format(DEFAULT_ITER_TIME) + '\n' def validate_iter_time(value: str) -> str | None: try: diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index 115c9fc0..0bdc9b0b 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -113,7 +113,7 @@ class ProfileMenu(AbstractSubMenu[ProfileConfiguration]): if item.value: driver = item.get_value().value packages = item.get_value().packages_text() - return f'Driver: {driver}\n{packages}' + return f'{tr("Graphics driver")}: {driver}\n{packages}' return None def _prev_greeter(self, item: MenuItem) -> str | None: diff --git a/archinstall/locales/base.pot b/archinstall/locales/base.pot index 4e9e0e9f..31f5e196 100644 --- a/archinstall/locales/base.pot +++ b/archinstall/locales/base.pot @@ -2285,3 +2285,11 @@ msgstr "" #, python-brace-format msgid "Default: {DEFAULT_ITER_TIME}ms, Recommended range: 1000-60000" msgstr "" + +#, python-brace-format +msgid "Setting up U2F login: {}" +msgstr "" + +#, python-brace-format +msgid "Default: {}ms, Recommended range: 1000-60000" +msgstr ""