From 838a2871eb6eecea1903d3324ebbf62f986c7571 Mon Sep 17 00:00:00 2001 From: Makko Date: Mon, 26 Aug 2024 10:31:54 +0200 Subject: [PATCH 1/4] alert: typo in the alternative text of the close button Refs: #6632 --- packages/components/src/components/alert/component.tsx | 9 ++++++++- packages/components/src/locales/de.ts | 2 +- packages/components/src/locales/en.ts | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/components/src/components/alert/component.tsx b/packages/components/src/components/alert/component.tsx index 119327cdb5..b9b113da63 100644 --- a/packages/components/src/components/alert/component.tsx +++ b/packages/components/src/components/alert/component.tsx @@ -45,6 +45,11 @@ export class KolAlertWc implements AlertAPI { }; public render(): JSX.Element { + let trimmedLabelforTranslation = this.state._label?.trim() || ''; + if (trimmedLabelforTranslation) { + trimmedLabelforTranslation = ` ${trimmedLabelforTranslation}`; + } + if (this.state._alert) { /** * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate @@ -61,6 +66,8 @@ export class KolAlertWc implements AlertAPI { }, 10000); } + console.log('TEST LABEL: ', this.state._label); + return ( diff --git a/packages/components/src/locales/de.ts b/packages/components/src/locales/de.ts index f5bdd8fc53..0537fb6a17 100644 --- a/packages/components/src/locales/de.ts +++ b/packages/components/src/locales/de.ts @@ -43,7 +43,7 @@ export default { dropdown: 'Auswahlliste', 'nav-label-open': 'Untermenü zu {{label}} öffnen', 'nav-label-close': 'Untermenü zu {{label}} schließen', - 'close-alert': 'Benachrichtigung {{label}} schließen', + 'close-alert': 'Benachrichtigung{{label}} schließen', 'show-password': 'einblenden', 'hide-password': 'ausblenden', 'no-results-message': 'Keine Ergebnisse gefunden.', diff --git a/packages/components/src/locales/en.ts b/packages/components/src/locales/en.ts index 66bf67e66b..19bd30a60b 100644 --- a/packages/components/src/locales/en.ts +++ b/packages/components/src/locales/en.ts @@ -43,7 +43,7 @@ export default { dropdown: 'Dropdown', 'nav-label-open': 'Submenu for {{label}} open', 'nav-label-close': 'Submenu for {{label}} close', - 'close-alert': 'Notification {{label}} close', + 'close-alert': 'Close notification{{label}}', 'show-password': 'Show', 'hide-password': 'Hide', 'no-results-message': 'No results found.', From 2a029bbb187d1e5ab46b25291be2ed23793257cb Mon Sep 17 00:00:00 2001 From: Makko Date: Mon, 26 Aug 2024 11:26:38 +0200 Subject: [PATCH 2/4] fix Refs: #6632 --- packages/components/src/components/alert/component.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/components/src/components/alert/component.tsx b/packages/components/src/components/alert/component.tsx index b9b113da63..08e990373d 100644 --- a/packages/components/src/components/alert/component.tsx +++ b/packages/components/src/components/alert/component.tsx @@ -66,8 +66,6 @@ export class KolAlertWc implements AlertAPI { }, 10000); } - console.log('TEST LABEL: ', this.state._label); - return ( Date: Tue, 27 Aug 2024 10:20:58 +0200 Subject: [PATCH 3/4] label refactored Refs: #6632 --- packages/components/src/components/alert/component.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/components/src/components/alert/component.tsx b/packages/components/src/components/alert/component.tsx index 08e990373d..8af8301c97 100644 --- a/packages/components/src/components/alert/component.tsx +++ b/packages/components/src/components/alert/component.tsx @@ -45,11 +45,6 @@ export class KolAlertWc implements AlertAPI { }; public render(): JSX.Element { - let trimmedLabelforTranslation = this.state._label?.trim() || ''; - if (trimmedLabelforTranslation) { - trimmedLabelforTranslation = ` ${trimmedLabelforTranslation}`; - } - if (this.state._alert) { /** * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate @@ -98,7 +93,7 @@ export class KolAlertWc implements AlertAPI { icon: 'codicon codicon-close', }, }} - _label={translate('kol-close-alert', { placeholders: { label: trimmedLabelforTranslation } })} + _label={translate('kol-close-alert', { placeholders: { label: this.state._label?.trim() || '' } })} _on={this.on} _tooltipAlign="left" > From fe46b814c3336d1b59f8a630447e21685aeb26d1 Mon Sep 17 00:00:00 2001 From: Makko Date: Tue, 27 Aug 2024 10:30:01 +0200 Subject: [PATCH 4/4] refactored translation template Refs: #6632 --- packages/components/src/locales/de.ts | 2 +- packages/components/src/locales/en.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/locales/de.ts b/packages/components/src/locales/de.ts index 0537fb6a17..f5bdd8fc53 100644 --- a/packages/components/src/locales/de.ts +++ b/packages/components/src/locales/de.ts @@ -43,7 +43,7 @@ export default { dropdown: 'Auswahlliste', 'nav-label-open': 'Untermenü zu {{label}} öffnen', 'nav-label-close': 'Untermenü zu {{label}} schließen', - 'close-alert': 'Benachrichtigung{{label}} schließen', + 'close-alert': 'Benachrichtigung {{label}} schließen', 'show-password': 'einblenden', 'hide-password': 'ausblenden', 'no-results-message': 'Keine Ergebnisse gefunden.', diff --git a/packages/components/src/locales/en.ts b/packages/components/src/locales/en.ts index 19bd30a60b..d764a6a8bd 100644 --- a/packages/components/src/locales/en.ts +++ b/packages/components/src/locales/en.ts @@ -43,7 +43,7 @@ export default { dropdown: 'Dropdown', 'nav-label-open': 'Submenu for {{label}} open', 'nav-label-close': 'Submenu for {{label}} close', - 'close-alert': 'Close notification{{label}}', + 'close-alert': 'Close notification {{label}}', 'show-password': 'Show', 'hide-password': 'Hide', 'no-results-message': 'No results found.',