mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
* fix typeo in patch db seed * show all registries in updates tab, fix required dependnecy display in marketplace, update browser tab title desc * always show pointer for version select * chore: fix comments * support html in action desc and marketplace long desc, only show qr in action res if qr is true * disable save if smtp creds not edited, show better smtp success message * dont dismiss login spinner until patchDB returns * feat: redesign of service dashboard and interface (#2946) * feat: redesign of service dashboard and interface * chore: comments * re-add setup complete * dibale launch UI when not running, re-style things, rename things * back to 1000 * fix clearnet docs link and require password retype in setup wiz * faster hint display * display dependency ID if title not available * fix migration * better init progress view * fix setup success page by providing VERSION and notifications page fixes * force uninstall from service error page, soft or hard * handle error state better * chore: fixed for install and setup wizards * chore: fix issues (#2949) * enable and disable kiosk mode * minor fixes * fix dependency mounts * dismissable tasks * provide replayId * default if health check success message is null * look for wifi interface too * dash for null user agent in sessions * add disk repair to diagnostic api --------- Co-authored-by: waterplea <alexander@inkin.ru> Co-authored-by: Aiden McClelland <me@drbonez.dev>
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { inject, Injectable, signal } from '@angular/core'
|
|
import { TuiLanguageName, TuiLanguageSwitcherService } from '@taiga-ui/i18n'
|
|
import { I18N, I18N_LOADER, I18N_STORAGE } from './i18n.providers'
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class i18nService extends TuiLanguageSwitcherService {
|
|
private readonly i18n = inject(I18N)
|
|
private readonly i18nLoader = inject(I18N_LOADER)
|
|
private readonly store = inject(I18N_STORAGE)
|
|
|
|
readonly loading = signal(false)
|
|
|
|
override setLanguage(language: TuiLanguageName = 'english'): void {
|
|
const current = this.language
|
|
|
|
super.setLanguage(language)
|
|
this.loading.set(true)
|
|
|
|
if (current === language) {
|
|
this.i18nLoader(language).then(value => {
|
|
this.i18n.set(value)
|
|
this.loading.set(false)
|
|
})
|
|
} else {
|
|
this.store(language).then(() =>
|
|
this.i18nLoader(language).then(value => {
|
|
this.i18n.set(value)
|
|
this.loading.set(false)
|
|
}),
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
export const languages = [
|
|
'english',
|
|
'spanish',
|
|
'polish',
|
|
'german',
|
|
'french',
|
|
] as const
|
|
export type Languages = (typeof languages)[number]
|