feat(commands): multi-select ordered command pipeline with step reordering and single-pass composition (AI-05, AI-07)
This commit is contained in:
parent
f49acf0105
commit
10af20a0ad
157 changed files with 29455 additions and 913 deletions
61
apps/desktop/tests/main/services/i18n-locale-parity.test.ts
Normal file
61
apps/desktop/tests/main/services/i18n-locale-parity.test.ts
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
// tests/main/services/i18n-locale-parity.test.ts
|
||||
// GAP-I18N-01 / GAP-UX-07 / GAP-LLM-01 회귀 방지 테스트:
|
||||
// 12개 지원 로케일 파일의 키 집합이 마스터(ko.json)와 100% 일치하는지 검증한다.
|
||||
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { LOCALE_META } from '@d3ro/i18n'
|
||||
|
||||
const LOCALES_DIR = path.resolve(__dirname, '../../../../../packages/i18n/src/locales')
|
||||
|
||||
describe('i18n 12개 로케일 키 정합성 (GAP-I18N-01 / GAP-UX-07 / GAP-LLM-01)', () => {
|
||||
const ko = JSON.parse(fs.readFileSync(path.join(LOCALES_DIR, 'ko.json'), 'utf8')) as Record<string, string>
|
||||
const en = JSON.parse(fs.readFileSync(path.join(LOCALES_DIR, 'en.json'), 'utf8')) as Record<string, string>
|
||||
const masterKeys = Object.keys(ko)
|
||||
|
||||
it('마스터(ko.json)와 영어(en.json)의 키 집합이 정확히 일치한다', () => {
|
||||
const missingInEn = masterKeys.filter((k) => !(k in en))
|
||||
const extraInEn = Object.keys(en).filter((k) => !(k in ko))
|
||||
expect(missingInEn).toEqual([])
|
||||
expect(extraInEn).toEqual([])
|
||||
})
|
||||
|
||||
it.each(LOCALE_META.map((m) => m.code))(
|
||||
"로케일 '%s'가 마스터(ko.json)의 모든 키를 빠짐없이 포함한다",
|
||||
(localeCode) => {
|
||||
const filePath = path.join(LOCALES_DIR, `${localeCode}.json`)
|
||||
const data = JSON.parse(fs.readFileSync(filePath, 'utf8')) as Record<string, string>
|
||||
const missing = masterKeys.filter((k) => !(k in data) || typeof data[k] !== 'string' || data[k].length === 0)
|
||||
expect(missing).toEqual([])
|
||||
},
|
||||
)
|
||||
|
||||
it('온보딩 LLM 모델 크기 안내가 기본 모델(gemma4:e4b, 4.0GB)과 일치한다 (GAP-UX-07)', () => {
|
||||
expect(ko['onboarding.llmModelSize']).toContain('4.0GB')
|
||||
expect(en['onboarding.llmModelSize']).toContain('4.0GB')
|
||||
})
|
||||
|
||||
it('번역 대상 언어 설정 키가 정의되어 있다 (GAP-LLM-01)', () => {
|
||||
const requiredKeys = [
|
||||
'settings.targetLanguage',
|
||||
'settings.targetLanguage.desc',
|
||||
'settings.targetLanguage.en',
|
||||
'settings.targetLanguage.ko',
|
||||
'settings.targetLanguage.ja',
|
||||
'settings.targetLanguage.zhCN',
|
||||
'settings.targetLanguage.zhTW',
|
||||
'settings.targetLanguage.es',
|
||||
'settings.targetLanguage.fr',
|
||||
'settings.targetLanguage.de',
|
||||
'settings.targetLanguage.pt',
|
||||
'settings.targetLanguage.vi',
|
||||
'settings.targetLanguage.id',
|
||||
'settings.targetLanguage.ar',
|
||||
]
|
||||
for (const key of requiredKeys) {
|
||||
expect(ko[key]).toBeTruthy()
|
||||
expect(en[key]).toBeTruthy()
|
||||
}
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue