Add localizable "Filtering by config entry" for Entities and Devices (#23544)

* Add localizable "Filtering by config entry" to en.json

This commit adds two strings for localizing "Filtering by config entry" to the Entities panel and, referenced from there, to the Devices panel.

* Replace "Filtering by config entry" with localizable key

* Replace "Filtering by config entry" with localizable key

* Add missing comma

* Add missing }

* Add missing }
This commit is contained in:
Norbert Rittel 2025-01-06 08:54:07 +01:00 committed by GitHub
parent ff75c89ed4
commit f043886273
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -749,7 +749,9 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
${Array.isArray(this._filters.config_entry?.value) && ${Array.isArray(this._filters.config_entry?.value) &&
this._filters.config_entry?.value.length this._filters.config_entry?.value.length
? html`<ha-alert slot="filter-pane"> ? html`<ha-alert slot="filter-pane">
Filtering by config entry ${this.hass.localize(
"ui.panel.config.devices.filtering_by_config_entry"
)}
${this.entries?.find( ${this.entries?.find(
(entry) => (entry) =>
entry.entry_id === this._filters.config_entry!.value![0] entry.entry_id === this._filters.config_entry!.value![0]

View File

@ -904,7 +904,9 @@ ${
Array.isArray(this._filters.config_entry) && Array.isArray(this._filters.config_entry) &&
this._filters.config_entry?.length this._filters.config_entry?.length
? html`<ha-alert slot="filter-pane"> ? html`<ha-alert slot="filter-pane">
Filtering by config entry ${this.hass.localize(
"ui.panel.config.entities.picker.filtering_by_config_entry"
)}
${this._entries?.find( ${this._entries?.find(
(entry) => entry.entry_id === this._filters.config_entry![0] (entry) => entry.entry_id === this._filters.config_entry![0]
)?.title || this._filters.config_entry[0]} )?.title || this._filters.config_entry[0]}

View File

@ -4245,6 +4245,7 @@
"add_device": "Add device", "add_device": "Add device",
"caption": "Devices", "caption": "Devices",
"description": "Manage configured devices", "description": "Manage configured devices",
"filtering_by_config_entry": "[%key:ui::panel::config::entities::picker::filtering_by_config_entry%]",
"device_info": "{type} info", "device_info": "{type} info",
"edit_settings": "Edit settings", "edit_settings": "Edit settings",
"unnamed_device": "Unnamed {type}", "unnamed_device": "Unnamed {type}",
@ -4392,6 +4393,7 @@
"introduction2": "Use the entity registry to override the name, change the entity ID or remove the entry from Home Assistant.", "introduction2": "Use the entity registry to override the name, change the entity ID or remove the entry from Home Assistant.",
"search": "Search {number} entities", "search": "Search {number} entities",
"unnamed_entity": "Unnamed entity", "unnamed_entity": "Unnamed entity",
"filtering_by_config_entry": "Filtering by config entry",
"status": { "status": {
"available": "Available", "available": "Available",
"unavailable": "Unavailable", "unavailable": "Unavailable",