i18n for files in core package.
This commit is contained in:
@@ -12,7 +12,7 @@ export const authenticationGuard: CanActivateFn = () => {
|
||||
return true;
|
||||
} else {
|
||||
router.navigate(['/login']);
|
||||
snackBar.open('You are unauthenticated. Please, log-in first.', 'Close', { duration: 5000 });
|
||||
snackBar.open($localize`You are unauthenticated. Please, log-in first.`, $localize`Close`, { duration: 5000 });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ export class JwtInterceptor implements HttpInterceptor {
|
||||
this.router.navigate(['/login']);
|
||||
this.refreshTokenSubject.next(undefined);
|
||||
this.authenticationService.unauthenticate();
|
||||
this.snackBar.open('You are unauthenticated. Please, re-authenticate before retrying your action.', 'Close', { duration: 5000 });
|
||||
this.snackBar.open($localize`You are unauthenticated. Please, re-authenticate before retrying your action.`, $localize`Close`, { duration: 5000 });
|
||||
return throwError(() => initialError);
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ export class CategoryService {
|
||||
if (!this.categories?.length) {
|
||||
this.categoryRestService.getCategories()
|
||||
.then(categories => this.categoriesSubject.next(categories))
|
||||
.catch(error => console.error('An error occured while loading categories.', error));
|
||||
.catch(error => console.error($localize`An error occured while loading categories.`, error));
|
||||
}
|
||||
return this.categoriesSubject.asObservable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user