This commit is contained in:
2026-09-29 16:53:20 +09:00
parent a7fe81e658
commit 6b4ab4365e
2 changed files with 20 additions and 2 deletions
+18
View File
@@ -47,6 +47,24 @@ test('session confirmation uses a localized platform display name', () => {
assert.match(source, /<SessionConfirmModal[\s\S]*?platformName=\{activePlatformDisplayName\}/)
})
test('close and disconnect modals localize raw Local PC names at render time', () => {
const source = fs.readFileSync(path.join(root, 'components/AppStatusModals.tsx'), 'utf8')
for (const [key, variable] of [
['{{v0}} 개발 스튜디오를 종료할까요?', 'platformTitle'],
['{{v0}} 개발 스튜디오 연결만 종료합니다. 플랫폼 제어권은 반납되지 않습니다.', 'platformName']
]) {
const line = source.split('\n').find(line => line.includes(key))
const expression = line.match(/v0: (.*?) \}/)[1]
for (const language of ['ko', 'en']) {
const { api } = setup(language)
const name = vm.runInNewContext(expression, { [variable]: '로컬 PC', t: api.t })
assert.equal(name, language === 'en' ? 'Local PC' : '로컬 PC')
if (language === 'en') assert.ok(!api.t(key, { v0: name }).includes('로컬'))
assert.equal(vm.runInNewContext(expression, { [variable]: 'Yahboom Micro #02', t: api.t }), 'Yahboom Micro #02')
}
}
})
test('all execution guide page titles have English translations', () => {
const source = fs.readFileSync(path.join(root, 'features/workspace/ModuleListView.tsx'), 'utf8')
const titles = [...source.matchAll(/environment: '([^']+)'/g)].map(match => match[1])