Add ServiceValidationError and translation support (#102592)
* Add ServiceValidationError * Add translation support * Extend translation support to HomeAssistantError * Add translation support for ServiceNotFound exc * Frontend translation & translation_key from caller * Improve fallback message * Set websocket_api as default translation_domain * Add MQTT ServiceValidationError exception * Follow up comments * Revert removing gueard on translation_key * Revert test changes to fix CI test * Follow up comments * Fix CI test * Follow up * Improve language * Follow up comment
This commit is contained in:
@@ -328,6 +328,10 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
|
||||
),
|
||||
slug_validator=cv.slug,
|
||||
),
|
||||
vol.Optional("exceptions"): cv.schema_with_slug_keys(
|
||||
{vol.Optional("message"): translation_value_validator},
|
||||
slug_validator=cv.slug,
|
||||
),
|
||||
vol.Optional("services"): cv.schema_with_slug_keys(
|
||||
{
|
||||
vol.Required("name"): translation_value_validator,
|
||||
|
||||
Reference in New Issue
Block a user