mirror of
https://github.com/Afilmory/afilmory
synced 2026-02-01 22:48:17 +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 {
|
||||
|
||||
@@ -353,8 +353,13 @@
|
||||
"video.conversion.initializing": "Initializing video converter...",
|
||||
"video.conversion.loading": "Loading video file...",
|
||||
"video.conversion.starting": "Starting conversion...",
|
||||
"video.conversion.transmux.analyzing": "Analyzing MOV structure...",
|
||||
"video.conversion.transmux.converting": "Converting container format...",
|
||||
"video.conversion.transmux.creating": "Creating MP4 container...",
|
||||
"video.conversion.transmux.fetching": "Fetching video file...",
|
||||
"video.conversion.transmux.high.quality": "Using high-quality transmux converter...",
|
||||
"video.conversion.transmux.not.supported": "Transmux is not supported in this browser",
|
||||
"video.conversion.transmux.success": "Transmux completed successfully",
|
||||
"video.conversion.webcodecs.high.quality": "Using high-quality WebCodecs converter...",
|
||||
"video.conversion.webcodecs.not.supported": "WebCodecs is not supported in this browser",
|
||||
"video.format.mov.not.supported": "Browser does not support MOV format, conversion required",
|
||||
|
||||
@@ -346,8 +346,13 @@
|
||||
"video.conversion.initializing": "ビデオコンバーターを初期化しています...",
|
||||
"video.conversion.loading": "ビデオファイルを読み込んでいます...",
|
||||
"video.conversion.starting": "変換を開始しています...",
|
||||
"video.conversion.transmux.analyzing": "MOV構造を解析中...",
|
||||
"video.conversion.transmux.converting": "コンテナ形式を変換中...",
|
||||
"video.conversion.transmux.creating": "MP4コンテナを作成中...",
|
||||
"video.conversion.transmux.fetching": "ビデオファイルを取得中...",
|
||||
"video.conversion.transmux.high.quality": "高品質トランスマックス変換器を使用中...",
|
||||
"video.conversion.transmux.not.supported": "このブラウザはトランスマックスをサポートしていません",
|
||||
"video.conversion.transmux.success": "トランスマックス変換が正常に完了しました",
|
||||
"video.conversion.webcodecs.high.quality": "高品質の WebCodecs コンバーターを使用しています...",
|
||||
"video.conversion.webcodecs.not.supported": "このブラウザは WebCodecs をサポートしていません",
|
||||
"video.format.mov.not.supported": "ブラウザが MOV 形式をサポートしていないため、変換が必要です",
|
||||
|
||||
@@ -346,8 +346,13 @@
|
||||
"video.conversion.initializing": "비디오 변환기 초기화 중...",
|
||||
"video.conversion.loading": "비디오 파일 로딩 중...",
|
||||
"video.conversion.starting": "변환 시작 중...",
|
||||
"video.conversion.transmux.analyzing": "MOV 구조 분석 중...",
|
||||
"video.conversion.transmux.converting": "컨테이너 형식 변환 중...",
|
||||
"video.conversion.transmux.creating": "MP4 컨테이너 생성 중...",
|
||||
"video.conversion.transmux.fetching": "비디오 파일 가져오는 중...",
|
||||
"video.conversion.transmux.high.quality": "고품질 트랜스먹스 변환기 사용 중...",
|
||||
"video.conversion.transmux.not.supported": "이 브라우저는 트랜스먹스를 지원하지 않습니다",
|
||||
"video.conversion.transmux.success": "트랜스먹스 변환이 성공적으로 완료되었습니다",
|
||||
"video.conversion.webcodecs.high.quality": "고품질 WebCodecs 변환기 사용 중...",
|
||||
"video.conversion.webcodecs.not.supported": "이 브라우저는 WebCodecs 를 지원하지 않습니다",
|
||||
"video.format.mov.not.supported": "브라우저가 MOV 형식을 지원하지 않아 변환이 필요합니다.",
|
||||
|
||||
@@ -350,8 +350,13 @@
|
||||
"video.conversion.initializing": "正在初始化视频转换器...",
|
||||
"video.conversion.loading": "正在加载视频文件...",
|
||||
"video.conversion.starting": "开始转换...",
|
||||
"video.conversion.transmux.analyzing": "分析 MOV 结构...",
|
||||
"video.conversion.transmux.converting": "转换容器格式...",
|
||||
"video.conversion.transmux.creating": "创建 MP4 容器...",
|
||||
"video.conversion.transmux.fetching": "获取视频文件...",
|
||||
"video.conversion.transmux.high.quality": "使用高质量转封装转换器...",
|
||||
"video.conversion.transmux.not.supported": "此浏览器不支持转封装",
|
||||
"video.conversion.transmux.success": "转封装转换成功完成",
|
||||
"video.conversion.webcodecs.high.quality": "使用高质量 WebCodecs 转换器...",
|
||||
"video.conversion.webcodecs.not.supported": "此浏览器不支持 WebCodecs",
|
||||
"video.format.mov.not.supported": "浏览器不支持 MOV 格式,需要转换",
|
||||
|
||||
@@ -346,8 +346,13 @@
|
||||
"video.conversion.initializing": "正在初始化影片轉換器...",
|
||||
"video.conversion.loading": "正在載入影片檔案...",
|
||||
"video.conversion.starting": "開始轉換...",
|
||||
"video.conversion.transmux.analyzing": "分析 MOV 結構...",
|
||||
"video.conversion.transmux.converting": "轉換容器格式...",
|
||||
"video.conversion.transmux.creating": "建立 MP4 容器...",
|
||||
"video.conversion.transmux.fetching": "取得影片檔案...",
|
||||
"video.conversion.transmux.high.quality": "使用高品質轉封裝轉換器...",
|
||||
"video.conversion.transmux.not.supported": "此瀏覽器不支援轉封裝",
|
||||
"video.conversion.transmux.success": "轉封裝轉換成功完成",
|
||||
"video.conversion.webcodecs.high.quality": "使用高品質 WebCodecs 轉換器...",
|
||||
"video.conversion.webcodecs.not.supported": "此瀏覽器不支援 WebCodecs",
|
||||
"video.format.mov.not.supported": "瀏覽器不支援 MOV 格式,需要轉換",
|
||||
|
||||
@@ -345,8 +345,13 @@
|
||||
"video.conversion.initializing": "正在初始化影片轉換器...",
|
||||
"video.conversion.loading": "正在載入影片檔案...",
|
||||
"video.conversion.starting": "開始轉換...",
|
||||
"video.conversion.transmux.analyzing": "分析 MOV 結構...",
|
||||
"video.conversion.transmux.converting": "轉換容器格式...",
|
||||
"video.conversion.transmux.creating": "建立 MP4 容器...",
|
||||
"video.conversion.transmux.fetching": "取得影片檔案...",
|
||||
"video.conversion.transmux.high.quality": "使用高品質轉封裝轉換器...",
|
||||
"video.conversion.transmux.not.supported": "此瀏覽器不支援轉封裝",
|
||||
"video.conversion.transmux.success": "轉封裝轉換成功完成",
|
||||
"video.conversion.webcodecs.high.quality": "使用高品質 WebCodecs 轉換器...",
|
||||
"video.conversion.webcodecs.not.supported": "此瀏覽器不支援 WebCodecs",
|
||||
"video.format.mov.not.supported": "瀏覽器不支援 MOV 格式,需要轉換",
|
||||
|
||||
Reference in New Issue
Block a user