1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-15 07:25:54 +00:00

Fix inconsistent variable naming: lokalize localize (#27340)

- Rename variable from 'lokalize' to 'localize' for consistency
- Affects developer-tools action panel and connection mixin
- Matches standard naming convention used throughout codebase
- Improves code readability and maintains naming standards
This commit is contained in:
Leslie Fernando
2025-10-05 17:19:14 +05:30
committed by GitHub
parent c09e97a561
commit aa7522f681
2 changed files with 4 additions and 4 deletions

View File

@@ -539,11 +539,11 @@ class HaPanelDevAction extends LitElement {
let localizedErrorMessage: string | undefined;
if (err.translation_domain && err.translation_key) {
const lokalize = await this.hass.loadBackendTranslation(
const localize = await this.hass.loadBackendTranslation(
"exceptions",
err.translation_domain
);
localizedErrorMessage = lokalize(
localizedErrorMessage = localize(
`component.${err.translation_domain}.exceptions.${err.translation_key}.message`,
err.translation_placeholders
);

View File

@@ -128,11 +128,11 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
}
if (notifyOnError) {
forwardHaptic(this, "failure");
const lokalize = await this.hass!.loadBackendTranslation(
const localize = await this.hass!.loadBackendTranslation(
"exceptions",
err.translation_domain
);
const localizedErrorMessage = lokalize(
const localizedErrorMessage = localize(
`component.${err.translation_domain}.exceptions.${err.translation_key}.message`,
err.translation_placeholders
);