Skip to content

Commit

Permalink
Localize a device action string
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts committed Dec 30, 2023
1 parent fe18f70 commit 6b5e9bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/data/script_i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ const tryDescribeAction = <T extends ActionType>(
if (actionType === "device_action") {
const config = action as DeviceAction;
if (!config.device_id) {
return "Device action";
return hass.localize(
`${actionTranslationBaseKey}.device_id.description.no_device`
);
}
const localized = localizeDeviceAutomationAction(
hass,
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2989,7 +2989,8 @@
"flash": "Flash"
},
"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"
}
},
"activate_scene": {
Expand Down

0 comments on commit 6b5e9bf

Please sign in to comment.