@@ -574,10 +575,10 @@ class HassioAddonInfo extends LitElement {
${this.supervisor.localize(
"addon.dashboard.not_available_version",
- "core_version_installed",
- this.supervisor.core.version,
- "core_version_needed",
- addonStoreInfo!.homeassistant
+ {
+ core_version_installed: this.supervisor.core.version,
+ core_version_needed: addonStoreInfo!.homeassistant,
+ }
)}
`
@@ -750,12 +751,11 @@ class HassioAddonInfo extends LitElement {
id === "stage"
? this.supervisor.localize(
`addon.dashboard.capability.${id}.description`,
- "icon_stable",
- `
`,
- "icon_experimental",
- `
`,
- "icon_deprecated",
- `
`
+ {
+ icon_stable: `
`,
+ icon_experimental: `
`,
+ icon_deprecated: `
`,
+ }
)
: this.supervisor.localize(
`addon.dashboard.capability.${id}.description`
@@ -817,11 +817,9 @@ class HassioAddonInfo extends LitElement {
};
fireEvent(this, "hass-api-called", eventdata);
} catch (err: any) {
- this._error = this.supervisor.localize(
- "addon.failed_to_save",
- "error",
- extractApiErrorMessage(err)
- );
+ this._error = this.supervisor.localize("addon.failed_to_save", {
+ error: extractApiErrorMessage(err),
+ });
}
}
@@ -839,11 +837,9 @@ class HassioAddonInfo extends LitElement {
};
fireEvent(this, "hass-api-called", eventdata);
} catch (err: any) {
- this._error = this.supervisor.localize(
- "addon.failed_to_save",
- "error",
- extractApiErrorMessage(err)
- );
+ this._error = this.supervisor.localize("addon.failed_to_save", {
+ error: extractApiErrorMessage(err),
+ });
}
}
@@ -861,11 +857,9 @@ class HassioAddonInfo extends LitElement {
};
fireEvent(this, "hass-api-called", eventdata);
} catch (err: any) {
- this._error = this.supervisor.localize(
- "addon.failed_to_save",
- "error",
- extractApiErrorMessage(err)
- );
+ this._error = this.supervisor.localize("addon.failed_to_save", {
+ error: extractApiErrorMessage(err),
+ });
}
}
@@ -883,11 +877,9 @@ class HassioAddonInfo extends LitElement {
};
fireEvent(this, "hass-api-called", eventdata);
} catch (err: any) {
- this._error = this.supervisor.localize(
- "addon.failed_to_save",
- "error",
- extractApiErrorMessage(err)
- );
+ this._error = this.supervisor.localize("addon.failed_to_save", {
+ error: extractApiErrorMessage(err),
+ });
}
}
@@ -905,11 +897,9 @@ class HassioAddonInfo extends LitElement {
};
fireEvent(this, "hass-api-called", eventdata);
} catch (err: any) {
- this._error = this.supervisor.localize(
- "addon.failed_to_save",
- "error",
- extractApiErrorMessage(err)
- );
+ this._error = this.supervisor.localize("addon.failed_to_save", {
+ error: extractApiErrorMessage(err),
+ });
}
}
diff --git a/hassio/src/addon-view/log/hassio-addon-logs.ts b/hassio/src/addon-view/log/hassio-addon-logs.ts
index 2dc96453ffb1..c2cd53f962fc 100644
--- a/hassio/src/addon-view/log/hassio-addon-logs.ts
+++ b/hassio/src/addon-view/log/hassio-addon-logs.ts
@@ -72,11 +72,9 @@ class HassioAddonLogs extends LitElement {
try {
this._content = await fetchHassioAddonLogs(this.hass, this.addon.slug);
} catch (err: any) {
- this._error = this.supervisor.localize(
- "addon.logs.get_logs",
- "error",
- extractApiErrorMessage(err)
- );
+ this._error = this.supervisor.localize("addon.logs.get_logs", {
+ error: extractApiErrorMessage(err),
+ });
}
}
diff --git a/hassio/src/backups/hassio-backups.ts b/hassio/src/backups/hassio-backups.ts
index 80282aa7d6ad..943e6e6c646b 100644
--- a/hassio/src/backups/hassio-backups.ts
+++ b/hassio/src/backups/hassio-backups.ts
@@ -360,11 +360,9 @@ export class HassioBackups extends LitElement {
if (this.supervisor!.info.state !== "running") {
showAlertDialog(this, {
title: this.supervisor!.localize("backup.could_not_create"),
- text: this.supervisor!.localize(
- "backup.create_blocked_not_running",
- "state",
- this.supervisor!.info.state
- ),
+ text: this.supervisor!.localize("backup.create_blocked_not_running", {
+ state: this.supervisor!.info.state,
+ }),
});
return;
}
diff --git a/hassio/src/dashboard/hassio-update.ts b/hassio/src/dashboard/hassio-update.ts
index 9ef61c43f30e..3307f21427ce 100644
--- a/hassio/src/dashboard/hassio-update.ts
+++ b/hassio/src/dashboard/hassio-update.ts
@@ -46,11 +46,9 @@ export class HassioUpdate extends LitElement {
return html`
- ${this.supervisor.localize(
- "common.update_available",
- "count",
- updatesAvailable
- )}
+ ${this.supervisor.localize("common.update_available", {
+ count: updatesAvailable,
+ })}
🎉
diff --git a/hassio/src/dialogs/backup/dialog-hassio-create-backup.ts b/hassio/src/dialogs/backup/dialog-hassio-create-backup.ts
index da0bbdbef6e0..3e1fd79a3df1 100644
--- a/hassio/src/dialogs/backup/dialog-hassio-create-backup.ts
+++ b/hassio/src/dialogs/backup/dialog-hassio-create-backup.ts
@@ -89,8 +89,7 @@ class HassioCreateBackupDialog extends LitElement {
),
text: this._dialogParams!.supervisor.localize(
"backup.create_blocked_not_running",
- "state",
- this._dialogParams!.supervisor.info.state
+ { state: this._dialogParams!.supervisor.info.state }
),
});
return;
diff --git a/hassio/src/dialogs/network/dialog-hassio-network.ts b/hassio/src/dialogs/network/dialog-hassio-network.ts
index f3a77f8b40a6..182efad690e0 100644
--- a/hassio/src/dialogs/network/dialog-hassio-network.ts
+++ b/hassio/src/dialogs/network/dialog-hassio-network.ts
@@ -145,8 +145,7 @@ export class DialogHassioNetwork
? html`
${this.supervisor.localize(
"dialog.network.connected_to",
- "ssid",
- this._interface?.wifi?.ssid
+ { ssid: this._interface?.wifi?.ssid }
)}
`
: ""}
diff --git a/hassio/src/hassio-my-redirect.ts b/hassio/src/hassio-my-redirect.ts
index 71bc873eb61d..0640d4820fca 100644
--- a/hassio/src/hassio-my-redirect.ts
+++ b/hassio/src/hassio-my-redirect.ts
@@ -76,17 +76,15 @@ class HassioMyRedirect extends LitElement {
const redirect = REDIRECTS[path];
if (!redirect) {
- this._error = this.supervisor.localize(
- "my.not_supported",
- "link",
- html`
${this.supervisor.localize("my.faq_link")}
- `
- );
+ `,
+ });
return;
}
diff --git a/hassio/src/system/hassio-core-info.ts b/hassio/src/system/hassio-core-info.ts
index 7754728757e2..f005700b17cc 100644
--- a/hassio/src/system/hassio-core-info.ts
+++ b/hassio/src/system/hassio-core-info.ts
@@ -96,13 +96,11 @@ class HassioCoreInfo extends LitElement {
slot="primaryAction"
class="warning"
@click=${this._coreRestart}
- .title=${this.supervisor.localize(
- "common.restart_name",
- "name",
- "Core"
- )}
+ .title=${this.supervisor.localize("common.restart_name", {
+ name: "Core",
+ })}
>
- ${this.supervisor.localize("common.restart_name", "name", "Core")}
+ ${this.supervisor.localize("common.restart_name", { name: "Core" })}
@@ -122,16 +120,12 @@ class HassioCoreInfo extends LitElement {
button.progress = true;
const confirmed = await showConfirmationDialog(this, {
- title: this.supervisor.localize(
- "confirm.restart.title",
- "name",
- "Home Assistant Core"
- ),
- text: this.supervisor.localize(
- "confirm.restart.text",
- "name",
- "Home Assistant Core"
- ),
+ title: this.supervisor.localize("confirm.restart.title", {
+ name: "Home Assistant Core",
+ }),
+ text: this.supervisor.localize("confirm.restart.text", {
+ name: "Home Assistant Core",
+ }),
confirmText: this.supervisor.localize("common.restart"),
dismissText: this.supervisor.localize("common.cancel"),
});
@@ -146,11 +140,9 @@ class HassioCoreInfo extends LitElement {
} catch (err: any) {
if (this.hass.connection.connected) {
showAlertDialog(this, {
- title: this.supervisor.localize(
- "common.failed_to_restart_name",
- "name",
- "Home AssistantCore"
- ),
+ title: this.supervisor.localize("common.failed_to_restart_name", {
+ name: "Home Assistant Core",
+ }),
text: extractApiErrorMessage(err),
});
}
diff --git a/hassio/src/system/hassio-supervisor-info.ts b/hassio/src/system/hassio-supervisor-info.ts
index d083bfb613ec..c025fce6cd4f 100644
--- a/hassio/src/system/hassio-supervisor-info.ts
+++ b/hassio/src/system/hassio-supervisor-info.ts
@@ -200,17 +200,13 @@ class HassioSupervisorInfo extends LitElement {
- ${this.supervisor.localize(
- "common.restart_name",
- "name",
- "Supervisor"
- )}
+ ${this.supervisor.localize("common.restart_name", {
+ name: "Supervisor",
+ })}
@@ -292,16 +288,12 @@ class HassioSupervisorInfo extends LitElement {
button.progress = true;
const confirmed = await showConfirmationDialog(this, {
- title: this.supervisor.localize(
- "confirm.restart.title",
- "name",
- "Supervisor"
- ),
- text: this.supervisor.localize(
- "confirm.restart.text",
- "name",
- "Supervisor"
- ),
+ title: this.supervisor.localize("confirm.restart.title", {
+ name: "Supervisor",
+ }),
+ text: this.supervisor.localize("confirm.restart.text", {
+ name: "Supervisor",
+ }),
confirmText: this.supervisor.localize("common.restart"),
dismissText: this.supervisor.localize("common.cancel"),
});
@@ -315,11 +307,9 @@ class HassioSupervisorInfo extends LitElement {
await restartSupervisor(this.hass);
} catch (err: any) {
showAlertDialog(this, {
- title: this.supervisor.localize(
- "common.failed_to_restart_name",
- "name",
- "Supervisor"
- ),
+ title: this.supervisor.localize("common.failed_to_restart_name", {
+ name: "Supervisor",
+ }),
text: extractApiErrorMessage(err),
});
} finally {
@@ -334,8 +324,7 @@ class HassioSupervisorInfo extends LitElement {
),
text: this.supervisor.localize(
"system.supervisor.share_diagonstics_description",
- "line_break",
- html`
`
+ { line_break: html`
` }
),
});
}
diff --git a/hassio/src/system/hassio-supervisor-log.ts b/hassio/src/system/hassio-supervisor-log.ts
index fec60d6d034f..a2e1d1d75e1e 100644
--- a/hassio/src/system/hassio-supervisor-log.ts
+++ b/hassio/src/system/hassio-supervisor-log.ts
@@ -124,13 +124,10 @@ class HassioSupervisorLog extends LitElement {
this._selectedLogProvider
);
} catch (err: any) {
- this._error = this.supervisor.localize(
- "system.log.get_logs",
- "provider",
- this._selectedLogProvider,
- "error",
- extractApiErrorMessage(err)
- );
+ this._error = this.supervisor.localize("system.log.get_logs", {
+ provider: this._selectedLogProvider,
+ error: extractApiErrorMessage(err),
+ });
}
}
diff --git a/src/auth/ha-auth-flow.ts b/src/auth/ha-auth-flow.ts
index f23733bb79f5..e0841ebe3803 100644
--- a/src/auth/ha-auth-flow.ts
+++ b/src/auth/ha-auth-flow.ts
@@ -159,11 +159,9 @@ export class HaAuthFlow extends LitElement {
case "error":
return html`
- ${this.localize(
- "ui.panel.page-authorize.form.error",
- "error",
- this._errorMessage
- )}
+ ${this.localize("ui.panel.page-authorize.form.error", {
+ error: this._errorMessage,
+ })}
@@ -317,15 +315,10 @@ export class HaAuthFlow extends LitElement {
}
private _computeStepDescription(step: DataEntryFlowStepForm) {
- const resourceKey =
- `ui.panel.page-authorize.form.providers.${step.handler[0]}.step.${step.step_id}.description` as const;
- const args: string[] = [];
- const placeholders = step.description_placeholders || {};
- Object.keys(placeholders).forEach((key) => {
- args.push(key);
- args.push(placeholders[key]);
- });
- return this.localize(resourceKey, ...args);
+ return this.localize(
+ `ui.panel.page-authorize.form.providers.${step.handler[0]}.step.${step.step_id}.description`,
+ step.description_placeholders
+ );
}
private _computeLabelCallback(step: DataEntryFlowStepForm) {
diff --git a/src/common/structs/handle-errors.ts b/src/common/structs/handle-errors.ts
index 96c82081c565..ad5cb080d94f 100644
--- a/src/common/structs/handle-errors.ts
+++ b/src/common/structs/handle-errors.ts
@@ -13,45 +13,33 @@ export const handleStructError = (
for (const failure of err.failures()) {
if (failure.value === undefined) {
errors.push(
- hass.localize(
- "ui.errors.config.key_missing",
- "key",
- failure.path.join(".")
- )
+ hass.localize("ui.errors.config.key_missing", {
+ key: failure.path.join("."),
+ })
);
} else if (failure.type === "never") {
warnings.push(
- hass.localize(
- "ui.errors.config.key_not_expected",
- "key",
- failure.path.join(".")
- )
+ hass.localize("ui.errors.config.key_not_expected", {
+ key: failure.path.join("."),
+ })
);
} else if (failure.type === "union") {
continue;
} else if (failure.type === "enums") {
warnings.push(
- hass.localize(
- "ui.errors.config.key_wrong_type",
- "key",
- failure.path.join("."),
- "type_correct",
- failure.message.replace("Expected ", "").split(", ")[0],
- "type_wrong",
- JSON.stringify(failure.value)
- )
+ hass.localize("ui.errors.config.key_wrong_type", {
+ key: failure.path.join("."),
+ type_correct: failure.message.replace("Expected ", "").split(", ")[0],
+ type_wrong: JSON.stringify(failure.value),
+ })
);
} else {
warnings.push(
- hass.localize(
- "ui.errors.config.key_wrong_type",
- "key",
- failure.path.join("."),
- "type_correct",
- failure.refinement || failure.type,
- "type_wrong",
- JSON.stringify(failure.value)
- )
+ hass.localize("ui.errors.config.key_wrong_type", {
+ key: failure.path.join("."),
+ type_correct: failure.refinement || failure.type,
+ type_wrong: JSON.stringify(failure.value),
+ })
);
}
}
diff --git a/src/components/ha-button-related-filter-menu.ts b/src/components/ha-button-related-filter-menu.ts
index c83bdcdd6cb8..0225f77cab99 100644
--- a/src/components/ha-button-related-filter-menu.ts
+++ b/src/components/ha-button-related-filter-menu.ts
@@ -126,8 +126,11 @@ export class HaRelatedFilterButtonMenu extends LitElement {
}
const filter = this.hass.localize(
"ui.components.related-filter-menu.filtered_by_entity",
- "entity_name",
- computeStateName((ev.currentTarget as any).comboBox.selectedItem)
+ {
+ entity_name: computeStateName(
+ (ev.currentTarget as any).comboBox.selectedItem
+ ),
+ }
);
const items = await findRelated(this.hass, "entity", entityId);
fireEvent(this, "related-changed", {
@@ -146,11 +149,12 @@ export class HaRelatedFilterButtonMenu extends LitElement {
}
const filter = this.hass.localize(
"ui.components.related-filter-menu.filtered_by_device",
- "device_name",
- computeDeviceName(
- (ev.currentTarget as any).comboBox.selectedItem,
- this.hass
- )
+ {
+ device_name: computeDeviceName(
+ (ev.currentTarget as any).comboBox.selectedItem,
+ this.hass
+ ),
+ }
);
const items = await findRelated(this.hass, "device", deviceId);
@@ -170,8 +174,7 @@ export class HaRelatedFilterButtonMenu extends LitElement {
}
const filter = this.hass.localize(
"ui.components.related-filter-menu.filtered_by_area",
- "area_name",
- (ev.currentTarget as any).comboBox.selectedItem.name
+ { area_name: (ev.currentTarget as any).comboBox.selectedItem.name }
);
const items = await findRelated(this.hass, "area", areaId);
fireEvent(this, "related-changed", {
diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts
index e5c895e74268..cc755e688771 100644
--- a/src/components/media-player/ha-media-player-browse.ts
+++ b/src/components/media-player/ha-media-player-browse.ts
@@ -798,10 +798,8 @@ export class HaMediaPlayerBrowse extends LitElement {
${this.hass.localize("ui.components.media-browser.no_media_folder")}
- ${this.hass.localize(
- "ui.components.media-browser.setup_local_help",
- "documentation",
- html`${this.hass.localize(
"ui.components.media-browser.documentation"
)}`
- )}
+ >`,
+ })}
${this.hass.localize("ui.components.media-browser.local_media_files")}
diff --git a/src/data/application_credential.ts b/src/data/application_credential.ts
index 65f9d25a7da7..4b4cebdac98b 100644
--- a/src/data/application_credential.ts
+++ b/src/data/application_credential.ts
@@ -1,7 +1,7 @@
import { HomeAssistant } from "../types";
export interface ApplicationCredentialsDomainConfig {
- description_placeholders: string;
+ description_placeholders: Record;
}
export interface ApplicationCredentialsConfig {
diff --git a/src/data/device_automation.ts b/src/data/device_automation.ts
index 5dc8e2879204..b32355e833ed 100644
--- a/src/data/device_automation.ts
+++ b/src/data/device_automation.ts
@@ -201,14 +201,14 @@ export const localizeDeviceAutomationAction = (
): string =>
hass.localize(
`component.${action.domain}.device_automation.action_type.${action.type}`,
- "entity_name",
- getEntityName(hass, entityRegistry, action.entity_id),
- "subtype",
- action.subtype
- ? hass.localize(
- `component.${action.domain}.device_automation.action_subtype.${action.subtype}`
- ) || action.subtype
- : ""
+ {
+ entity_name: getEntityName(hass, entityRegistry, action.entity_id),
+ subtype: action.subtype
+ ? hass.localize(
+ `component.${action.domain}.device_automation.action_subtype.${action.subtype}`
+ ) || action.subtype
+ : "",
+ }
) || (action.subtype ? `"${action.subtype}" ${action.type}` : action.type!);
export const localizeDeviceAutomationCondition = (
@@ -218,14 +218,14 @@ export const localizeDeviceAutomationCondition = (
): string =>
hass.localize(
`component.${condition.domain}.device_automation.condition_type.${condition.type}`,
- "entity_name",
- getEntityName(hass, entityRegistry, condition.entity_id),
- "subtype",
- condition.subtype
- ? hass.localize(
- `component.${condition.domain}.device_automation.condition_subtype.${condition.subtype}`
- ) || condition.subtype
- : ""
+ {
+ entity_name: getEntityName(hass, entityRegistry, condition.entity_id),
+ subtype: condition.subtype
+ ? hass.localize(
+ `component.${condition.domain}.device_automation.condition_subtype.${condition.subtype}`
+ ) || condition.subtype
+ : "",
+ }
) ||
(condition.subtype
? `"${condition.subtype}" ${condition.type}`
@@ -238,14 +238,14 @@ export const localizeDeviceAutomationTrigger = (
): string =>
hass.localize(
`component.${trigger.domain}.device_automation.trigger_type.${trigger.type}`,
- "entity_name",
- getEntityName(hass, entityRegistry, trigger.entity_id),
- "subtype",
- trigger.subtype
- ? hass.localize(
- `component.${trigger.domain}.device_automation.trigger_subtype.${trigger.subtype}`
- ) || trigger.subtype
- : ""
+ {
+ entity_name: getEntityName(hass, entityRegistry, trigger.entity_id),
+ subtype: trigger.subtype
+ ? hass.localize(
+ `component.${trigger.domain}.device_automation.trigger_subtype.${trigger.subtype}`
+ ) || trigger.subtype
+ : "",
+ }
) ||
(trigger.subtype ? `"${trigger.subtype}" ${trigger.type}` : trigger.type!);
diff --git a/src/data/device_registry.ts b/src/data/device_registry.ts
index 37685de00792..0919b4c1acb1 100644
--- a/src/data/device_registry.ts
+++ b/src/data/device_registry.ts
@@ -64,13 +64,11 @@ export const computeDeviceName = (
device.name_by_user ||
device.name ||
(entities && fallbackDeviceName(hass, entities)) ||
- hass.localize(
- "ui.panel.config.devices.unnamed_device",
- "type",
- hass.localize(
+ hass.localize("ui.panel.config.devices.unnamed_device", {
+ type: hass.localize(
`ui.panel.config.devices.type.${device.entry_type || "device"}`
- )
- );
+ ),
+ });
export const devicesInArea = (devices: DeviceRegistryEntry[], areaId: string) =>
devices.filter((device) => device.area_id === areaId);
diff --git a/src/data/logbook.ts b/src/data/logbook.ts
index 8534d548ceb8..703ca6969dd9 100644
--- a/src/data/logbook.ts
+++ b/src/data/logbook.ts
@@ -194,7 +194,7 @@ export const localizeStateMessage = (
if (state === "home") {
return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_home`);
}
- return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_state`, "state", state);
+ return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_state`, { state });
case "sun":
return state === "above_horizon"
@@ -382,11 +382,9 @@ export const localizeStateMessage = (
return localize(`${LOGBOOK_LOCALIZE_PATH}.became_unavailable`);
}
- return hass.localize(
- `${LOGBOOK_LOCALIZE_PATH}.changed_to_state`,
- "state",
- stateObj ? hass.formatEntityState(stateObj, state) : state
- );
+ return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.changed_to_state`, {
+ state: stateObj ? hass.formatEntityState(stateObj, state) : state,
+ });
};
export const filterLogbookCompatibleEntities: HaEntityPickerEntityFilterFunc = (
diff --git a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
index afd1c6f159c2..7ed96ec06197 100644
--- a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
+++ b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts
@@ -56,9 +56,12 @@ class DialogConfigEntrySystemOptions extends LitElement {
@closed=${this.closeDialog}
.heading=${this.hass.localize(
"ui.dialogs.config_entry_system_options.title",
- "integration",
- this.hass.localize(`component.${this._params.entry.domain}.title`) ||
- this._params.entry.domain
+ {
+ integration:
+ this.hass.localize(
+ `component.${this._params.entry.domain}.title`
+ ) || this._params.entry.domain,
+ }
)}
>
${this._error ? html` ${this._error}
` : ""}
@@ -71,10 +74,12 @@ class DialogConfigEntrySystemOptions extends LitElement {
${this.hass.localize(
"ui.dialogs.config_entry_system_options.enable_new_entities_description",
- "integration",
- this.hass.localize(
- `component.${this._params.entry.domain}.title`
- ) || this._params.entry.domain
+ {
+ integration:
+ this.hass.localize(
+ `component.${this._params.entry.domain}.title`
+ ) || this._params.entry.domain,
+ }
)}
`}
.dir=${computeRTLDirection(this.hass)}
@@ -96,10 +101,12 @@ class DialogConfigEntrySystemOptions extends LitElement {
${this.hass.localize(
"ui.dialogs.config_entry_system_options.enable_polling_description",
- "integration",
- this.hass.localize(
- `component.${this._params.entry.domain}.title`
- ) || this._params.entry.domain
+ {
+ integration:
+ this.hass.localize(
+ `component.${this._params.entry.domain}.title`
+ ) || this._params.entry.domain,
+ }
)}
`}
.dir=${computeRTLDirection(this.hass)}
diff --git a/src/dialogs/config-flow/show-dialog-config-flow.ts b/src/dialogs/config-flow/show-dialog-config-flow.ts
index 23c37f1797b2..9ccc58184015 100644
--- a/src/dialogs/config-flow/show-dialog-config-flow.ts
+++ b/src/dialogs/config-flow/show-dialog-config-flow.ts
@@ -174,8 +174,7 @@ export const showConfigFlowDialog = (
${hass.localize(
"ui.panel.config.integrations.config_flow.created_config",
- "name",
- step.title
+ { name: step.title }
)}
`;
diff --git a/src/dialogs/config-flow/step-flow-create-entry.ts b/src/dialogs/config-flow/step-flow-create-entry.ts
index 1ceb034b7a0a..f7e15836d76b 100644
--- a/src/dialogs/config-flow/step-flow-create-entry.ts
+++ b/src/dialogs/config-flow/step-flow-create-entry.ts
@@ -98,8 +98,7 @@ class StepFlowCreateEntry extends LitElement {
showAlertDialog(this, {
text: this.hass.localize(
"ui.panel.config.integrations.config_flow.error_saving_area",
- "error",
- err.message
+ { error: err.message }
),
});
picker.value = null;
diff --git a/src/dialogs/notifications/configurator-notification-item.ts b/src/dialogs/notifications/configurator-notification-item.ts
index 306b0f40beed..ae69269952d1 100644
--- a/src/dialogs/notifications/configurator-notification-item.ts
+++ b/src/dialogs/notifications/configurator-notification-item.ts
@@ -25,11 +25,9 @@ export class HuiConfiguratorNotificationItem extends LitElement {
- ${this.hass.localize(
- "ui.notification_drawer.click_to_configure",
- "entity",
- this.notification.attributes.friendly_name
- )}
+ ${this.hass.localize("ui.notification_drawer.click_to_configure", {
+ entity: this.notification.attributes.friendly_name,
+ })}
diff --git a/src/dialogs/quick-bar/ha-quick-bar.ts b/src/dialogs/quick-bar/ha-quick-bar.ts
index 5db6f06289e6..4daf94a0f88e 100644
--- a/src/dialogs/quick-bar/ha-quick-bar.ts
+++ b/src/dialogs/quick-bar/ha-quick-bar.ts
@@ -525,11 +525,9 @@ export class QuickBar extends LitElement {
const commands = reloadableDomains.map((domain) => ({
primaryText:
this.hass.localize(`ui.dialogs.quick-bar.commands.reload.${domain}`) ||
- this.hass.localize(
- "ui.dialogs.quick-bar.commands.reload.reload",
- "domain",
- domainToName(localize, domain)
- ),
+ this.hass.localize("ui.dialogs.quick-bar.commands.reload.reload", {
+ domain: domainToName(localize, domain),
+ }),
action: () => this.hass.callService(domain, "reload"),
iconPath: mdiReload,
categoryText: this.hass.localize(
@@ -590,10 +588,11 @@ export class QuickBar extends LitElement {
const item = {
primaryText: this.hass.localize(
"ui.dialogs.quick-bar.commands.server_control.perform_action",
- "action",
- this.hass.localize(
- `ui.dialogs.quick-bar.commands.server_control.${action}`
- )
+ {
+ action: this.hass.localize(
+ `ui.dialogs.quick-bar.commands.server_control.${action}`
+ ),
+ }
),
iconPath: mdiServerNetwork,
categoryText: this.hass.localize(
diff --git a/src/layouts/hass-tabs-subpage-data-table.ts b/src/layouts/hass-tabs-subpage-data-table.ts
index 5efadf11017b..f891f6b1f9b3 100644
--- a/src/layouts/hass-tabs-subpage-data-table.ts
+++ b/src/layouts/hass-tabs-subpage-data-table.ts
@@ -147,11 +147,9 @@ export class HaTabsSubpageDataTable extends LitElement {
protected render(): TemplateResult {
const hiddenLabel = this.numHidden
? this.hiddenLabel ||
- this.hass.localize(
- "ui.components.data-table.hidden",
- "number",
- this.numHidden
- ) ||
+ this.hass.localize("ui.components.data-table.hidden", {
+ number: this.numHidden,
+ }) ||
this.numHidden
: undefined;
diff --git a/src/panels/config/application_credentials/ha-config-application-credentials.ts b/src/panels/config/application_credentials/ha-config-application-credentials.ts
index ec1b97dba308..43a4a4b525e3 100644
--- a/src/panels/config/application_credentials/ha-config-application-credentials.ts
+++ b/src/panels/config/application_credentials/ha-config-application-credentials.ts
@@ -120,8 +120,7 @@ export class HaConfigApplicationCredentials extends LitElement {
${this.hass.localize(
"ui.panel.config.application_credentials.picker.selected",
- "number",
- this._selected.length
+ { number: this._selected.length }
)}