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:
parent
b5501d9507
commit
f0eaf40d5f
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -1245,7 +1245,7 @@ msgid "Product"
|
|||
msgstr ""
|
||||
|
||||
#, python-brace-format
|
||||
msgid "Invalid configuration: {error}"
|
||||
msgid "Invalid configuration: {}"
|
||||
msgstr ""
|
||||
|
||||
msgid "Ready to install"
|
||||
|
|
|
|||
Loading…
Reference in New Issue