feat(transcript): add Chinese script choices

This commit is contained in:
yiling
2026-12-05 11:43:32 +08:00
parent 6c74413375
commit 70e4c63323
19 changed files with 242 additions and 29 deletions
@@ -12,7 +12,7 @@ test('starts a transcript for an archived video and tracks it in the file metada
const projectPath = `/projects/${projectId}`
const statusPath = `/api${projectPath}/transcription-status`
const folder = await seedFolder(prisma, projectId, rootFolderId, 'Other folder')
const expectedLanguages = ['zh', 'en']
const expectedLanguages = ['zh-Hans', 'zh-Hant', 'en']
let submissions = 0
let rejectSubmission = true
let statusRequests = 0
@@ -34,7 +34,8 @@ test('starts a transcript for an archived video and tracks it in the file metada
model: 'whisper-tiny',
languages: [
{ code: 'en', name: 'English' },
{ code: 'zh', name: 'Chinese' },
{ code: 'zh-Hans', name: 'Simplified Chinese' },
{ code: 'zh-Hant', name: 'Traditional Chinese' },
],
},
}),
@@ -105,10 +106,10 @@ test('starts a transcript for an archived video and tracks it in the file metada
}
await expect(language).toHaveValue('Auto')
await selectLanguage('Chi', 'Chinese')
await selectLanguage('Simplified', 'Chinese (Simplified)')
await generate.click()
await expect(dialog.getByRole('alert')).toBeVisible()
await expect(language).toHaveValue('Chinese')
await expect(language).toHaveValue('Chinese (Simplified)')
await generate.click()
await expect(dialog).toBeHidden()
await expect(metadata).toHaveText('Transcribing…')
@@ -127,6 +128,14 @@ test('starts a transcript for an archived video and tracks it in the file metada
await expect(dateCell).toHaveText(/\d/)
const modifiedDate = await dateCell.innerText()
await openDialog()
await selectLanguage('Traditional', 'Chinese (Traditional)')
await generate.click()
await expect(dialog).toBeHidden()
await expect(dateCell).toHaveText('Transcribing…')
await prisma.workflowTask.updateMany({ where: activeTranscript, data: { status: 'completed' } })
await expect(dateCell).toHaveText(modifiedDate)
await openDialog()
await expect(generate).toBeEnabled()
await selectLanguage('Eng', 'English')