mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user