From c1a82a7457bf2c13593fd7c2d9b8015624629155 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Tue, 25 Jul 2023 15:21:28 +0200 Subject: [PATCH] remove and merge debug --- .../packages/core/localization/localize.element.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.ts index 944a926e63..121bd73f1a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.ts @@ -17,13 +17,6 @@ export class UmbLocalizeElement extends UmbLitElement { @property({ type: String }) key!: string; - /** - * If true, the key will be rendered instead of the localized value if the key is not found. - * @attr - */ - @property({ type: Boolean }) - debug = false; - @state() get value(): string { return this.#value; @@ -56,11 +49,9 @@ export class UmbLocalizeElement extends UmbLitElement { this.value = value; }, error: (error) => { + console.warn('Failed to localize key:', this.key, error); (this.getHostElement() as HTMLElement).setAttribute('data-umb-localize-error', (error as Error).message); - if (this.debug) { - console.error('Failed to localize key:', this.key, error); - this.value = this.key; - } + this.value = this.key; }, }); }