mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +00:00
Use autoCaseNoun for domainName (#23748)
This commit is contained in:
parent
6288154c53
commit
7960da1872
@ -91,6 +91,7 @@ import { haStyle } from "../../../resources/styles";
|
|||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
import { showToast } from "../../../util/toast";
|
import { showToast } from "../../../util/toast";
|
||||||
import { showDeviceRegistryDetailDialog } from "../devices/device-registry-detail/show-dialog-device-registry-detail";
|
import { showDeviceRegistryDetailDialog } from "../devices/device-registry-detail/show-dialog-device-registry-detail";
|
||||||
|
import { autoCaseNoun } from "../../../common/translations/auto_case_noun";
|
||||||
|
|
||||||
const OVERRIDE_DEVICE_CLASSES = {
|
const OVERRIDE_DEVICE_CLASSES = {
|
||||||
cover: [
|
cover: [
|
||||||
@ -1135,10 +1136,10 @@ export class EntityRegistrySettingsEditor extends LitElement {
|
|||||||
text: this.hass!.localize(
|
text: this.hass!.localize(
|
||||||
"ui.dialogs.entity_registry.editor.switch_as_x_confirm",
|
"ui.dialogs.entity_registry.editor.switch_as_x_confirm",
|
||||||
{
|
{
|
||||||
domain: domainToName(
|
domain: autoCaseNoun(
|
||||||
this.hass.localize,
|
domainToName(this.hass.localize, this._switchAsDomain),
|
||||||
this._switchAsDomain
|
this.hass.locale.language
|
||||||
).toLowerCase(),
|
),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
@ -1177,23 +1178,23 @@ export class EntityRegistrySettingsEditor extends LitElement {
|
|||||||
? this.hass!.localize(
|
? this.hass!.localize(
|
||||||
"ui.dialogs.entity_registry.editor.switch_as_x_remove_confirm",
|
"ui.dialogs.entity_registry.editor.switch_as_x_remove_confirm",
|
||||||
{
|
{
|
||||||
domain: domainToName(
|
domain: autoCaseNoun(
|
||||||
this.hass.localize,
|
domainToName(this.hass.localize, domain),
|
||||||
domain
|
this.hass.locale.language
|
||||||
).toLowerCase(),
|
),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
: this.hass!.localize(
|
: this.hass!.localize(
|
||||||
"ui.dialogs.entity_registry.editor.switch_as_x_change_confirm",
|
"ui.dialogs.entity_registry.editor.switch_as_x_change_confirm",
|
||||||
{
|
{
|
||||||
domain_1: domainToName(
|
domain_1: autoCaseNoun(
|
||||||
this.hass.localize,
|
domainToName(this.hass.localize, domain),
|
||||||
domain
|
this.hass.locale.language
|
||||||
).toLowerCase(),
|
),
|
||||||
domain_2: domainToName(
|
domain_2: autoCaseNoun(
|
||||||
this.hass.localize,
|
domainToName(this.hass.localize, this._switchAsDomain),
|
||||||
this._switchAsDomain
|
this.hass.locale.language
|
||||||
).toLowerCase(),
|
),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user