i18n of publication creation page.

This commit is contained in:
Florian THIERRY
2024-09-21 20:57:05 +02:00
parent 36208ef071
commit 67c3d0b3e6
4 changed files with 16 additions and 4 deletions

View File

@@ -63,13 +63,13 @@ export class PublicationCreationComponent implements OnInit {
this.isSavingSubject.next(true);
this.publicationRestService.create(publication)
.then(() => {
this.snackBar.open('Publication created succesfully!', 'Close', { duration: 5000 });
this.snackBar.open($localize`Publication created succesfully!`, $localize`Close`, { duration: 5000 });
this.router.navigate(['/my-publications']);
})
.catch(error => {
const errorMessage = 'An error occured while saving new publication.';
const errorMessage = $localize`An error occured while saving new publication.`;
console.error(errorMessage, error);
this.snackBar.open(errorMessage, 'Close', { duration: 5000 });
this.snackBar.open(errorMessage, $localize`Close`, { duration: 5000 });
})
.finally(() => this.isSavingSubject.next(false));
}