Fix missing translations in vilfo (#130650)
parent
eaa8a5a750
commit
b2d98ae931
|
@ -109,7 +109,7 @@ class DomainConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
try:
|
||||
info = await validate_input(self.hass, user_input)
|
||||
except InvalidHost:
|
||||
errors[CONF_HOST] = "wrong_host"
|
||||
errors["base"] = "invalid_host"
|
||||
except CannotConnect:
|
||||
errors["base"] = "cannot_connect"
|
||||
except InvalidAuth:
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"error": {
|
||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
|
||||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
|
||||
"invalid_host": "[%key:common::config_flow::error::invalid_host%]",
|
||||
"unknown": "[%key:common::config_flow::error::unknown%]"
|
||||
},
|
||||
"abort": {
|
||||
|
|
|
@ -150,10 +150,6 @@ async def test_form_exceptions(
|
|||
assert result["type"] is FlowResultType.CREATE_ENTRY
|
||||
|
||||
|
||||
@pytest.mark.parametrize( # Remove when translations fixed
|
||||
"ignore_translations",
|
||||
["component.vilfo.config.error.wrong_host"],
|
||||
)
|
||||
async def test_form_wrong_host(
|
||||
hass: HomeAssistant,
|
||||
mock_is_valid_host: AsyncMock,
|
||||
|
@ -169,7 +165,7 @@ async def test_form_wrong_host(
|
|||
},
|
||||
)
|
||||
|
||||
assert result["errors"] == {"host": "wrong_host"}
|
||||
assert result["errors"] == {"base": "invalid_host"}
|
||||
|
||||
|
||||
async def test_form_already_configured(
|
||||
|
|
Loading…
Reference in New Issue