From 81f9659af19bb071cd6d5546fddceacdc51a8404 Mon Sep 17 00:00:00 2001 From: rusikv Date: Wed, 19 Jul 2023 14:40:38 +0300 Subject: [PATCH] Add custom translation for Subject and Text columns in inbox notifications table --- .../notification/inbox/inbox-table-config.resolver.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts index f8088c28cb..84aa5d7e33 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts @@ -39,6 +39,7 @@ import { } from '@home/pages/notification/inbox/inbox-notification-dialog.component'; import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot, Resolve } from '@angular/router'; +import { UtilsService } from '@core/services/utils.service'; @Injectable() export class InboxTableConfigResolver implements Resolve> { @@ -48,7 +49,8 @@ export class InboxTableConfigResolver implements Resolve('createdTime', 'common.created-time', this.datePipe, '170px'), new EntityTableColumn('type', 'notification.type', '10%', (notification) => this.translate.instant(NotificationTemplateTypeTranslateMap.get(notification.type).name)), - new EntityTableColumn('subject', 'notification.subject', '30%'), - new EntityTableColumn('text', 'notification.message', '60%') + new EntityTableColumn('subject', 'notification.subject', '30%', + (entity) => this.utilsService.customTranslation(entity.subject, entity.subject)), + new EntityTableColumn('text', 'notification.message', '60%', + (entity) => this.utilsService.customTranslation(entity.text, entity.text)) ); }