From fe46fd24bd77465e1f20acdbd7991c85375a4226 Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Fri, 13 Dec 2024 13:34:17 +0100 Subject: [PATCH] Improve data description and title for Cookidoo integration (#133106) * fix data description typo for cookidoo * use placeholder for cookidoo as it is non-translatable * set title of language step * fix for reauth * fix reauth --- homeassistant/components/cookidoo/config_flow.py | 3 +++ homeassistant/components/cookidoo/strings.json | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/cookidoo/config_flow.py b/homeassistant/components/cookidoo/config_flow.py index d523de96b01..58e99a70907 100644 --- a/homeassistant/components/cookidoo/config_flow.py +++ b/homeassistant/components/cookidoo/config_flow.py @@ -79,6 +79,7 @@ class CookidooConfigFlow(ConfigFlow, domain=DOMAIN): ), suggested_values=user_input, ), + description_placeholders={"cookidoo": "Cookidoo"}, errors=errors, ) @@ -99,6 +100,7 @@ class CookidooConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="language", data_schema=vol.Schema(self.LANGUAGE_DATA_SCHEMA), + description_placeholders={"cookidoo": "Cookidoo"}, errors=errors, ) @@ -133,6 +135,7 @@ class CookidooConfigFlow(ConfigFlow, domain=DOMAIN): data_schema=vol.Schema(AUTH_DATA_SCHEMA), suggested_values={CONF_EMAIL: reauth_entry.data[CONF_EMAIL]}, ), + description_placeholders={"cookidoo": "Cookidoo"}, errors=errors, ) diff --git a/homeassistant/components/cookidoo/strings.json b/homeassistant/components/cookidoo/strings.json index 126205fcf2f..19f709ddaf8 100644 --- a/homeassistant/components/cookidoo/strings.json +++ b/homeassistant/components/cookidoo/strings.json @@ -2,30 +2,30 @@ "config": { "step": { "user": { - "title": "Login to Cookidoo", + "title": "Login to {cookidoo}", "data": { "email": "[%key:common::config_flow::data::email%]", "password": "[%key:common::config_flow::data::password%]", "country": "Country" }, "data_description": { - "email": "Email used access your Cookidoo account.", - "password": "Password used access your Cookidoo account.", - "country": "Pick your language for the Cookidoo content." + "email": "Email used to access your {cookidoo} account.", + "password": "Password used to access your {cookidoo} account.", + "country": "Pick your language for the {cookidoo} content." } }, "language": { - "title": "Login to Cookidoo", + "title": "Set language for {cookidoo}", "data": { "language": "[%key:common::config_flow::data::language%]" }, "data_description": { - "language": "Pick your language for the Cookidoo content." + "language": "Pick your language for the {cookidoo} content." } }, "reauth_confirm": { - "title": "Login again to Cookidoo", - "description": "Please log in to Cookidoo again to continue using this integration.", + "title": "Login again to {cookidoo}", + "description": "Please log in to {cookidoo} again to continue using this integration.", "data": { "email": "[%key:common::config_flow::data::email%]", "password": "[%key:common::config_flow::data::password%]"