From 28a8ad16724b11b83651774afb6278b2f230f637 Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Mon, 24 Apr 2023 22:40:20 +0200 Subject: [PATCH] Translate login --- custom_components/hon/translations/cs.json | 11 +++++++++++ custom_components/hon/translations/de.json | 11 +++++++++++ custom_components/hon/translations/el.json | 11 +++++++++++ custom_components/hon/translations/en.json | 4 ++-- custom_components/hon/translations/es.json | 11 +++++++++++ custom_components/hon/translations/fr.json | 11 +++++++++++ custom_components/hon/translations/he.json | 11 +++++++++++ custom_components/hon/translations/hr.json | 11 +++++++++++ custom_components/hon/translations/it.json | 4 ++-- custom_components/hon/translations/nl.json | 11 +++++++++++ custom_components/hon/translations/pl.json | 11 +++++++++++ custom_components/hon/translations/pt.json | 11 +++++++++++ custom_components/hon/translations/ro.json | 11 +++++++++++ custom_components/hon/translations/ru.json | 11 +++++++++++ custom_components/hon/translations/sk.json | 11 +++++++++++ custom_components/hon/translations/sl.json | 11 +++++++++++ custom_components/hon/translations/sr.json | 11 +++++++++++ custom_components/hon/translations/tr.json | 11 +++++++++++ custom_components/hon/translations/zh.json | 11 +++++++++++ scripts/generate_translation.py | 10 ++++++++++ 20 files changed, 201 insertions(+), 4 deletions(-) diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index db77f07..ffac5ea 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -981,5 +981,16 @@ "name": "Indukční varná deska" } } + }, + "config": { + "step": { + "user": { + "description": "Přihlaste se", + "data": { + "email": "E-mail", + "password": "Heslo" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index 3e20842..641fb45 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -981,5 +981,16 @@ "name": "Induktionskochfeld" } } + }, + "config": { + "step": { + "user": { + "description": "Melden Sie sich an.", + "data": { + "email": "E-Mail", + "password": "Kennwort" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index ae770f8..1b3818b 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -981,5 +981,16 @@ "name": "Επαγωγική εστία" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "Email", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index f4b385e..bd6281c 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -2,9 +2,9 @@ "config": { "step": { "user": { - "description": "Please enters your hOn credentials", + "description": "Do the login", "data": { - "email": "Email Address", + "email": "Email", "password": "Password" } } diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index 4b46965..7770637 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -981,5 +981,16 @@ "name": "Placa de inducción" } } + }, + "config": { + "step": { + "user": { + "description": "Inicia sesión", + "data": { + "email": "Correo electrónico", + "password": "Contraseña" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index 43ce44b..1ffd1a2 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -981,5 +981,16 @@ "name": "Table de cuisson à induction" } } + }, + "config": { + "step": { + "user": { + "description": "Connectez-vous.", + "data": { + "email": "E-mail", + "password": "Mot de passe" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index a674ea3..afa67d3 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -580,5 +580,16 @@ "name": "Induction Hob" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "Email", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index b828126..fcc04ea 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -981,5 +981,16 @@ "name": "Indukcijska ploča za kuhanje" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "E-pošta", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index 409fc62..001df55 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -2,9 +2,9 @@ "config": { "step": { "user": { - "description": "Inserisci le credenziali dell'app hOn", + "description": "Fai il login", "data": { - "email": "Indirizzo Email", + "email": "Email", "password": "Password" } } diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index c14eca0..c5666f2 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -981,5 +981,16 @@ "name": "Inductiekookplaat" } } + }, + "config": { + "step": { + "user": { + "description": "Log in", + "data": { + "email": "E-mail", + "password": "Wachtwoord" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index 72c3bac..b3ba23e 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -981,5 +981,16 @@ "name": "Płyta indukcyjna" } } + }, + "config": { + "step": { + "user": { + "description": "Zaloguj się", + "data": { + "email": "E-mail", + "password": "Hasło" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index b23c642..36fd66a 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -981,5 +981,16 @@ "name": "Placa de indução" } } + }, + "config": { + "step": { + "user": { + "description": "Faça login", + "data": { + "email": "E-mail", + "password": "Palavra-passe" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index 1aa55cb..7b2a432 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -981,5 +981,16 @@ "name": "Plita cu inducție" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "E-mail", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index 4f6f6bb..e97bd7f 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -981,5 +981,16 @@ "name": "Индукционная варочная панель" } } + }, + "config": { + "step": { + "user": { + "description": "Выполните вход", + "data": { + "email": "Электронная почта", + "password": "Пароль" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index 32713dc..46739d3 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -981,5 +981,16 @@ "name": "Indukčná varná doska" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "E-mail", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index 94b802e..98be657 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -981,5 +981,16 @@ "name": "Indukcijska kuhalna plošča" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "E-pošta", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index a4937f1..d9e8994 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -981,5 +981,16 @@ "name": "Indukciona ploča" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "E-adresa", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index 6ba195e..9b37205 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -981,5 +981,16 @@ "name": "İndüksiyonlu Ocak" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "E-posta", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index 2ff9849..a23879e 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -981,5 +981,16 @@ "name": "电磁炉" } } + }, + "config": { + "step": { + "user": { + "description": "Do the login", + "data": { + "email": "电子邮件", + "password": "Password" + } + } + } } } \ No newline at end of file diff --git a/scripts/generate_translation.py b/scripts/generate_translation.py index e33ad91..3077c43 100755 --- a/scripts/generate_translation.py +++ b/scripts/generate_translation.py @@ -298,6 +298,15 @@ def add_data(old, original, fallback, data, name, entity="sensor"): state[str(number)] = key +def translate_login(old, *args): + login = old.setdefault("config", {}).setdefault("step", {}).setdefault("user", {}) + login["description"] = load_key("CUBE90_ALEXA.HAIER_SMART_SKILLS.STEP_2", *args) + login.setdefault("data", {})["email"] = load_key( + "PET.EDIT_PET_PROFESSIONALS.EMAIL", *args + ) + login["data"]["password"] = load_key("CUBE90_GLOBAL.GENERAL.PASSWORD", *args) + + def main(): hass = load_hass_translations() hon = load_hon_translations() @@ -317,6 +326,7 @@ def main(): for name, key in data.items(): select = old.setdefault("entity", {}).setdefault(entity, {}) select.setdefault(name, {})["name"] = load_key(key, original, fallback) + translate_login(old, original, fallback) save_json(base_path / f"{language}.json", old)