From 2c463791a8c0dbb47ab11b89fdcb32da83f14943 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Wed, 24 Jan 2024 16:20:28 -0800 Subject: [PATCH 1/2] Show current language in TranslatableInput's label --- .../translatable-input.component.html | 6 +++++- .../translatable-input/translatable-input.component.ts | 3 +++ src/messages.xlf | 10 ++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html b/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html index 846bfa879ed..21f9003a562 100644 --- a/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html +++ b/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html @@ -1,6 +1,10 @@ - {{ defaultLanguageLabelRef.nativeElement.innerHTML }} + {{ defaultLanguageLabelRef.nativeElement.innerHTML }} ({{ + currentLanguage().language + }}) ; @ContentChild(MatInput) defaultLanguageInput: MatInput; @ContentChild(MatLabel, { read: ElementRef }) defaultLanguageLabelRef: ElementRef; protected defaultLanguageText: Signal; @@ -26,6 +28,7 @@ export class TranslatableInputComponent { private projectService: TeacherProjectService, private translateProjectService: TranslateProjectService ) { + this.currentLanguage = projectService.currentLanguage; this.showTranslationInput = computed(() => !this.projectService.isDefaultLocale()); } diff --git a/src/messages.xlf b/src/messages.xlf index 71f12b3b7bc..584637744eb 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -10116,18 +10116,20 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.75 - - + + () src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html - 3 + 4,6 (: ) src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.ts - 41,43 + 44,46 From 5e7f24a05c5e3fbb061757904690f08457b2d73d Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Thu, 25 Jan 2024 15:01:25 -0800 Subject: [PATCH 2/2] Remove i18n tag from label --- .../translatable-input/translatable-input.component.html | 2 +- src/messages.xlf | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html b/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html index 21f9003a562..3d2904450b6 100644 --- a/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html +++ b/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html @@ -1,6 +1,6 @@ - {{ defaultLanguageLabelRef.nativeElement.innerHTML }} ({{ currentLanguage().language }})75 - - () - - src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.html - 4,6 - - (: )