Когда я использую свой сервис для печати сообщения, JhiAlertService пытается перевести сообщение, как я могу отключить?
import { Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { JhiAlertService } from 'ng-jhipster';
@Injectable({
providedIn: 'root'
})
export class MessageServiceService {
constructor(public translate: TranslateService, public alertService: JhiAlertService) {
this.getTranslations();
}
getTranslations(){
this.clientError1 = this.translate.instant('global.error.clientError1');
this.clientError2 = this.translate.instant('global.error.clientError2');
}
printError(name, clientnumber) {
this.alertService.error(
this.clientError1 + name + this.clientError2 + clientnumber
);
}
}