From c9b8c4cf22d2eb086dc4c0635e7323717bb25bdd Mon Sep 17 00:00:00 2001
From: springstan
Date: Sun, 13 Oct 2019 17:27:01 +0200
Subject: [PATCH 1/4] Added integration name to System Options dialog
---
.../dialog-config-entry-system-options.ts | 10 ++++++++--
src/translations/en.json | 5 +++--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
index 1064d41b3685..9e9731f7ecf9 100644
--- a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
+++ b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
@@ -60,7 +60,9 @@ class DialogConfigEntrySystemOptions extends LitElement {
@opened-changed="${this._openedChanged}"
>
- ${this.hass.localize("ui.dialogs.config_entry_system_options.title")}
+ ${this.hass.localize(
+ "ui.dialogs.config_entry_system_options.title"
+ )}${this._params.entry.domain}
${this._loading
@@ -89,7 +91,11 @@ class DialogConfigEntrySystemOptions extends LitElement {
${this.hass.localize(
- "ui.dialogs.config_entry_system_options.enable_new_entities_description"
+ "ui.dialogs.config_entry_system_options.enable_new_entities_description_start"
+ )}
+ ${this._params.entry.domain}
+ ${this.hass.localize(
+ "ui.dialogs.config_entry_system_options.enable_new_entities_description_end"
)}
diff --git a/src/translations/en.json b/src/translations/en.json
index 96fd75e38b7c..0b63372152b0 100755
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -559,9 +559,10 @@
}
},
"config_entry_system_options": {
- "title": "System Options",
+ "title": "System Options for ",
"enable_new_entities_label": "Enable newly added entities.",
- "enable_new_entities_description": "If disabled, newly discovered entities will not be automatically added to Home Assistant."
+ "enable_new_entities_description_start": "If disabled, newly discovered entities for ",
+ "enable_new_entities_description_end": "will not be automatically added to Home Assistant."
},
"zha_device_info": {
"manuf": "by {manufacturer}",
From a841697e252b4d1cf711026903e2c249dfedc356 Mon Sep 17 00:00:00 2001
From: springstan
Date: Sun, 13 Oct 2019 21:30:14 +0200
Subject: [PATCH 2/4] Passed integration name into translation string
---
.../dialog-config-entry-system-options.ts | 14 +++++++-------
src/translations/en.json | 5 ++---
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
index 9e9731f7ecf9..d320cc0eacc7 100644
--- a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
+++ b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
@@ -61,8 +61,10 @@ class DialogConfigEntrySystemOptions extends LitElement {
>
${this.hass.localize(
- "ui.dialogs.config_entry_system_options.title"
- )}${this._params.entry.domain}
+ "ui.dialogs.config_entry_system_options.title",
+ "integration",
+ this._params.entry.domain
+ )}
${this._loading
@@ -91,11 +93,9 @@ class DialogConfigEntrySystemOptions extends LitElement {
${this.hass.localize(
- "ui.dialogs.config_entry_system_options.enable_new_entities_description_start"
- )}
- ${this._params.entry.domain}
- ${this.hass.localize(
- "ui.dialogs.config_entry_system_options.enable_new_entities_description_end"
+ "ui.dialogs.config_entry_system_options.enable_new_entities_description",
+ "integration",
+ this._params.entry.domain
)}
diff --git a/src/translations/en.json b/src/translations/en.json
index 0b63372152b0..1ea73eedfd97 100755
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -559,10 +559,9 @@
}
},
"config_entry_system_options": {
- "title": "System Options for ",
+ "title": "System Options for {integration}",
"enable_new_entities_label": "Enable newly added entities.",
- "enable_new_entities_description_start": "If disabled, newly discovered entities for ",
- "enable_new_entities_description_end": "will not be automatically added to Home Assistant."
+ "enable_new_entities_description": "If disabled, newly discovered entities for {integration} will not be automatically added to Home Assistant."
},
"zha_device_info": {
"manuf": "by {manufacturer}",
From 85b0684767d8c6822744db212ce61b62ed11b4d6 Mon Sep 17 00:00:00 2001
From: springstan
Date: Mon, 14 Oct 2019 18:20:37 +0200
Subject: [PATCH 3/4] Translated integration name
---
.../dialog-config-entry-system-options.ts | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
index d320cc0eacc7..76521d94ed2d 100644
--- a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
+++ b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
@@ -63,7 +63,9 @@ class DialogConfigEntrySystemOptions extends LitElement {
${this.hass.localize(
"ui.dialogs.config_entry_system_options.title",
"integration",
- this._params.entry.domain
+ this.hass.localize(
+ `component.${this._params.entry.domain}.config.title`
+ )
)}
@@ -95,7 +97,11 @@ class DialogConfigEntrySystemOptions extends LitElement {
${this.hass.localize(
"ui.dialogs.config_entry_system_options.enable_new_entities_description",
"integration",
- this._params.entry.domain
+ this.hass.localize(
+ `component.${
+ this._params.entry.domain
+ }.config.title`
+ )
)}
From 68d455900edde92b55a6e1266254ca3af8ddd472 Mon Sep 17 00:00:00 2001
From: springstan
Date: Mon, 14 Oct 2019 20:04:09 +0200
Subject: [PATCH 4/4] Added option for no translation
---
.../dialog-config-entry-system-options.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
index 76521d94ed2d..2950d4c61ade 100644
--- a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
+++ b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
@@ -65,7 +65,7 @@ class DialogConfigEntrySystemOptions extends LitElement {
"integration",
this.hass.localize(
`component.${this._params.entry.domain}.config.title`
- )
+ ) || this._params.entry.domain
)}
@@ -101,7 +101,7 @@ class DialogConfigEntrySystemOptions extends LitElement {
`component.${
this._params.entry.domain
}.config.title`
- )
+ ) || this._params.entry.domain
)}