diff options
| author | zyoshoka <107108195+zyoshoka@users.noreply.github.com> | 2024-08-30 10:58:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-30 10:58:11 +0900 |
| commit | 06855f769f1fe8c84fc3bbef615dac0a9fd2cf7b (patch) | |
| tree | 5d69a21575f1ab993c79ad35f66186f8df7c7d89 /packages/sw/src/scripts/lang.ts | |
| parent | fix(backend): correct `app`-type notification schema (#14471) (diff) | |
| download | sharkey-06855f769f1fe8c84fc3bbef615dac0a9fd2cf7b.tar.gz sharkey-06855f769f1fe8c84fc3bbef615dac0a9fd2cf7b.tar.bz2 sharkey-06855f769f1fe8c84fc3bbef615dac0a9fd2cf7b.zip | |
refactor(sw): use fully typed locales (#14470)
* refactor(sw): use fully typed locales
* fix(backend): enumerate achievement notification type
Diffstat (limited to 'packages/sw/src/scripts/lang.ts')
| -rw-r--r-- | packages/sw/src/scripts/lang.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/sw/src/scripts/lang.ts b/packages/sw/src/scripts/lang.ts index 6fccedd746..0db4cc6381 100644 --- a/packages/sw/src/scripts/lang.ts +++ b/packages/sw/src/scripts/lang.ts @@ -7,7 +7,8 @@ * Language manager for SW */ import { get, set } from 'idb-keyval'; -import { I18n, type Locale } from '@/scripts/i18n.js'; +import { I18n } from '../../../frontend/src/scripts/i18n.js'; +import type { Locale } from '../../../../locales/index.js'; class SwLang { public cacheName = `mk-cache-${_VERSION_}`; @@ -23,7 +24,7 @@ class SwLang { return this.fetchLocale(); } - public i18n: Promise<I18n> | null = null; + public i18n: Promise<I18n<Locale>> | null = null; public fetchLocale(): Promise<I18n<Locale>> { return (this.i18n = this._fetch()); |