Fix broken localization: tr(f-string) never matches translation catalog

tr(f'Invalid configuration: {error}') evaluates the f-string before
tr() runs, so xgettext extracts the literal placeholder as the msgid
while runtime passes the formatted string - the two never match.
Switch to tr('...{}').format(...) and update msgid in base.pot.
This commit is contained in:
Softer 2026-05-04 23:26:10 +03:00
parent b5501d9507
commit f0eaf40d5f
2 changed files with 2 additions and 2 deletions

View File

@ -502,7 +502,7 @@ class GlobalMenu(AbstractMenu[None]):
return text[:-1] # remove last new line
if error := self._validate_bootloader():
return tr(f'Invalid configuration: {error}')
return tr('Invalid configuration: {}').format(error)
self.sync_all_to_config()
summary = ConfigurationOutput(self._arch_config).as_summary()

View File

@ -1245,7 +1245,7 @@ msgid "Product"
msgstr ""
#, python-brace-format
msgid "Invalid configuration: {error}"
msgid "Invalid configuration: {}"
msgstr ""
msgid "Ready to install"