mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Change format of service description (#19229)
This commit is contained in:
parent
f2226cdec2
commit
750c1d5013
@ -169,10 +169,19 @@ const tryDescribeAction = <T extends ActionType>(
|
||||
hass.localize(`component.${domain}.services.${serviceName}.name`) ||
|
||||
hass.services[domain][serviceName]?.name;
|
||||
|
||||
if (config.metadata) {
|
||||
return hass.localize(
|
||||
`${actionTranslationBaseKey}.service.description.service_name`,
|
||||
{
|
||||
domain: domainToName(hass.localize, domain),
|
||||
name: service || config.service,
|
||||
targets: formatListWithAnds(hass.locale, targets),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return hass.localize(
|
||||
`${actionTranslationBaseKey}.service.description.${
|
||||
config.metadata ? "service_name" : "service_based_on_name"
|
||||
}`,
|
||||
`${actionTranslationBaseKey}.service.description.service_based_on_name`,
|
||||
{
|
||||
name: service
|
||||
? `${domainToName(hass.localize, domain)}: ${service}`
|
||||
|
@ -2914,7 +2914,7 @@
|
||||
"description": {
|
||||
"service_based_on_template": "Call a service based on a template on {targets}",
|
||||
"service_based_on_name": "Call a service ''{name}'' on {targets}",
|
||||
"service_name": "''{name}'' on {targets}",
|
||||
"service_name": "{domain} ''{name}'' on {targets}",
|
||||
"service": "Call a service",
|
||||
"target_template": "templated {name}",
|
||||
"target_unknown_entity": "unknown entity",
|
||||
|
Loading…
x
Reference in New Issue
Block a user