Services / Finding Translator

DefaultFindingTranslator

class teksi_hooks.services.finding_translator.DefaultFindingTranslator(templates=<factory>)[source]

Render finding messages from stable finding codes and structured details.

The default implementation uses the framework’s English message catalog. Additional templates may be supplied by adapters or plugins.

Parameters:

templates (Mapping[str, str])

translate(finding)[source]

Return the rendered message for a finding.

The finding’s fallback message is returned when no template exists or when the template cannot be formatted with the available details.

Parameters:

finding (Finding)

Return type:

str

Fields

templates

Type: Mapping[str, str]