From 82204be544161857397b3dc0f6d135e373aba746 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 26 Dec 2020 15:27:39 +0900 Subject: [PATCH] fix locale handling --- src/client/pages/settings/general.vue | 1 + src/client/sw/i18n.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/pages/settings/general.vue b/src/client/pages/settings/general.vue index 8869644ce..5d79b693f 100644 --- a/src/client/pages/settings/general.vue +++ b/src/client/pages/settings/general.vue @@ -145,6 +145,7 @@ export default defineComponent({ watch: { lang() { localStorage.setItem('lang', this.lang); + localStorage.removeItem('locale'); location.reload(); }, diff --git a/src/client/sw/i18n.ts b/src/client/sw/i18n.ts index 524a205b2..9b3e3b2f4 100644 --- a/src/client/sw/i18n.ts +++ b/src/client/sw/i18n.ts @@ -1,3 +1,5 @@ import { I18n } from '@/i18n'; -export const i18n = new I18n(_LOCALE_); +export const i18n = new I18n({ + // TODO +});