diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts index ed7098e150..bb9cdc512c 100644 --- a/demo-shell/src/app/components/files/files.component.ts +++ b/demo-shell/src/app/components/files/files.component.ts @@ -396,8 +396,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { } onContentActionSuccess(message) { - const translatedMessage: any = this.translateService.get(message); - this.openSnackMessage(translatedMessage.value); + const translatedMessage: any = this.translateService.instant(message); + this.openSnackMessage(translatedMessage); this.documentList.reload(); } @@ -424,8 +424,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { width: '630px' }); } else { - const translatedErrorMessage: any = this.translateService.get('OPERATION.ERROR.PERMISSION'); - this.openSnackMessage(translatedErrorMessage.value); + const translatedErrorMessage: any = this.translateService.instant('OPERATION.ERROR.PERMISSION'); + this.openSnackMessage(translatedErrorMessage); } } @@ -442,8 +442,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { width: '630px' }); } else { - const translatedErrorMessage: any = this.translateService.get('OPERATION.ERROR.PERMISSION'); - this.openSnackMessage(translatedErrorMessage.value); + const translatedErrorMessage: any = this.translateService.instant('OPERATION.ERROR.PERMISSION'); + this.openSnackMessage(translatedErrorMessage); } } diff --git a/lib/content-services/tag/tag-actions.component.ts b/lib/content-services/tag/tag-actions.component.ts index 05e69278c2..881f936f37 100644 --- a/lib/content-services/tag/tag-actions.component.ts +++ b/lib/content-services/tag/tag-actions.component.ts @@ -93,9 +93,7 @@ export class TagActionsComponent implements OnChanges, OnInit, OnDestroy { addTag() { if (this.searchTag(this.newTagName)) { - this.translateService.get('TAG.MESSAGES.EXIST').subscribe((error) => { - this.errorMsg = error; - }); + this.errorMsg = this.translateService.instant('TAG.MESSAGES.EXIST'); this.error.emit(this.errorMsg); } else { this.tagService.addTag(this.nodeId, this.newTagName).subscribe(() => {