This commit is contained in:
Florian THIERRY
2024-09-21 21:34:16 +02:00
parent 208b935ffa
commit f8d73c9ed0
12 changed files with 110 additions and 76 deletions

View File

@@ -101,7 +101,7 @@ export class PublicationEditionService implements OnDestroy {
this.activatedRoute.paramMap.subscribe(params => {
const publicationId = params.get('publicationId');
if (publicationId == undefined) {
this.snackBar.open('A technical error occurred while loading publication data.', 'Close', {duration: 5000});
this.snackBar.open($localize`A technical error occurred while loading publication data.`, $localize`Close`, { duration: 5000 });
this.location.back();
} else {
this.publicationRestService.getById(publicationId)
@@ -111,8 +111,8 @@ export class PublicationEditionService implements OnDestroy {
this.stateSubject.next(state);
})
.catch(error => {
const errorMessage = 'A technical error occurred while loading publication data.';
this.snackBar.open(errorMessage, 'Close', {duration: 5000});
const errorMessage = $localize`A technical error occurred while loading publication data.`;
this.snackBar.open(errorMessage, $localize`Close`, {duration: 5000});
console.error(errorMessage, error)
})
.finally(() => this.isLoadingSubject.next(false));