Add email as common data string (#35546)

This commit is contained in:
Paulus Schoutsen 2020-05-12 09:08:07 -07:00 committed by GitHub
parent 68179e2672
commit befda9a78b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 32 deletions

View File

@ -3,7 +3,10 @@
"step": { "step": {
"user": { "user": {
"title": "Fill in your Abode login information", "title": "Fill in your Abode login information",
"data": { "username": "Email Address", "password": "Password" } "data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "Password"
}
} }
}, },
"error": { "error": {

View File

@ -12,7 +12,7 @@
"step": { "step": {
"user": { "user": {
"data": { "data": {
"email": "E-Mail Address", "email": "[%key:common::config_flow::data::email%]",
"password": "Password", "password": "Password",
"authorization_code": "Authorization Code (required for manual authentication)" "authorization_code": "Authorization Code (required for manual authentication)"
}, },

View File

@ -5,7 +5,7 @@
"title": "iCloud credentials", "title": "iCloud credentials",
"description": "Enter your credentials", "description": "Enter your credentials",
"data": { "data": {
"username": "Email", "username": "[%key:common::config_flow::data::email%]",
"password": "Password", "password": "Password",
"with_family": "With family" "with_family": "With family"
} }

View File

@ -4,7 +4,10 @@
"user": { "user": {
"title": "Linky", "title": "Linky",
"description": "Enter your credentials", "description": "Enter your credentials",
"data": { "username": "Email", "password": "Password" } "data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "Password"
}
} }
}, },
"error": { "error": {

View File

@ -5,7 +5,7 @@
"title": "Connect to MELCloud", "title": "Connect to MELCloud",
"description": "Connect using your MELCloud account.", "description": "Connect using your MELCloud account.",
"data": { "data": {
"username": "Email used to login to MELCloud.", "username": "[%key:common::config_flow::data::email%]",
"password": "MELCloud password." "password": "MELCloud password."
} }
} }

View File

@ -3,7 +3,10 @@
"step": { "step": {
"user": { "user": {
"title": "Connect to your Sense Energy Monitor", "title": "Connect to your Sense Energy Monitor",
"data": { "email": "Email Address", "password": "Password" } "data": {
"email": "[%key:common::config_flow::data::email%]",
"password": "Password"
}
} }
}, },
"error": { "error": {

View File

@ -4,7 +4,7 @@
"user": { "user": {
"title": "Fill in your information.", "title": "Fill in your information.",
"data": { "data": {
"username": "Email Address", "username": "[%key:common::config_flow::data::email%]",
"password": "Password", "password": "Password",
"code": "Code (used in Home Assistant UI)" "code": "Code (used in Home Assistant UI)"
} }

View File

@ -8,7 +8,10 @@
}, },
"step": { "step": {
"user": { "user": {
"data": { "username": "Email Address", "password": "Password" }, "data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "Password"
},
"description": "Please enter your information.", "description": "Please enter your information.",
"title": "Tesla - Configuration" "title": "Tesla - Configuration"
} }

View File

@ -3,7 +3,10 @@
"step": { "step": {
"user": { "user": {
"title": "Enter Username and Password", "title": "Enter Username and Password",
"data": { "username": "Email Address", "password": "Password" } "data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "Password"
}
} }
}, },
"error": { "invalid_login": "Invalid username or password" }, "error": { "invalid_login": "Invalid username or password" },

View File

@ -25,6 +25,7 @@
"confirm_setup": "Do you want to start set up?" "confirm_setup": "Do you want to start set up?"
}, },
"data": { "data": {
"email": "Email",
"username": "Username", "username": "Username",
"password": "Password", "password": "Password",
"host": "Host", "host": "Host",

View File

@ -392,30 +392,16 @@ def clean_wled():
def run(): def run():
"""Migrate translations.""" """Migrate translations."""
clean_wled() # clean_wled()
# Import new common keys # Rename existing keys to common keys,
# rename_keys( # Old keys have been updated with reference to the common key
# CORE_PROJECT_ID, rename_keys(
# { CORE_PROJECT_ID,
# "component::netatmo::config::step::pick_implementation::title": "common::config_flow::title::oauth2_pick_implementation", {
# "component::doorbird::config::step::user::data::username": "common::config_flow::data::username", "component::icloud::config::step::user::data::username": "common::config_flow::data::email",
# "component::doorbird::config::step::user::data::password": "common::config_flow::data::password", },
# "component::adguard::config::step::user::data::host": "common::config_flow::data::host", )
# "component::adguard::config::step::user::data::port": "common::config_flow::data::port",
# "component::zha::config::step::user::data::usb_path": "common::config_flow::data::usb_path",
# "component::smartthings::config::step::pat::data::access_token": "common::config_flow::data::access_token",
# "component::airvisual::config::step::geography::data::api_key": "common::config_flow::data::api_key",
# "component::doorbird::config::error::invalid_auth": "common::config_flow::error::invalid_auth",
# "component::airvisual::config::error::invalid_api_key": "common::config_flow::error::invalid_api_key",
# "component::tibber::config::error::invalid_access_token": "common::config_flow::error::invalid_access_token",
# "component::doorbird::config::error::unknown": "common::config_flow::error::unknown",
# "component::life360::config::abort::user_already_configured": "common::config_flow::abort::already_configured_account",
# "component::xiaomi_miio::config::abort::already_configured": "common::config_flow::abort::already_configured_device",
# "component::netatmo::config::abort::missing_configuration": "common::config_flow::abort::oauth2_missing_configuration",
# "component::netatmo::config::abort::authorize_url_timeout": "common::config_flow::abort::oauth2_authorize_url_timeout",
# },
# )
# find_frontend_states() # find_frontend_states()