From aa7522f681ed29cef1bd9ee949703928dca93dcf Mon Sep 17 00:00:00 2001 From: Leslie Fernando Date: Sun, 5 Oct 2025 17:19:14 +0530 Subject: [PATCH] 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 --- src/panels/developer-tools/action/developer-tools-action.ts | 4 ++-- src/state/connection-mixin.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/panels/developer-tools/action/developer-tools-action.ts b/src/panels/developer-tools/action/developer-tools-action.ts index 8a9648fb12..0dd538d17f 100644 --- a/src/panels/developer-tools/action/developer-tools-action.ts +++ b/src/panels/developer-tools/action/developer-tools-action.ts @@ -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 ); diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index a6ff504f92..ee59ba64d4 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -128,11 +128,11 @@ export const connectionMixin = >( } 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 );