mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 02:17:46 +08:00
refactor(frontend): modularize i18n architecture
This commit is contained in:
@@ -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')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user