refactor(frontend): modularize i18n architecture

This commit is contained in:
elky
2026-06-30 17:01:39 +08:00
parent bf29129a4b
commit 9f138d09e6
118 changed files with 11940 additions and 5368 deletions
+9
View File
@@ -1,3 +1,5 @@
import { beforeEach } from 'vitest'
function createMemoryStorage(): Storage {
const store = new Map<string, string>()
@@ -41,3 +43,10 @@ function installStorage(name: 'localStorage' | 'sessionStorage') {
installStorage('localStorage')
installStorage('sessionStorage')
beforeEach(async () => {
localStorage.clear()
sessionStorage.clear()
const { setI18nLocale } = await import('@/i18n')
setI18nLocale('zh-CN')
})