From b00c60ef275868852e4bcb5449e93eece4454316 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Fri, 2 Jan 2026 01:36:19 +0530 Subject: [PATCH] WEB-538:fix translation issue in notes module (#2955) --- .../entity-notes-tab.component.html | 21 +++++++------------ .../entity-notes-tab.component.ts | 9 +++++--- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html index 00f19f147..f2652869b 100644 --- a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html +++ b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html @@ -18,14 +18,7 @@ cdkAutosizeMinRows="2" > - @@ -41,7 +34,9 @@ diff --git a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts index b268a43a8..b8361bc5b 100644 --- a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts +++ b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts @@ -11,6 +11,7 @@ import { CdkTextareaAutosize } from '@angular/cdk/text-field'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'mifosx-entity-notes-tab', @@ -30,6 +31,7 @@ export class EntityNotesTabComponent implements OnInit { private clientsService = inject(ClientsService); private groupsService = inject(GroupsService); private dialog = inject(MatDialog); + private translateService = inject(TranslateService); @ViewChild('formRef', { static: true }) formRef: any; @@ -69,14 +71,14 @@ export class EntityNotesTabComponent implements OnInit { required: true, value: noteContent, controlType: 'input', - label: 'Note' + label: this.translateService.instant('labels.inputs.Note') } ], layout: { columns: 1, addButtonText: 'Confirm' }, - title: 'Edit Note' + title: this.translateService.instant('labels.heading.Edit Note') } }); editNoteDialogRef.afterClosed().subscribe((response: any) => { @@ -87,8 +89,9 @@ export class EntityNotesTabComponent implements OnInit { } deleteNote(noteId: string, index: number) { + const noteLabel = this.translateService.instant('labels.inputs.Note'); const deleteNoteDialogRef = this.dialog.open(DeleteDialogComponent, { - data: { deleteContext: `Note: ${this.entityNotes[index].note}` } + data: { deleteContext: `${noteLabel}: ${this.entityNotes[index].note}` } }); deleteNoteDialogRef.afterClosed().subscribe((response: any) => { if (response.delete) {