aeat.application.wizard._translations module

Locale-coverage audit for wizard descriptor and CLI translation strings.

audit_wizard_translations walks every Translatable value declared anywhere in WIZARD_FLOWS (titles, prompts, helps, choice labels and descriptions, plus the fixed error keys the runtime raises) and the wizard-derived flag-help keys, returning the tuple of keys that fail to resolve in any of the four locale catalogues.

audit_cli_translations runs the same locale-resolution sweep over every cli.<group>.* translation key referenced at a tr(...) call site in any module under aeat.entrypoints.cli. The audit treats a locale that returns the literal key text – the python-i18n fallback behaviour when a key is absent or its value mirrors the key itself – as a structured failure.

audit_wizard_translations()[source]

Return the keys that fail to resolve in any locale.

A key is considered missing for a locale when tr(key, locale=...) returns the raw key itself (the python-i18n fallback behaviour).

Return type:

tuple[str, ...]

cli_keys_referenced_in_source()[source]

Return every cli.<group>.* translation key referenced statically.

Walks every .py module under aeat.entrypoints.cli and extracts literal cli.<group>.<rest> strings by regex. f-string interpolations that build keys at runtime (for example f"cli.config.{flow.id}.help") are not captured here; those keys are walked by audit_wizard_translations() through the wizard descriptor catalogue instead.

Return type:

tuple[str, ...]

audit_cli_translations()[source]

Return the cli.* keys that fail to resolve in any locale.

A failure means the locale catalogue either omits the key or stores the literal key text as the value, both of which surface as raw key strings in operator-facing help output.

Return type:

tuple[str, ...]