chore: add i18n for mp4 utils (#91)

Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Innei <tukon479@gmail.com>
This commit is contained in:
Wenzhuo Liu
2025-09-08 20:34:54 +08:00
committed by GitHub
parent 888a039e75
commit 57c1fc25fe
7 changed files with 38 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
import { getI18n } from '~/i18n'
interface ConversionProgress {
isConverting: boolean
progress: number
@@ -47,10 +49,11 @@ export async function transmuxMovToMp4Simple(
try {
console.info(`🎯 Starting simple transmux conversion`)
const { t } = getI18n()
onProgress?.({
isConverting: true,
progress: 10,
message: 'Fetching video file...',
message: t('video.conversion.transmux.fetching'),
})
// Fetch the video file
@@ -64,13 +67,13 @@ export async function transmuxMovToMp4Simple(
onProgress?.({
isConverting: true,
progress: 30,
message: 'Analyzing MOV structure...',
message: t('video.conversion.transmux.analyzing'),
})
onProgress?.({
isConverting: true,
progress: 60,
message: 'Converting container format...',
message: t('video.conversion.transmux.converting'),
})
// For now, we'll create a simple container change
@@ -83,7 +86,7 @@ export async function transmuxMovToMp4Simple(
onProgress?.({
isConverting: true,
progress: 80,
message: 'Creating MP4 container...',
message: t('video.conversion.transmux.creating'),
})
// Create blob with MP4 MIME type
@@ -93,7 +96,7 @@ export async function transmuxMovToMp4Simple(
onProgress?.({
isConverting: false,
progress: 100,
message: 'Transmux completed successfully',
message: t('video.conversion.transmux.success'),
})
return {