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).
- cli_keys_referenced_in_source()[source]¶
Return every
cli.<group>.*translation key referenced statically.Walks every
.pymodule underaeat.entrypoints.cliand extracts literalcli.<group>.<rest>strings by regex. f-string interpolations that build keys at runtime (for examplef"cli.config.{flow.id}.help") are not captured here; those keys are walked byaudit_wizard_translations()through the wizard descriptor catalogue instead.