1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-08 17:28:46 +01:00

Add translation for unknown entity (#21484)

* unknown entity

* prettier
This commit is contained in:
Simon Lamon
2024-07-31 11:05:14 +02:00
committed by GitHub
parent dbd84901f8
commit 1f90a0c2e5
2 changed files with 11 additions and 2 deletions
+10 -2
View File
@@ -178,7 +178,11 @@ const getEntityName = (
entityId: string | undefined
): string => {
if (!entityId) {
return "<unknown entity>";
return (
"<" +
hass.localize("ui.panel.config.automation.editor.unknown_entity") +
">"
);
}
if (entityId.includes(".")) {
const state = hass.states[entityId];
@@ -191,7 +195,11 @@ const getEntityName = (
if (entityReg) {
return computeEntityRegistryName(hass, entityReg) || entityId;
}
return "<unknown entity>";
return (
"<" +
hass.localize("ui.panel.config.automation.editor.unknown_entity") +
">"
);
};
export const localizeDeviceAutomationAction = (
+1
View File
@@ -2837,6 +2837,7 @@
"edit_ui": "Edit in visual editor",
"copy_to_clipboard": "Copy to clipboard",
"search_in": "Search · {group}",
"unknown_entity": "unknown entity",
"triggers": {
"name": "Triggers",
"header": "When",