Add i18n completion tool.
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
<h1>Your publications</h1>
|
||||
<h1 i18n>Your publications</h1>
|
||||
|
||||
<a [routerLink]="['/publications/new']"
|
||||
class="new-publication"
|
||||
matTooltip="Add a new publication"
|
||||
matTooltipPosition="left">
|
||||
matTooltipPosition="left"
|
||||
i18n-matTooltip>
|
||||
+
|
||||
</a>
|
||||
|
||||
@if ((isLoading$ | async) === true) {
|
||||
<h2>Publication loading...</h2>
|
||||
<h2 i18n>Publication loading...</h2>
|
||||
<mat-spinner></mat-spinner>
|
||||
} @else {
|
||||
@if ((isLoaded$ | async) === true) {
|
||||
<app-publication-list [publications$]="publications$"></app-publication-list>
|
||||
} @else {
|
||||
<h2>There is no any publication...</h2>
|
||||
<h2 i18n>There is no any publication...</h2>
|
||||
}
|
||||
}
|
||||
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user