mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +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
|
entityId: string | undefined
|
||||||
): string => {
|
): string => {
|
||||||
if (!entityId) {
|
if (!entityId) {
|
||||||
return "<unknown entity>";
|
return (
|
||||||
|
"<" +
|
||||||
|
hass.localize("ui.panel.config.automation.editor.unknown_entity") +
|
||||||
|
">"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (entityId.includes(".")) {
|
if (entityId.includes(".")) {
|
||||||
const state = hass.states[entityId];
|
const state = hass.states[entityId];
|
||||||
@ -191,7 +195,11 @@ const getEntityName = (
|
|||||||
if (entityReg) {
|
if (entityReg) {
|
||||||
return computeEntityRegistryName(hass, entityReg) || entityId;
|
return computeEntityRegistryName(hass, entityReg) || entityId;
|
||||||
}
|
}
|
||||||
return "<unknown entity>";
|
return (
|
||||||
|
"<" +
|
||||||
|
hass.localize("ui.panel.config.automation.editor.unknown_entity") +
|
||||||
|
">"
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const localizeDeviceAutomationAction = (
|
export const localizeDeviceAutomationAction = (
|
||||||
|
@ -2837,6 +2837,7 @@
|
|||||||
"edit_ui": "Edit in visual editor",
|
"edit_ui": "Edit in visual editor",
|
||||||
"copy_to_clipboard": "Copy to clipboard",
|
"copy_to_clipboard": "Copy to clipboard",
|
||||||
"search_in": "Search · {group}",
|
"search_in": "Search · {group}",
|
||||||
|
"unknown_entity": "unknown entity",
|
||||||
"triggers": {
|
"triggers": {
|
||||||
"name": "Triggers",
|
"name": "Triggers",
|
||||||
"header": "When",
|
"header": "When",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user