Use config flow references for data (#35529)

This commit is contained in:
Paulus Schoutsen 2020-05-12 10:50:44 -07:00 committed by GitHub
parent 1f71bdedab
commit dd32324e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
83 changed files with 526 additions and 353 deletions

View File

@ -5,7 +5,7 @@
"title": "Fill in your Abode login information",
"data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "Password"
"password": "[%key:common::config_flow::data::password%]"
}
}
},
@ -18,4 +18,4 @@
"single_instance_allowed": "Only a single configuration of Abode is allowed."
}
}
}
}

View File

@ -5,8 +5,8 @@
"user": {
"title": "Set up Agent DVR",
"data": {
"host": "Host",
"port": "Port"
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
}
}
},
@ -18,4 +18,4 @@
"device_unavailable": "Device is not available"
}
}
}
}

View File

@ -6,7 +6,7 @@
"description": "Set up Airly air quality integration. To generate API key go to https://developer.airly.eu/register",
"data": {
"name": "Name of the integration",
"api_key": "Airly API key",
"api_key": "[%key:common::config_flow::data::api_key%]",
"latitude": "Latitude",
"longitude": "Longitude"
}
@ -20,4 +20,4 @@
"already_configured": "Airly integration for these coordinates is already configured."
}
}
}
}

View File

@ -15,7 +15,7 @@
"description": "Monitor a personal AirVisual unit. The password can be retrieved from the unit's UI.",
"data": {
"ip_address": "Unit IP Address/Hostname",
"password": "Unit Password"
"password": "[%key:common::config_flow::data::password%]"
}
},
"user": {
@ -47,4 +47,4 @@
}
}
}
}
}

View File

@ -3,13 +3,18 @@
"step": {
"user": {
"title": "Fill in your information",
"data": { "api_key": "API Key", "app_key": "Application Key" }
"data": {
"api_key": "[%key:common::config_flow::data::api_key%]",
"app_key": "Application Key"
}
}
},
"error": {
"invalid_key": "Invalid API Key and/or Application Key",
"no_devices": "No devices found in account"
},
"abort": { "already_configured": "This app key is already in use." }
"abort": {
"already_configured": "This app key is already in use."
}
}
}
}

View File

@ -5,9 +5,9 @@
"user": {
"title": "Connect to the device",
"data": {
"host": "Host",
"host": "[%key:common::config_flow::data::host%]",
"email": "Email (Optional)",
"port": "Port (10000)"
"port": "[%key:common::config_flow::data::port%]"
}
}
},
@ -18,4 +18,4 @@
"already_configured": "Only one Atag device can be added to Home Assistant"
}
}
}
}

View File

@ -5,23 +5,27 @@
"cannot_connect": "Failed to connect, please try again",
"invalid_auth": "Invalid authentication"
},
"abort": { "already_configured": "Account is already configured" },
"abort": {
"already_configured": "Account is already configured"
},
"step": {
"validation": {
"title": "Two factor authentication",
"data": { "code": "Verification code" },
"data": {
"code": "Verification code"
},
"description": "Please check your {login_method} ({username}) and enter the verification code below"
},
"user": {
"description": "If the Login Method is 'email', Username is the email address. If the Login Method is 'phone', Username is the phone number in the format '+NNNNNNNNN'.",
"data": {
"timeout": "Timeout (seconds)",
"password": "Password",
"username": "Username",
"password": "[%key:common::config_flow::data::password%]",
"username": "[%key:common::config_flow::data::username%]",
"login_method": "Login Method"
},
"title": "Setup an August account"
}
}
}
}
}

View File

@ -5,10 +5,10 @@
"user": {
"title": "Set up Axis device",
"data": {
"host": "Host",
"username": "Username",
"password": "Password",
"port": "Port"
"host": "[%key:common::config_flow::data::host%]",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"port": "[%key:common::config_flow::data::port%]"
}
}
},
@ -25,4 +25,4 @@
"not_axis_device": "Discovered device not an Axis device"
}
}
}
}

View File

@ -12,12 +12,12 @@
"flow_title": "BleBox device: {name} ({host})",
"step": {
"user": {
"description": "Set up your BleBox to integrate with Home Assistant.",
"data": {
"host": "IP address",
"port": "Port"
},
"title": "Set up your BleBox device"
"description": "Set up your BleBox to integrate with Home Assistant.",
"data": {
"host": "[%key:common::config_flow::data::ip%]",
"port": "[%key:common::config_flow::data::port%]"
},
"title": "Set up your BleBox device"
}
}
}

View File

@ -4,12 +4,16 @@
"user": {
"title": "Sony Bravia TV",
"description": "Set up Sony Bravia TV integration. If you have problems with configuration go to: https://www.home-assistant.io/integrations/braviatv \n\nEnsure that your TV is turned on.",
"data": { "host": "TV hostname or IP address" }
"data": {
"host": "[%key:common::config_flow::data::host%]"
}
},
"authorize": {
"title": "Authorize Sony Bravia TV",
"description": "Enter the PIN code shown on the Sony Bravia TV. \n\nIf the PIN code is not shown, you have to unregister Home Assistant on your TV, go to: Settings -> Network -> Remote device settings -> Unregister remote device.",
"data": { "pin": "PIN code" }
"data": {
"pin": "PIN code"
}
}
},
"error": {
@ -17,14 +21,18 @@
"cannot_connect": "Failed to connect, invalid host or PIN code.",
"unsupported_model": "Your TV model is not supported."
},
"abort": { "already_configured": "This TV is already configured." }
"abort": {
"already_configured": "This TV is already configured."
}
},
"options": {
"step": {
"user": {
"title": "Options for Sony Bravia TV",
"data": { "ignored_sources": "List of ignored sources" }
"data": {
"ignored_sources": "List of ignored sources"
}
}
}
}
}
}

View File

@ -5,14 +5,16 @@
"user": {
"description": "Set up Brother printer integration. If you have problems with configuration go to: https://www.home-assistant.io/integrations/brother",
"data": {
"host": "Printer hostname or IP address",
"host": "[%key:common::config_flow::data::host%]",
"type": "Type of the printer"
}
},
"zeroconf_confirm": {
"description": "Do you want to add the Brother Printer {model} with serial number `{serial_number}` to Home Assistant?",
"title": "Discovered Brother Printer",
"data": { "type": "Type of the printer" }
"data": {
"type": "Type of the printer"
}
}
},
"error": {
@ -25,4 +27,4 @@
"already_configured": "This printer is already configured."
}
}
}
}

View File

@ -7,8 +7,8 @@
"title": "Connect to the BSB-Lan device",
"description": "Set up you BSB-Lan device to integrate with Home Assistant.",
"data": {
"host": "Host or IP address",
"port": "Port number",
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]",
"passkey": "Passkey string"
}
}
@ -20,4 +20,4 @@
"already_configured": "Device is already configured"
}
}
}
}

View File

@ -6,8 +6,8 @@
"title": "Define the certificate to test",
"data": {
"name": "The name of the certificate",
"host": "The hostname of the certificate",
"port": "The port of the certificate"
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
}
}
},
@ -21,4 +21,4 @@
"import_failed": "Import from config failed"
}
}
}
}

View File

@ -4,7 +4,7 @@
"user": {
"title": "Setup your CoolMasterNet connection details.",
"data": {
"host": "Host",
"host": "[%key:common::config_flow::data::host%]",
"off": "Can be turned off",
"heat": "Support heat mode",
"cool": "Support cool mode",
@ -19,4 +19,4 @@
"no_units": "Could not find any HVAC units in CoolMasterNet host."
}
}
}
}

View File

@ -9,8 +9,8 @@
},
"manual_input": {
"data": {
"host": "Host",
"port": "Port"
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
}
},
"link": {
@ -22,7 +22,9 @@
"description": "Do you want to configure Home Assistant to connect to the deCONZ gateway provided by the Hass.io add-on {addon}?"
}
},
"error": { "no_key": "Couldn't get an API key" },
"error": {
"no_key": "Couldn't get an API key"
},
"abort": {
"already_configured": "Bridge is already configured",
"already_in_progress": "Config flow for bridge is already in progress.",
@ -98,4 +100,4 @@
"side_6": "Side 6"
}
}
}
}

View File

@ -1,22 +1,22 @@
{
"title": "devolo Home Control",
"config": {
"abort": {
"already_configured": "This Home Control Central Unit is already in use."
},
"error": {
"invalid_credentials": "Incorrect user name and/or password."
"title": "devolo Home Control",
"config": {
"abort": {
"already_configured": "This Home Control Central Unit is already in use."
},
"error": {
"invalid_credentials": "Incorrect user name and/or password."
},
"step": {
"user": {
"data": {
"username": "E-Mail-Address / devolo ID",
"password": "[%key:common::config_flow::data::password%]",
"mydevolo_url": "mydevolo URL",
"home_control_url": "Home Control URL"
},
"step": {
"user": {
"data": {
"username": "E-Mail-Address / devolo ID",
"password": "Password",
"mydevolo_url": "mydevolo URL",
"home_control_url": "Home Control URL"
},
"title": "devolo Home Control"
}
}
"title": "devolo Home Control"
}
}
}
}
}

View File

@ -2,7 +2,9 @@
"options": {
"step": {
"init": {
"data": { "events": "Comma separated list of events." },
"data": {
"events": "Comma separated list of events."
},
"description": "Add an comma separated event name for each event you wish to track. After entering them here, use the DoorBird app to assign them to a specific event. See the documentation at https://www.home-assistant.io/integrations/doorbird/#events. Example: somebody_pressed_the_button, motion"
}
}
@ -13,7 +15,7 @@
"title": "Connect to the DoorBird",
"data": {
"password": "[%key:common::config_flow::data::password%]",
"host": "Host (IP Address)",
"host": "[%key:common::config_flow::data::host%]",
"name": "Device Name",
"username": "[%key:common::config_flow::data::username%]"
}
@ -31,4 +33,4 @@
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
}
}
}
}

View File

@ -4,7 +4,9 @@
"user": {
"title": "ecobee API key",
"description": "Please enter the API key obtained from ecobee.com.",
"data": { "api_key": "API Key" }
"data": {
"api_key": "[%key:common::config_flow::data::api_key%]"
}
},
"authorize": {
"title": "Authorize app on ecobee.com",
@ -19,4 +21,4 @@
"one_instance_only": "This integration currently supports only one ecobee instance."
}
}
}
}

View File

@ -4,7 +4,10 @@
"step": {
"user": {
"description": "Set up your Elgato Key Light to integrate with Home Assistant.",
"data": { "host": "Host or IP address", "port": "Port number" }
"data": {
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
}
},
"zeroconf_confirm": {
"description": "Do you want to add the Elgato Key Light with serial number `{serial_number}` to Home Assistant?",
@ -19,4 +22,4 @@
"connection_error": "Failed to connect to Elgato Key Light device."
}
}
}
}

View File

@ -7,8 +7,8 @@
"data": {
"protocol": "Protocol",
"address": "The IP address or domain or serial port if connecting via serial.",
"username": "Username (secure only).",
"password": "Password (secure only).",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"prefix": "A unique prefix (leave blank if you only have one ElkM1).",
"temperature_unit": "The temperature unit ElkM1 uses."
}
@ -24,4 +24,4 @@
"address_already_configured": "An ElkM1 with this address is already configured"
}
}
}
}

View File

@ -11,11 +11,16 @@
},
"step": {
"user": {
"data": { "host": "Host", "port": "Port" },
"data": {
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
},
"description": "Please enter connection settings of your [ESPHome](https://esphomelib.com/) node."
},
"authenticate": {
"data": { "password": "Password" },
"data": {
"password": "[%key:common::config_flow::data::password%]"
},
"description": "Please enter the password you set in your configuration for {name}."
},
"discovery_confirm": {
@ -25,4 +30,4 @@
},
"flow_title": "ESPHome: {name}"
}
}
}

View File

@ -5,8 +5,8 @@
"user": {
"title": "Flick Login Credentials",
"data": {
"username": "Username",
"password": "Password",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"client_id": "Client ID (Optional)",
"client_secret": "Client Secret (Optional)"
}

View File

@ -10,13 +10,15 @@
"description": "In order to access the Flume Personal API, you will need to request a 'Client ID' and 'Client Secret' at https://portal.flumetech.com/settings#token",
"title": "Connect to your Flume Account",
"data": {
"username": "Username",
"username": "[%key:common::config_flow::data::username%]",
"client_secret": "Client Secret",
"client_id": "Client ID",
"password": "Password"
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"abort": { "already_configured": "This account is already configured" }
"abort": {
"already_configured": "This account is already configured"
}
}
}
}

View File

@ -3,7 +3,10 @@
"step": {
"user": {
"title": "Freebox",
"data": { "host": "Host", "port": "Port" }
"data": {
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
}
},
"link": {
"title": "Link Freebox router",
@ -15,6 +18,8 @@
"connection_failed": "Failed to connect, please try again",
"unknown": "Unknown error: please retry later"
},
"abort": { "already_configured": "Host already configured" }
"abort": {
"already_configured": "Host already configured"
}
}
}
}

View File

@ -5,16 +5,16 @@
"user": {
"description": "Enter your AVM FRITZ!Box information.",
"data": {
"host": "Host or IP address",
"username": "Username",
"password": "Password"
"host": "[%key:common::config_flow::data::host%]",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
},
"confirm": {
"description": "Do you want to set up {name}?",
"data": {
"username": "Username",
"password": "Password"
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
@ -28,4 +28,4 @@
"auth_failed": "Username and/or password are incorrect."
}
}
}
}

View File

@ -11,10 +11,13 @@
},
"step": {
"user": {
"data": { "password": "Password", "username": "Username" },
"data": {
"password": "[%key:common::config_flow::data::password%]",
"username": "[%key:common::config_flow::data::username%]"
},
"description": "Enter your credentials.",
"title": "Garmin Connect"
}
}
}
}
}

View File

@ -5,10 +5,10 @@
"title": "Setup Glances",
"data": {
"name": "Name",
"host": "Host",
"username": "Username",
"password": "Password",
"port": "Port",
"host": "[%key:common::config_flow::data::host%]",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"port": "[%key:common::config_flow::data::port%]",
"version": "Glances API Version (2 or 3)",
"ssl": "Use SSL/TLS to connect to the Glances system",
"verify_ssl": "Verify the certification of the system"
@ -19,14 +19,18 @@
"cannot_connect": "Unable to connect to host",
"wrong_version": "Version not supported (2 or 3 only)"
},
"abort": { "already_configured": "Host is already configured." }
"abort": {
"already_configured": "Host is already configured."
}
},
"options": {
"step": {
"init": {
"description": "Configure options for Glances",
"data": { "scan_interval": "Update frequency" }
"data": {
"scan_interval": "Update frequency"
}
}
}
}
}
}

View File

@ -13,15 +13,17 @@
"user": {
"data": {
"email": "[%key:common::config_flow::data::email%]",
"password": "Password",
"password": "[%key:common::config_flow::data::password%]",
"authorization_code": "Authorization Code (required for manual authentication)"
},
"title": "Google Hangouts Login"
},
"2fa": {
"data": { "2fa": "2FA Pin" },
"data": {
"2fa": "2FA Pin"
},
"title": "2-Factor-Authentication"
}
}
}
}
}

View File

@ -4,7 +4,10 @@
"step": {
"user": {
"title": "Setup Logitech Harmony Hub",
"data": { "host": "Hostname or IP Address", "name": "Hub Name" }
"data": {
"host": "[%key:common::config_flow::data::host%]",
"name": "Hub Name"
}
},
"link": {
"title": "Setup Logitech Harmony Hub",
@ -15,7 +18,9 @@
"cannot_connect": "Failed to connect, please try again",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "Device is already configured" }
"abort": {
"already_configured": "Device is already configured"
}
},
"options": {
"step": {
@ -28,4 +33,4 @@
}
}
}
}
}

View File

@ -4,7 +4,9 @@
"user": {
"title": "Connect to Heos",
"description": "Please enter the host name or IP address of a Heos device (preferably one connected via wire to the network).",
"data": { "access_token": "Host", "host": "Host" }
"data": {
"host": "[%key:common::config_flow::data::host%]"
}
}
},
"error": {

View File

@ -19,9 +19,9 @@
"step": {
"user": {
"data": {
"password": "Password",
"password": "[%key:common::config_flow::data::password%]",
"url": "URL",
"username": "User name"
"username": "[%key:common::config_flow::data::username%]"
},
"description": "Enter device access details. Specifying username and password is optional, but enables support for more integration features. On the other hand, use of an authorized connection may cause problems accessing the device web interface from outside Home Assistant while the integration is active, and the other way around.",
"title": "Configure Huawei LTE"

View File

@ -4,7 +4,7 @@
"init": {
"title": "Pick Hue bridge",
"data": {
"host": "Host"
"host": "[%key:common::config_flow::data::host%]"
}
},
"link": {
@ -48,4 +48,4 @@
"remote_double_button_short_press": "Both \"{subtype}\" released"
}
}
}
}

View File

@ -5,13 +5,13 @@
"user": {
"title": "Connect to the PowerView Hub",
"data": {
"host": "IP Address"
"host": "[%key:common::config_flow::data::ip%]"
}
},
"link": {
"title": "Connect to the PowerView Hub",
"description": "Do you want to setup {name} ({host})?"
}
}
},
"error": {
"cannot_connect": "Failed to connect, please try again",
@ -21,4 +21,4 @@
"already_configured": "Device is already configured"
}
}
}
}

View File

@ -5,8 +5,8 @@
"title": "Connect to iAqualink",
"description": "Please enter the username and password for your iAqualink account.",
"data": {
"username": "Username / Email Address",
"password": "Password"
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
@ -17,4 +17,4 @@
"already_setup": "You can only configure a single iAqualink connection."
}
}
}
}

View File

@ -6,19 +6,23 @@
"description": "Enter your credentials",
"data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "Password",
"password": "[%key:common::config_flow::data::password%]",
"with_family": "With family"
}
},
"trusted_device": {
"title": "iCloud trusted device",
"description": "Select your trusted device",
"data": { "trusted_device": "Trusted device" }
"data": {
"trusted_device": "Trusted device"
}
},
"verification_code": {
"title": "iCloud verification code",
"description": "Please enter the verification code you just received from iCloud",
"data": { "verification_code": "Verification code" }
"data": {
"verification_code": "Verification code"
}
}
},
"error": {
@ -31,4 +35,4 @@
"no_device": "None of your devices have \"Find my iPhone\" activated"
}
}
}
}

View File

@ -8,8 +8,8 @@
"user": {
"description": "Please enter the host information for your Konnected Panel.",
"data": {
"host": "Konnected device IP address",
"port": "Konnected device port"
"host": "[%key:common::config_flow::data::ip%]",
"port": "[%key:common::config_flow::data::port%]"
}
},
"confirm": {
@ -97,7 +97,11 @@
}
}
},
"error": { "bad_host": "Invalid Override API host url" },
"abort": { "not_konn_panel": "Not a recognized Konnected.io device" }
"error": {
"bad_host": "Invalid Override API host url"
},
"abort": {
"not_konn_panel": "Not a recognized Konnected.io device"
}
}
}

View File

@ -3,7 +3,10 @@
"step": {
"user": {
"title": "Life360 Account Info",
"data": { "username": "Username", "password": "Password" },
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
},
"description": "To set advanced options, see [Life360 documentation]({docs_url}).\nYou may want to do that before adding accounts."
}
},
@ -21,4 +24,4 @@
"user_already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
}
}
}
}

View File

@ -6,7 +6,7 @@
"description": "Enter your credentials",
"data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "Password"
"password": "[%key:common::config_flow::data::password%]"
}
}
},
@ -16,6 +16,8 @@
"wrong_login": "Login error: please check your email & password",
"unknown": "Unknown error: please retry later (usually not between 11PM and 2AM)"
},
"abort": { "already_configured": "Account already configured" }
"abort": {
"already_configured": "Account already configured"
}
}
}
}

View File

@ -6,7 +6,7 @@
"description": "Connect using your MELCloud account.",
"data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "MELCloud password."
"password": "[%key:common::config_flow::data::password%]"
}
}
},
@ -19,4 +19,4 @@
"already_configured": "MELCloud integration already configured for this email. Access token has been refreshed."
}
}
}
}

View File

@ -5,10 +5,10 @@
"title": "Set up Mikrotik Router",
"data": {
"name": "Name",
"host": "Host",
"username": "Username",
"password": "Password",
"port": "Port",
"host": "[%key:common::config_flow::data::host%]",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"port": "[%key:common::config_flow::data::port%]",
"verify_ssl": "Use ssl"
}
}
@ -18,7 +18,9 @@
"cannot_connect": "Connection Unsuccessful",
"wrong_credentials": "Wrong Credentials"
},
"abort": { "already_configured": "Mikrotik is already configured" }
"abort": {
"already_configured": "Mikrotik is already configured"
}
},
"options": {
"step": {
@ -31,4 +33,4 @@
}
}
}
}
}

View File

@ -4,7 +4,10 @@
"user": {
"title": "Link your Minecraft Server",
"description": "Set up your Minecraft Server instance to allow monitoring.",
"data": { "name": "Name", "host": "Host" }
"data": {
"name": "Name",
"host": "[%key:common::config_flow::data::host%]"
}
}
},
"error": {
@ -12,6 +15,8 @@
"cannot_connect": "Failed to connect to server. Please check the host and port and try again. Also ensure that you are running at least Minecraft version 1.7 on your server.",
"invalid_ip": "IP address is invalid (MAC address could not be determined). Please correct it and try again."
},
"abort": { "already_configured": "Host is already configured." }
"abort": {
"already_configured": "Host is already configured."
}
}
}
}

View File

@ -4,7 +4,7 @@
"user": {
"title": "Connect to the device",
"data": {
"port": "Serial port",
"port": "[%key:common::config_flow::data::port%]",
"source_1": "Name of source #1",
"source_2": "Name of source #2",
"source_3": "Name of source #3",
@ -18,7 +18,9 @@
"cannot_connect": "Failed to connect, please try again",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "Device is already configured" }
"abort": {
"already_configured": "Device is already configured"
}
},
"options": {
"step": {
@ -35,4 +37,4 @@
}
}
}
}
}

View File

@ -5,22 +5,26 @@
"description": "Please enter the connection information of your MQTT broker.",
"data": {
"broker": "Broker",
"port": "Port",
"username": "Username",
"password": "Password",
"port": "[%key:common::config_flow::data::port%]",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"discovery": "Enable discovery"
}
},
"hassio_confirm": {
"title": "MQTT Broker via Hass.io add-on",
"description": "Do you want to configure Home Assistant to connect to the MQTT broker provided by the Hass.io add-on {addon}?",
"data": { "discovery": "Enable discovery" }
"data": {
"discovery": "Enable discovery"
}
}
},
"abort": {
"single_instance_allowed": "Only a single configuration of MQTT is allowed."
},
"error": { "cannot_connect": "Unable to connect to the broker." }
"error": {
"cannot_connect": "Unable to connect to the broker."
}
},
"device_automation": {
"trigger_type": {
@ -44,4 +48,4 @@
"button_6": "Sixth button"
}
}
}
}

View File

@ -3,7 +3,10 @@
"step": {
"user": {
"title": "Connect to the MyQ Gateway",
"data": { "username": "Username", "password": "Password" }
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"error": {
@ -11,6 +14,8 @@
"invalid_auth": "Invalid authentication",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "MyQ is already configured" }
"abort": {
"already_configured": "MyQ is already configured"
}
}
}
}

View File

@ -4,8 +4,8 @@
"user": {
"title": "Neato Account Info",
"data": {
"username": "Username",
"password": "Password",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"vendor": "Vendor"
},
"description": "See [Neato documentation]({docs_url})."
@ -15,10 +15,12 @@
"invalid_credentials": "Invalid credentials",
"unexpected_error": "Unexpected error"
},
"create_entry": { "default": "See [Neato documentation]({docs_url})." },
"create_entry": {
"default": "See [Neato documentation]({docs_url})."
},
"abort": {
"already_configured": "Already configured",
"invalid_credentials": "Invalid credentials"
}
}
}
}

View File

@ -3,7 +3,10 @@
"step": {
"user": {
"title": "Connect to mynexia.com",
"data": { "username": "Username", "password": "Password" }
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"error": {
@ -11,6 +14,8 @@
"invalid_auth": "Invalid authentication",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "This nexia home is already configured" }
"abort": {
"already_configured": "This nexia home is already configured"
}
}
}
}

View File

@ -3,13 +3,18 @@
"step": {
"user": {
"title": "Fill in your information",
"data": { "username": "Username/Email Address", "password": "Password" }
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"error": {
"invalid_credentials": "Invalid username or password",
"no_devices": "No devices found in account"
},
"abort": { "already_configured": "This username is already in use." }
"abort": {
"already_configured": "This username is already in use."
}
}
}
}

View File

@ -6,17 +6,19 @@
"invalid_auth": "Invalid authentication",
"invalid_thermostat": "The thermostat serial number is invalid."
},
"abort": { "already_configured": "The thermostat is already configured" },
"abort": {
"already_configured": "The thermostat is already configured"
},
"step": {
"user": {
"title": "Connect to the NuHeat",
"description": "You will need to obtain your thermostat\u2019s numeric serial number or ID by logging into https://MyNuHeat.com and selecting your thermostat(s).",
"data": {
"username": "Username",
"password": "Password",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"serial_number": "Serial number of the thermostat."
}
}
}
}
}
}

View File

@ -4,26 +4,33 @@
"user": {
"title": "Connect to the NUT server",
"data": {
"host": "Host",
"port": "Port",
"username": "Username",
"password": "Password"
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
},
"ups": {
"title": "Choose the UPS to Monitor",
"data": { "alias": "Alias", "resources": "Resources" }
"data": {
"alias": "Alias",
"resources": "Resources"
}
},
"resources": {
"title": "Choose the Resources to Monitor",
"data": { "resources": "Resources" }
"data": {
"resources": "Resources"
}
}
},
"error": {
"cannot_connect": "Failed to connect, please try again",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "Device is already configured" }
"abort": {
"already_configured": "Device is already configured"
}
},
"options": {
"step": {
@ -36,4 +43,4 @@
}
}
}
}
}

View File

@ -5,7 +5,7 @@
"description": "If a METAR station code is not specified, the latitude and longitude will be used to find the closest station.",
"title": "Connect to the National Weather Service",
"data": {
"api_key": "API key (email)",
"api_key": "[%key:common::config_flow::data::api_key%]",
"latitude": "Latitude",
"longitude": "Longitude",
"station": "METAR station code"
@ -16,6 +16,8 @@
"cannot_connect": "Failed to connect, please try again",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "Device is already configured" }
"abort": {
"already_configured": "Device is already configured"
}
}
}
}

View File

@ -23,16 +23,16 @@
},
"manual_input": {
"data": {
"host": "Host",
"port": "Port"
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
},
"title": "Configure ONVIF device"
},
"auth": {
"title": "Configure authentication",
"data": {
"username": "Username",
"password": "Password"
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
},
"configure_profile": {
@ -55,4 +55,4 @@
}
}
}
}
}

View File

@ -4,7 +4,7 @@
"user": {
"title": "Fill in your information",
"data": {
"api_key": "OpenUV API Key",
"api_key": "[%key:common::config_flow::data::api_key%]",
"elevation": "Elevation",
"latitude": "Latitude",
"longitude": "Longitude"
@ -16,4 +16,4 @@
"invalid_api_key": "Invalid API key"
}
}
}
}

View File

@ -6,7 +6,7 @@
"title": "Setup your TV",
"description": "Enter your Panasonic Viera TV's IP address",
"data": {
"host": "IP address",
"host": "[%key:common::config_flow::data::ip%]",
"name": "Name"
}
},

View File

@ -14,8 +14,8 @@
"manual_setup": {
"title": "Manual Plex Configuration",
"data": {
"host": "Host (Optional if Token provided)",
"port": "Port",
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]",
"ssl": "Use SSL",
"verify_ssl": "Verify SSL certificate",
"token": "Token (Optional)"
@ -24,7 +24,9 @@
"select_server": {
"title": "Select Plex server",
"description": "Multiple servers available, select one:",
"data": { "server": "Server" }
"data": {
"server": "Server"
}
}
},
"error": {
@ -57,4 +59,4 @@
}
}
}
}
}

View File

@ -4,7 +4,9 @@
"user": {
"title": "Connect to your Rachio device",
"description": "You will need the API Key from https://app.rach.io/. Select 'Account Settings, and then click on 'GET API KEY'.",
"data": { "api_key": "The API key for the Rachio account." }
"data": {
"api_key": "[%key:common::config_flow::data::api_key%]"
}
}
},
"error": {
@ -12,7 +14,9 @@
"invalid_auth": "Invalid authentication",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "Device is already configured" }
"abort": {
"already_configured": "Device is already configured"
}
},
"options": {
"step": {
@ -23,4 +27,4 @@
}
}
}
}
}

View File

@ -5,8 +5,8 @@
"title": "Fill in your information",
"data": {
"ip_address": "Hostname or IP Address",
"password": "Password",
"port": "Port"
"password": "[%key:common::config_flow::data::password%]",
"port": "[%key:common::config_flow::data::port%]"
}
}
},
@ -18,4 +18,4 @@
"already_configured": "This RainMachine controller is already configured."
}
}
}
}

View File

@ -3,17 +3,24 @@
"step": {
"user": {
"title": "Sign-in with Ring account",
"data": { "username": "Username", "password": "Password" }
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
},
"2fa": {
"title": "Two-factor authentication",
"data": { "2fa": "Two-factor code" }
"data": {
"2fa": "Two-factor code"
}
}
},
"error": {
"invalid_auth": "Invalid authentication",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "Device is already configured" }
"abort": {
"already_configured": "Device is already configured"
}
}
}
}

View File

@ -5,9 +5,9 @@
"title": "Connect to the device",
"description": "Currently retrieving the BLID and password is a manual process. Please follow the steps outlined in the documentation at: https://www.home-assistant.io/integrations/roomba/#retrieving-your-credentials",
"data": {
"host": "Hostname or IP Address",
"host": "[%key:common::config_flow::data::host%]",
"blid": "BLID",
"password": "Password",
"password": "[%key:common::config_flow::data::password%]",
"continuous": "Continuous",
"delay": "Delay"
}
@ -19,7 +19,12 @@
},
"options": {
"step": {
"init": { "data": { "continuous": "Continuous", "delay": "Delay" } }
"init": {
"data": {
"continuous": "Continuous",
"delay": "Delay"
}
}
}
}
}
}

View File

@ -4,7 +4,10 @@
"step": {
"user": {
"description": "Enter your Samsung TV information. If you never connected Home Assistant before you should see a popup on your TV asking for authorization.",
"data": { "host": "Host or IP address", "name": "Name" }
"data": {
"host": "[%key:common::config_flow::data::host%]",
"name": "Name"
}
},
"confirm": {
"title": "Samsung TV",
@ -19,4 +22,4 @@
"not_supported": "This Samsung TV device is currently not supported."
}
}
}
}

View File

@ -5,7 +5,7 @@
"title": "Connect to your Sense Energy Monitor",
"data": {
"email": "[%key:common::config_flow::data::email%]",
"password": "Password"
"password": "[%key:common::config_flow::data::password%]"
}
}
},
@ -14,6 +14,8 @@
"invalid_auth": "Invalid authentication",
"unknown": "Unexpected error"
},
"abort": { "already_configured": "Device is already configured" }
"abort": {
"already_configured": "Device is already configured"
}
}
}
}

View File

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

View File

@ -6,11 +6,15 @@
"data": {
"name": "The name of this installation",
"site_id": "The SolarEdge site-id",
"api_key": "The API key for this site"
"api_key": "[%key:common::config_flow::data::api_key%]"
}
}
},
"error": { "site_exists": "This site_id is already configured" },
"abort": { "site_exists": "This site_id is already configured" }
"error": {
"site_exists": "This site_id is already configured"
},
"abort": {
"site_exists": "This site_id is already configured"
}
}
}
}

View File

@ -4,7 +4,7 @@
"user": {
"title": "Define your Solar-Log connection",
"data": {
"host": "The hostname or ip-address of your Solar-Log device",
"host": "[%key:common::config_flow::data::host%]",
"name": "The prefix to be used for your Solar-Log sensors"
}
}
@ -13,6 +13,8 @@
"already_configured": "Device is already configured",
"cannot_connect": "Failed to connect, please verify host address"
},
"abort": { "already_configured": "Device is already configured" }
"abort": {
"already_configured": "Device is already configured"
}
}
}
}

View File

@ -7,13 +7,18 @@
"result_error": "SOMA Connect responded with error status.",
"connection_error": "Failed to connect to SOMA Connect."
},
"create_entry": { "default": "Successfully authenticated with Soma." },
"create_entry": {
"default": "Successfully authenticated with Soma."
},
"step": {
"user": {
"data": { "host": "Host", "port": "Port" },
"data": {
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
},
"description": "Please enter connection settings of your SOMA Connect.",
"title": "SOMA Connect"
}
}
}
}
}

View File

@ -4,22 +4,32 @@
"auth_app": {
"title": "Application credentials",
"description": "Application ID and secret code from <a href=\"https://my.starline.ru/developer\" target=\"_blank\">StarLine developer account</a>",
"data": { "app_id": "App ID", "app_secret": "Secret" }
"data": {
"app_id": "App ID",
"app_secret": "Secret"
}
},
"auth_user": {
"title": "User credentials",
"description": "StarLine account email and password",
"data": { "username": "Username", "password": "Password" }
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
},
"auth_mfa": {
"title": "Two-factor authorization",
"description": "Enter the code sent to phone {phone_number}",
"data": { "mfa_code": "SMS code" }
"data": {
"mfa_code": "SMS code"
}
},
"auth_captcha": {
"title": "Captcha",
"description": "{captcha_img}",
"data": { "captcha_code": "Code from image" }
"data": {
"captcha_code": "Code from image"
}
}
},
"error": {
@ -28,4 +38,4 @@
"error_auth_mfa": "Incorrect code"
}
}
}
}

View File

@ -5,11 +5,11 @@
"user": {
"title": "Synology DSM",
"data": {
"host": "Host",
"port": "Port (Optional)",
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]",
"ssl": "Use SSL/TLS to connect to your NAS",
"username": "Username",
"password": "Password"
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
},
"2sa": {
@ -23,9 +23,9 @@
"description": "Do you want to setup {name} ({host})?",
"data": {
"ssl": "Use SSL/TLS to connect to your NAS",
"username": "Username",
"password": "Password",
"port": "Port (Optional)"
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"port": "[%key:common::config_flow::data::port%]"
}
}
},
@ -36,7 +36,9 @@
"otp_failed": "Two-step authentication failed, retry with a new pass code",
"unknown": "Unknown error: please check logs to get more details"
},
"abort": { "already_configured": "Host already configured" }
"abort": {
"already_configured": "Host already configured"
}
},
"options": {
"step": {
@ -47,4 +49,4 @@
}
}
}
}
}

View File

@ -1,9 +1,14 @@
{
"config": {
"abort": { "already_configured": "Device is already configured" },
"abort": {
"already_configured": "Device is already configured"
},
"step": {
"user": {
"data": { "password": "Password", "username": "Username" },
"data": {
"password": "[%key:common::config_flow::data::password%]",
"username": "[%key:common::config_flow::data::username%]"
},
"title": "Connect to your Tado account"
}
},
@ -18,9 +23,11 @@
"step": {
"init": {
"description": "Fallback mode will switch to Smart Schedule at next schedule switch after manually adjusting a zone.",
"data": { "fallback": "Enable fallback mode." },
"data": {
"fallback": "Enable fallback mode."
},
"title": "Adjust Tado options."
}
}
}
}
}

View File

@ -6,13 +6,20 @@
"authorize_url_timeout": "Timeout generating authorize url.",
"unknown": "Unknown error occurred"
},
"error": { "auth_error": "Authentication error, please try again" },
"error": {
"auth_error": "Authentication error, please try again"
},
"step": {
"auth": {
"description": "To link your TelldusLive account:\n 1. Click the link below\n 2. Login to Telldus Live\n 3. Authorize **{app_name}** (click **Yes**).\n 4. Come back here and click **SUBMIT**.\n\n [Link TelldusLive account]({auth_url})",
"title": "Authenticate against TelldusLive"
},
"user": { "data": { "host": "Host" }, "title": "Pick endpoint." }
"user": {
"data": {
"host": "[%key:common::config_flow::data::host%]"
},
"title": "Pick endpoint."
}
}
}
}
}

View File

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

View File

@ -12,11 +12,11 @@
"step": {
"user": {
"data": {
"access_token": "Access token"
"access_token": "[%key:common::config_flow::data::access_token%]"
},
"description": "Enter your access token from https://developer.tibber.com/settings/accesstoken",
"title": "Tibber"
}
}
}
}
}

View File

@ -5,15 +5,17 @@
"title": "Link your Toon account",
"description": "Authenticate with your Eneco Toon account (not the developer account).",
"data": {
"username": "Username",
"password": "Password",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"tenant": "Tenant"
}
},
"display": {
"title": "Select display",
"description": "Select the Toon display to connect with.",
"data": { "display": "Choose display" }
"data": {
"display": "Choose display"
}
}
},
"error": {
@ -28,4 +30,4 @@
"no_app": "You need to configure Toon before being able to authenticate with it. [Please read the instructions](https://www.home-assistant.io/components/toon/)."
}
}
}
}

View File

@ -3,10 +3,17 @@
"step": {
"user": {
"title": "Total Connect",
"data": { "username": "Username", "password": "Password" }
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"error": { "login": "Login error: please check your username & password" },
"abort": { "already_configured": "Account already configured" }
"error": {
"login": "Login error: please check your username & password"
},
"abort": {
"already_configured": "Account already configured"
}
}
}
}

View File

@ -4,7 +4,10 @@
"auth": {
"title": "Enter security code",
"description": "You can find the security code on the back of your gateway.",
"data": { "host": "Host", "security_code": "Security Code" }
"data": {
"host": "[%key:common::config_flow::data::host%]",
"security_code": "Security Code"
}
}
},
"error": {
@ -17,4 +20,4 @@
"already_in_progress": "Bridge configuration is already in progress."
}
}
}
}

View File

@ -5,10 +5,10 @@
"title": "Setup Transmission Client",
"data": {
"name": "Name",
"host": "Host",
"username": "Username",
"password": "Password",
"port": "Port"
"host": "[%key:common::config_flow::data::host%]",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"port": "[%key:common::config_flow::data::port%]"
}
}
},
@ -17,14 +17,18 @@
"wrong_credentials": "Wrong username or password",
"cannot_connect": "Unable to Connect to host"
},
"abort": { "already_configured": "Host is already configured." }
"abort": {
"already_configured": "Host is already configured."
}
},
"options": {
"step": {
"init": {
"title": "Configure options for Transmission",
"data": { "scan_interval": "Update frequency" }
"data": {
"scan_interval": "Update frequency"
}
}
}
}
}
}

View File

@ -5,11 +5,15 @@
"title": "Enter Username and Password",
"data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "Password"
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"error": { "invalid_login": "Invalid username or password" },
"abort": { "already_setup": "Only one Vesync instance is allowed" }
"error": {
"invalid_login": "Invalid username or password"
},
"abort": {
"already_setup": "Only one Vesync instance is allowed"
}
}
}
}

View File

@ -5,8 +5,8 @@
"title": "Connect to the Vilfo Router",
"description": "Set up the Vilfo Router integration. You need your Vilfo Router hostname/IP and an API access token. For additional information on this integration and how to get those details, visit: https://www.home-assistant.io/integrations/vilfo",
"data": {
"host": "Router hostname or IP",
"access_token": "Access token for the Vilfo Router API"
"host": "[%key:common::config_flow::data::host%]",
"access_token": "[%key:common::config_flow::data::access_token%]"
}
}
},
@ -19,4 +19,4 @@
"already_configured": "This Vilfo Router is already configured."
}
}
}
}

View File

@ -6,7 +6,7 @@
"description": "An [%key:common::config_flow::data::access_token%] is only needed for TVs. If you are configuring a TV and do not have an [%key:common::config_flow::data::access_token%] yet, leave it blank to go through a pairing process.",
"data": {
"name": "Name",
"host": "<Host/IP>:<Port>",
"host": "[%key:common::config_flow::data::host%]",
"device_class": "Device Type",
"access_token": "[%key:common::config_flow::data::access_token%]"
}
@ -14,7 +14,9 @@
"pair_tv": {
"title": "Complete Pairing Process",
"description": "Your TV should be displaying a code. Enter that code into the form and then continue to the next step to complete the pairing.",
"data": { "pin": "PIN" }
"data": {
"pin": "PIN"
}
},
"pairing_complete": {
"title": "Pairing Complete",
@ -49,4 +51,4 @@
}
}
}
}
}

View File

@ -4,17 +4,21 @@
"step": {
"user": {
"description": "Set up your WLED to integrate with Home Assistant.",
"data": { "host": "Host or IP address" }
"data": {
"host": "[%key:common::config_flow::data::host%]"
}
},
"zeroconf_confirm": {
"description": "Do you want to add the WLED named `{name}` to Home Assistant?",
"title": "Discovered WLED device"
}
},
"error": { "connection_error": "Failed to connect to WLED device." },
"error": {
"connection_error": "Failed to connect to WLED device."
},
"abort": {
"already_configured": "This WLED device is already configured.",
"connection_error": "Failed to connect to WLED device."
}
}
}
}

View File

@ -12,7 +12,7 @@
"title": "Connect to a Xiaomi Gateway",
"description": "You will need the API Token, see https://www.home-assistant.io/integrations/vacuum.xiaomi_miio/#retrieving-the-access-token for instructions.",
"data": {
"host": "IP adress",
"host": "[%key:common::config_flow::data::ip%]",
"token": "API Token",
"name": "Name of the Gateway"
}

View File

@ -5,7 +5,7 @@
"title": "Set up Z-Wave",
"description": "See https://www.home-assistant.io/docs/z-wave/installation/ for information on the configuration variables",
"data": {
"usb_path": "USB Path",
"usb_path": "[%key:common::config_flow::data::usb_path%]",
"network_key": "Network Key (leave blank to auto-generate)"
}
}
@ -30,4 +30,4 @@
"ready": "Ready"
}
}
}
}

View File

@ -29,6 +29,7 @@
"username": "Username",
"password": "Password",
"host": "Host",
"ip": "IP address",
"port": "Port",
"usb_path": "USB Device Path",
"access_token": "Access Token",

View File

@ -180,7 +180,7 @@ def gen_platform_strings_schema(config: Config, integration: Integration):
"""
if not value.startswith(f"{integration.domain}__"):
raise vol.Invalid(
f"Device class need to start with '{integration.domain}__'. Key {value} is invalid"
f"Device class need to start with '{integration.domain}__'. Key {value} is invalid. See https://developers.home-assistant.io/docs/internationalization/core#stringssensorjson"
)
slug_friendly = value.replace("__", "_", 1)

View File

@ -324,84 +324,60 @@ def find_frontend_states():
migrate_project_keys_translations(FRONTEND_PROJECT_ID, CORE_PROJECT_ID, to_migrate)
def clean_wled():
"""Clean WLED strings."""
offending_translation = "Wykryto urządzenie [%key:component::wled::title%]"
ignore_lang = ["pl"]
core_api = get_api(CORE_PROJECT_ID)
translations = core_api.keys_list(
{
"include_translations": 1,
"filter_keys": ",".join(
[
"component::wled::config::flow_title",
"component::wled::config::step::user::description",
"component::wled::config::step::user::data::host",
"component::wled::config::step::zeroconf_confirm::description",
"component::wled::config::step::zeroconf_confirm::title",
"component::wled::config::error::connection_error",
"component::wled::config::abort::already_configured",
"component::wled::config::abort::connection_error",
]
),
}
)
bad_data = {}
for translation in translations:
bad_key_data = []
def apply_data_references(to_migrate):
"""Apply references."""
for strings_file in INTEGRATIONS_DIR.glob("*/strings.json"):
strings = json.loads(strings_file.read_text())
steps = strings.get("config", {}).get("step")
for key_trans in translation["translations"]:
if (
key_trans["translation"] == offending_translation
and key_trans["language_iso"] not in ignore_lang
):
bad_key_data.append(key_trans["translation_id"])
if not steps:
continue
if bad_key_data:
bad_data[translation["key_id"]] = bad_key_data
changed = False
pprint(
[
{
"key_id": key_id,
"translations": [
{"translation_id": trans_id, "translation": ""}
for trans_id in trans_ids
],
}
for key_id, trans_ids in bad_data.items()
]
)
print(sum(len(val) for val in bad_data.values()))
for step_data in steps.values():
step_data = step_data.get("data", {})
for key, value in step_data.items():
return
if key in to_migrate and value != to_migrate[key]:
if key.split("_")[0].lower() in value.lower():
step_data[key] = to_migrate[key]
changed = True
elif value.startswith("[%key"):
pass
else:
print(
f"{strings_file}: Skipped swapping '{key}': '{value}' does not contain '{key}'"
)
core_api.keys_bulk_update(
[
{
"key_id": key_id,
"translations": [
{"translation_id": trans_id, "translation": ""}
for trans_id in trans_ids
],
}
for key_id, trans_ids in bad_data.items()
]
)
if not changed:
continue
strings_file.write_text(json.dumps(strings, indent=2))
def run():
"""Migrate translations."""
# clean_wled()
apply_data_references(
{
"host": "[%key:common::config_flow::data::host%]",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"port": "[%key:common::config_flow::data::port%]",
"usb_path": "[%key:common::config_flow::data::usb_path%]",
"access_token": "[%key:common::config_flow::data::access_token%]",
"api_key": "[%key:common::config_flow::data::api_key%]",
}
)
# Rename existing keys to common keys,
# Old keys have been updated with reference to the common key
rename_keys(
CORE_PROJECT_ID,
{
"component::icloud::config::step::user::data::username": "common::config_flow::data::email",
},
)
# rename_keys(
# CORE_PROJECT_ID,
# {
# "component::blebox::config::step::user::data::host": "common::config_flow::data::ip",
# },
# )
# find_frontend_states()