mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Add perform action with to translations (#25781)
This commit is contained in:
parent
05035a281b
commit
159c4d100a
@ -468,10 +468,18 @@ const tryDescribeAction = <T extends ActionType>(
|
|||||||
return localized;
|
return localized;
|
||||||
}
|
}
|
||||||
const stateObj = hass.states[config.entity_id];
|
const stateObj = hass.states[config.entity_id];
|
||||||
return `${config.type || "Perform action with"} ${
|
if (config.type) {
|
||||||
|
return `${config.type} ${
|
||||||
stateObj ? computeStateName(stateObj) : config.entity_id
|
stateObj ? computeStateName(stateObj) : config.entity_id
|
||||||
}`;
|
}`;
|
||||||
}
|
}
|
||||||
|
return hass.localize(
|
||||||
|
`${actionTranslationBaseKey}.device_id.description.perform_device_action`,
|
||||||
|
{
|
||||||
|
device: stateObj ? computeStateName(stateObj) : config.entity_id,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (actionType === "sequence") {
|
if (actionType === "sequence") {
|
||||||
const config = action as SequenceAction;
|
const config = action as SequenceAction;
|
||||||
|
@ -4286,7 +4286,8 @@
|
|||||||
"action": "Action",
|
"action": "Action",
|
||||||
"description": {
|
"description": {
|
||||||
"picker": "Do something on a device. Great way to start.",
|
"picker": "Do something on a device. Great way to start.",
|
||||||
"no_device": "Device action"
|
"no_device": "Device action",
|
||||||
|
"perform_device_action": "Perform action with {device}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"repeat": {
|
"repeat": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user