Generate ConfigValidationError message from English translations (#113844)
* Fetch ConfigValidationError message from translation cache * Sync error logmessages with translation cache * More sync * Cleanup * Remove unrelated change * Follow up comments * Rebase and improve contructor * Improve name * Rename to MULTIPLE_INTEGRATION_CONFIG_ERRORS
This commit is contained in:
parent
a58049554d
commit
19fa39d556
5 changed files with 200 additions and 178 deletions
|
@ -87,20 +87,19 @@ class ConfigValidationError(HomeAssistantError, ExceptionGroup[Exception]):
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
message: str,
|
||||
message_translation_key: str,
|
||||
exceptions: list[Exception],
|
||||
translation_domain: str | None = None,
|
||||
translation_key: str | None = None,
|
||||
translation_placeholders: dict[str, str] | None = None,
|
||||
) -> None:
|
||||
"""Initialize exception."""
|
||||
super().__init__(
|
||||
*(message, exceptions),
|
||||
*(message_translation_key, exceptions),
|
||||
translation_domain=translation_domain,
|
||||
translation_key=translation_key,
|
||||
translation_key=message_translation_key,
|
||||
translation_placeholders=translation_placeholders,
|
||||
)
|
||||
self._message = message
|
||||
self.generate_message = True
|
||||
|
||||
|
||||
class ServiceValidationError(HomeAssistantError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue