mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Use common strings in Icloud config flow (#41188)
This commit is contained in:
parent
d5c88a4e3c
commit
c3ef05a37e
@ -113,7 +113,7 @@ class IcloudFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
except PyiCloudFailedLoginException as error:
|
||||
_LOGGER.error("Error logging into iCloud service: %s", error)
|
||||
self.api = None
|
||||
errors[CONF_USERNAME] = "login"
|
||||
errors[CONF_USERNAME] = "invalid_auth"
|
||||
return await self._show_setup_form(user_input, errors)
|
||||
|
||||
if self.api.requires_2sa:
|
||||
|
@ -26,13 +26,13 @@
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"login": "Login error: please check your email & password",
|
||||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
|
||||
"send_verification_code": "Failed to send verification code",
|
||||
"validate_verification_code": "Failed to verify your verification code, choose a trust device and start the verification again"
|
||||
},
|
||||
"abort": {
|
||||
"already_configured": "Account already configured",
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]",
|
||||
"no_device": "None of your devices have \"Find my iPhone\" activated"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ async def test_login_failed(hass: HomeAssistantType):
|
||||
data={CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD},
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["errors"] == {CONF_USERNAME: "login"}
|
||||
assert result["errors"] == {CONF_USERNAME: "invalid_auth"}
|
||||
|
||||
|
||||
async def test_no_device(
|
||||
|
Loading…
x
Reference in New Issue
Block a user