Connection status i18n fix
This commit is contained in:
parent
9d1cdea98b
commit
db7c3d6bec
@ -1,5 +1,5 @@
|
||||
<div *ngIf="connectionStatus$ | async as status" [@animateOpenClose]="status" [ngClass]="status" class="indicator flex-align-items-center">
|
||||
<span [translate]="'error.' + status"></span>
|
||||
<span [translate]="translations[status]"></span>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="errorService.serverError$ | async as error">
|
||||
|
||||
@ -5,6 +5,7 @@ import { animate, state, style, transition, trigger } from '@angular/animations'
|
||||
import { fromEvent, merge, Observable } from 'rxjs';
|
||||
import { delay, map, mapTo } from 'rxjs/operators';
|
||||
import { shareLast } from '../../utils';
|
||||
import { connectionStatusTranslations } from '../../translations/connection-status-translations';
|
||||
|
||||
@Component({
|
||||
selector: 'iqser-full-page-error',
|
||||
@ -21,6 +22,7 @@ import { shareLast } from '../../utils';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class FullPageErrorComponent {
|
||||
translations = connectionStatusTranslations;
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
readonly connectionStatus$: Observable<string | undefined>;
|
||||
|
||||
|
||||
6
src/lib/translations/connection-status-translations.ts
Normal file
6
src/lib/translations/connection-status-translations.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
export const connectionStatusTranslations: { [key in string]: string } = {
|
||||
online: _('error.online'),
|
||||
offline: _('error.offline'),
|
||||
} as const;
|
||||
Loading…
x
Reference in New Issue
Block a user