remove wrong use of get in translation service

This commit is contained in:
Eugenio Romano 2019-07-11 19:50:03 +01:00
parent ccdcba8778
commit 5ce06d80cb
2 changed files with 7 additions and 9 deletions

View File

@ -396,8 +396,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
} }
onContentActionSuccess(message) { onContentActionSuccess(message) {
const translatedMessage: any = this.translateService.get(message); const translatedMessage: any = this.translateService.instant(message);
this.openSnackMessage(translatedMessage.value); this.openSnackMessage(translatedMessage);
this.documentList.reload(); this.documentList.reload();
} }
@ -424,8 +424,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
width: '630px' width: '630px'
}); });
} else { } else {
const translatedErrorMessage: any = this.translateService.get('OPERATION.ERROR.PERMISSION'); const translatedErrorMessage: any = this.translateService.instant('OPERATION.ERROR.PERMISSION');
this.openSnackMessage(translatedErrorMessage.value); this.openSnackMessage(translatedErrorMessage);
} }
} }
@ -442,8 +442,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
width: '630px' width: '630px'
}); });
} else { } else {
const translatedErrorMessage: any = this.translateService.get('OPERATION.ERROR.PERMISSION'); const translatedErrorMessage: any = this.translateService.instant('OPERATION.ERROR.PERMISSION');
this.openSnackMessage(translatedErrorMessage.value); this.openSnackMessage(translatedErrorMessage);
} }
} }

View File

@ -93,9 +93,7 @@ export class TagActionsComponent implements OnChanges, OnInit, OnDestroy {
addTag() { addTag() {
if (this.searchTag(this.newTagName)) { if (this.searchTag(this.newTagName)) {
this.translateService.get('TAG.MESSAGES.EXIST').subscribe((error) => { this.errorMsg = this.translateService.instant('TAG.MESSAGES.EXIST');
this.errorMsg = error;
});
this.error.emit(this.errorMsg); this.error.emit(this.errorMsg);
} else { } else {
this.tagService.addTag(this.nodeId, this.newTagName).subscribe(() => { this.tagService.addTag(this.nodeId, this.newTagName).subscribe(() => {