Files
DeepTutor/web/tests/workspace-i18n.spec.ts
Bingxi Zhao (Frank) da856ad670 release: v1.6.9
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.

Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
2026-09-21 02:30:40 +08:00

16 lines
705 B
TypeScript

import { expect, it } from 'vitest'
import { ensureLanguage, initI18n } from '@/i18n/init'
import common from '@/locales/zh/common.json'
it('loads all workspace resource translations in the runtime namespace', async () => {
const i18n = initI18n()
await ensureLanguage('zh')
const t = i18n.getFixedT('zh', 'app')
for (const key of Object.keys(common).filter(key => !key.startsWith('language.') && !key.startsWith('common.'))) {
expect(i18n.exists(key, { lng: 'zh', ns: 'app' }), key).toBe(true)
}
expect(t('Assigned resources')).toBe('分配资源')
expect(t('MCP services')).toBe('MCP 服务')
expect(t('{{count}} resources selected', { count: 2 })).toBe('已选择 2 项资源')
})