mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 07:34:25 +00:00
feat(transcript): add Chinese script choices
This commit is contained in:
@@ -2,6 +2,7 @@ import { useRef, useState } from 'react'
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import { toast } from 'sonner'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { getChineseTranscriptLanguageName } from '@/ui/lib/transcript'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import { savedTranscriptLanguagesKey } from '@/ui/hooks/use-video-transcript'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
@@ -77,7 +78,10 @@ export function GenerateTranscriptsDialog({
|
||||
|
||||
const choices = [
|
||||
{ code: '', name: m.transcript_language_auto() },
|
||||
...(languages.data?.languages ?? []),
|
||||
...(languages.data?.languages ?? []).map(({ code, name }) => ({
|
||||
code,
|
||||
name: getChineseTranscriptLanguageName(code) ?? name,
|
||||
})),
|
||||
]
|
||||
const busy = generate.isPending || isTranscribing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user