i18n phases 1+2: BAL translation layer and translatable texts
Phase 1: new bal/i18n.py, BAL's own gettext layer (domain "bal", catalogs read with plugin.read_file()). _() asks Electrum's catalog first, then BAL's, then returns the English source. The Qt plugin loads the catalog of Electrum's GUI language at start-up; the CLI stays English. Phase 2: every user-visible GUI text is now a whole, extractable sentence (Ruff INT rules enabled). Class-level texts are marked with N_() and translated when shown. Stored data stays language-neutral: the status history is written in English and translated for display, the calendar defaults follow the GUI language, and the history label and wallet labels are never translated because BAL uses them to recognise its transactions. No visible change apart from the double colon fixed in the will detail. See CHANGELOG entries 58 and 59 and PLAN_I18N.md.
This commit is contained in:
@@ -91,17 +91,17 @@ def _user_facing(e):
|
||||
_(
|
||||
"In the inheritance process, the entire wallet will always be "
|
||||
"fully emptied. Your settings require an adjustment of the "
|
||||
f"amounts: {e}"
|
||||
)
|
||||
"amounts: {}"
|
||||
).format(e)
|
||||
)
|
||||
if isinstance(e, heirs_mod.WillExecutorFeeTooHighException):
|
||||
return UserFacingException(_(f"Will-executor fee too high: {e}"))
|
||||
return UserFacingException(_("Will-executor fee too high: {}").format(e))
|
||||
if isinstance(e, heirs_mod.BalanceTooLowException):
|
||||
return UserFacingException(str(e))
|
||||
if isinstance(e, heirs_mod.HeirAmountIsDustException):
|
||||
return UserFacingException(str(e))
|
||||
if isinstance(e, heirs_mod.NotAnAddress):
|
||||
return UserFacingException(_(f"not an address, {e}"))
|
||||
return UserFacingException(_("not an address, {}").format(e))
|
||||
if isinstance(e, heirs_mod.AmountNotValid):
|
||||
return UserFacingException(str(e))
|
||||
if isinstance(e, heirs_mod.LocktimeNotValid):
|
||||
|
||||
Reference in New Issue
Block a user