1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Remove domain prefix from actions

This commit is contained in:
Bram Kragten
2026-03-30 15:11:26 +02:00
parent 10c90d222d
commit 611678c88c
4 changed files with 8 additions and 18 deletions

View File

@@ -114,13 +114,7 @@ const tryDescribeAction = <T extends ActionType>(
) || hass.services[domain]?.[serviceName]?.name;
if (config.metadata) {
return hass.localize(
`${actionTranslationBaseKey}.service.description.service_name_no_targets`,
{
domain: domainToName(hass.localize, domain),
name: service || config.action,
}
);
return service || config.action;
}
return hass.localize(

View File

@@ -1429,16 +1429,15 @@ class DialogAddAutomationElement
></ha-service-icon>
`,
key: `${DYNAMIC_PREFIX}${dmn}.${service}`,
name: `${domain ? "" : `${domainToName(localize, dmn)}: `}${
this.hass.localize(
name:
localize(
`component.${dmn}.services.${service}.name`,
this.hass.services[dmn][service].description_placeholders
) ||
services[dmn][service]?.name ||
service
}`,
service,
description:
this.hass.localize(
localize(
`component.${dmn}.services.${service}.description`,
this.hass.services[dmn][service].description_placeholders
) ||

View File

@@ -24,7 +24,6 @@ import type { HaDropdownSelectEvent } from "../../../../components/ha-dropdown";
import "../../../../components/ha-dropdown-item";
import { ACTION_BUILDING_BLOCKS } from "../../../../data/action";
import type { ActionSidebarConfig } from "../../../../data/automation";
import { domainToName } from "../../../../data/integration";
import type {
NonConditionAction,
RepeatAction,
@@ -102,14 +101,13 @@ export default class HaAutomationSidebarAction extends LitElement {
2
);
title = `${domainToName(this.hass.localize, domain)}: ${
title =
this.hass.localize(
`component.${domain}.services.${service}.name`,
this.hass.services[domain]?.[service]?.description_placeholders
) ||
this.hass.services[domain]?.[service]?.name ||
title
}`;
title;
}
const description = isBuildingBlock

View File

@@ -5452,10 +5452,9 @@
"picker": "Previously known as call service.",
"service_based_on_template": "Perform an action based on a template on {targets}",
"service_based_on_name": "Perform action ''{name}'' on {targets}",
"service_name": "{domain} ''{name}'' on {targets}",
"service_name": "{name} on {targets}",
"service_based_on_template_no_targets": "Perform an action based on a template",
"service_based_on_name_no_targets": "Perform action ''{name}''",
"service_name_no_targets": "{domain} ''{name}''",
"service": "Perform an action",
"target_template": "templated {name}",
"target_every_entity": "every entity",