diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2020-05-23 13:19:31 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-23 13:19:31 +0900 |
| commit | 3963ed8ff7488a0e2f7f3876461f909e6be08e25 (patch) | |
| tree | d019d1d294e8ca757479dc638f977ae10b5f44da /src/client/config.ts | |
| parent | fix(i18n): Fix missing translation (diff) | |
| download | misskey-3963ed8ff7488a0e2f7f3876461f909e6be08e25.tar.gz misskey-3963ed8ff7488a0e2f7f3876461f909e6be08e25.tar.bz2 misskey-3963ed8ff7488a0e2f7f3876461f909e6be08e25.zip | |
feat(client): 翻訳をIndexedDBに保存・プッシュ通知を翻訳 (#6396)
* wip
* tabun ok
* better msg
* oops
* fix lint
* Update gulpfile.ts
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
* Update src/client/scripts/set-i18n-contexts.ts
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
* refactor
Co-authored-by: acid-chicken <root@acid-chicken.com>
* ✨
* wip
* fix lint
* たぶんおk
* fix flush
* Translate Notification
* remove console.log
* fix
* add notifications
* remove san
* wip
* ok
* :v:
* Update src/prelude/array.ts
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
* wip
* i18n refactor
* Update init.ts
* :v:
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
Diffstat (limited to 'src/client/config.ts')
| -rw-r--r-- | src/client/config.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/config.ts b/src/client/config.ts index 0d4a96964e..f71647a05c 100644 --- a/src/client/config.ts +++ b/src/client/config.ts @@ -1,3 +1,6 @@ +import { clientDb, entries } from './db'; +import { fromEntries } from '../prelude/array'; + declare const _LANGS_: string[]; declare const _VERSION_: string; declare const _ENV_: string; @@ -12,7 +15,7 @@ export const apiUrl = url + '/api'; export const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://') + '/streaming'; export const lang = localStorage.getItem('lang'); export const langs = _LANGS_; -export const locale = JSON.parse(localStorage.getItem('locale')); +export const getLocale = async () => fromEntries((await entries(clientDb.i18n)) as [string, string][]); export const version = _VERSION_; export const env = _ENV_; export const instanceName = siteName === 'Misskey' ? null : siteName; |