mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +00:00
Add translation for unknown entity (#21484)
* unknown entity * prettier
This commit is contained in:
parent
dbd84901f8
commit
1f90a0c2e5
@ -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 = (
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user