<eg-string #cloneFailedString i18n-text text="Clone of entry failed or was not allowed">
</eg-string>
<eg-string #cloneSuccessString i18n-text text="Clone of entry succeeded"></eg-string>
+<eg-string #errorDuringTestString i18n-text text="Error when testing event definition:"></eg-string>
+<ng-template #errorDuringTestStringTmpl let-ilsevent="ilsevent" let-textcode="textcode" i18n>
+ Error when testing event defintion ({{ilsevent}}: {{textcode}}):
+</ng-template>
+<eg-string #eventDuringTestString [template]="errorDuringTestStringTmpl"></eg-string>
@ViewChild('deleteSuccessString') deleteSuccessString: StringComponent;
@ViewChild('createSuccessString') createSuccessString: StringComponent;
@ViewChild('createErrString') createErrString: StringComponent;
+ @ViewChild('eventDuringTestString') eventDuringTestString: StringComponent;
+ @ViewChild('errorDuringTestString') errorDuringTestString: StringComponent;
constructor(
private router: Router,
).subscribe(res => {
this.testDone = true;
if (res.ilsevent) {
- this.testErr1 = 'Event: ' + res.ilsevent + ': ' + res.textcode + ' ->';
+ this.eventDuringTestString.current({ ilsevent: res.ilsevent, textcode : res.textcode})
+ .then(str => this.testErr1 = str);
this.testErr2 = res.desc;
} else {
this.testResult = res.template_output().data();
}
+ }, err => {
+ this.testDone = true;
+ this.errorDuringTestString.current().then(str => this.testErr1 = str);
+ this.testErr2 = err;
});
}