hot fix
This commit is contained in:
@@ -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])
|
||||
|
||||
@@ -164,7 +164,7 @@ export function RunningPlatformCloseModal({
|
||||
dark={dark}
|
||||
icon={<Power size={15} className="text-[#e87979]" />}
|
||||
title={t("개발 스튜디오 종료")}
|
||||
message={t("{{v0}} 개발 스튜디오를 종료할까요?", { v0: platformTitle })}
|
||||
message={t("{{v0}} 개발 스튜디오를 종료할까요?", { v0: platformTitle === '로컬 PC' ? t('로컬 PC') : platformTitle })}
|
||||
detail={t("현재 열린 개발 스튜디오 세션만 종료합니다. 플랫폼 제어권은 반납되지 않습니다.")}
|
||||
confirmLabel={t("종료")}
|
||||
onCancel={onCancel}
|
||||
@@ -197,7 +197,7 @@ export function SessionConfirmModal({
|
||||
message={release ? t("제어권을 반납할까요?") : t("연결을 종료할까요?")}
|
||||
detail={release
|
||||
? t("{{v0}} 제어권을 반납하면 대기 중인 다음 수강생에게 제어권이 넘어갈 수 있습니다.", { v0: platformName })
|
||||
: t("{{v0}} 개발 스튜디오 연결만 종료합니다. 플랫폼 제어권은 반납되지 않습니다.", { v0: platformName })}
|
||||
: t("{{v0}} 개발 스튜디오 연결만 종료합니다. 플랫폼 제어권은 반납되지 않습니다.", { v0: platformName === '로컬 PC' ? t('로컬 PC') : platformName })}
|
||||
confirmLabel={release ? t("반납") : t("연결종료")}
|
||||
onCancel={onCancel}
|
||||
onConfirm={onConfirm}
|
||||
|
||||
Reference in New Issue
Block a user