feat: sync deployed v1.0.0-rc.38-custom.67

This commit is contained in:
cneicy committed 2026-10-06 00:07:10 +08:00
1 parent d2e03ab7e8
commit ffc8cf56db
154 files changed
+39540 -20509

No files matched your search

@@ -0,0 +1,32 @@
import { createInstance } from 'i18next'
import { describe, expect, it } from 'vitest'
import en from '../locales/en.json'
import zh from '../locales/zh.json'
describe('automatic routing translations', () => {
it('loads Chinese feature labels from the translation namespace', async () => {
const i18n = createInstance()
await i18n.init({
lng: 'zhCN',
fallbackLng: 'en',
resources: { zhCN: zh, en },
keySeparator: false,
})
expect(i18n.t('Automatic grouping')).toBe('自动分组')
expect(i18n.t('Automatic group settings')).toBe('自动分组设置')
expect(i18n.t('Low cost first')).toBe('低价优先')
expect(i18n.t('Fast response first')).toBe('高速优先')
expect(i18n.t('Stability first')).toBe('稳定优先')
expect(i18n.t('Allow recently degraded groups')).toBe(
'允许使用最近降智的渠道'
)
expect(i18n.t('Average charged / 1M tokens')).toBe('平均实扣 / 1M tokens')
expect(i18n.t('Request and cache statistics: last 24 hours')).toBe(
'请求与缓存统计:最近24小时'
)
await i18n.changeLanguage('en')
expect(i18n.t('Average charged / 1M tokens')).toBe(
'Average charged / 1M tokens'
)
})
})