Add i18n completion tool.

This commit is contained in:
Florian THIERRY
2024-09-21 12:20:22 +02:00
parent 3935f6ad21
commit b546a0cf01
8 changed files with 665 additions and 10 deletions

View File

@@ -40,8 +40,8 @@ export class MyPublicationsService {
this.publicationsSubject.next(publications);
})
.catch(error => {
const errorMessage = 'An error occurred while retrieving your publications...';
this.snackBar.open(errorMessage);
const errorMessage = $localize`An error occurred while retrieving your publications...`;
this.snackBar.open(errorMessage, $localize`Close`, { duration: 5000 });
console.error(errorMessage, error);
})
.finally(() => {
@@ -50,7 +50,7 @@ export class MyPublicationsService {
});
} else {
this.authenticationService.unauthenticate();
this.snackBar.open('You are unauthenticated. Please, log-in first.', 'Close', { duration: 5000 });
this.snackBar.open($localize`You are unauthenticated. Please, log-in first.`, $localize`Close`, { duration: 5000 });
this.router.navigate(['/login']);
}
}