fix(i18n): 更新文件大小限制错误信息并添加多语言支持

修改文件大小限制的错误信息格式,移除括号内的限制范围
为多种语言添加文件操作相关的翻译条目
在错误提示中动态显示文件大小限制范围
This commit is contained in:
icarus 2025-08-22 19:20:29 +08:00
parent 9d31ccb5ea
commit 0fdae33f51
10 changed files with 58 additions and 2 deletions

View File

@ -3737,6 +3737,13 @@
"exchange": { "exchange": {
"label": "Swap the source and target languages" "label": "Swap the source and target languages"
}, },
"files": {
"error": {
"too_large": "File too large",
"unknown": "Failed to read file content"
},
"reading": "Reading file content..."
},
"history": { "history": {
"clear": "Clear History", "clear": "Clear History",
"clear_description": "Clear history will delete all translation history, continue?", "clear_description": "Clear history will delete all translation history, continue?",

View File

@ -3737,6 +3737,13 @@
"exchange": { "exchange": {
"label": "入力言語と出力言語を入れ替える" "label": "入力言語と出力言語を入れ替える"
}, },
"files": {
"error": {
"too_large": "ファイルが大きすぎます",
"unknown": "ファイルの内容を読み取るのに失敗しました"
},
"reading": "ファイルの内容を読み込んでいます..."
},
"history": { "history": {
"clear": "履歴をクリア", "clear": "履歴をクリア",
"clear_description": "履歴をクリアすると、すべての翻訳履歴が削除されます。続行しますか?", "clear_description": "履歴をクリアすると、すべての翻訳履歴が削除されます。続行しますか?",

View File

@ -3737,6 +3737,13 @@
"exchange": { "exchange": {
"label": "Поменяйте исходный и целевой языки местами" "label": "Поменяйте исходный и целевой языки местами"
}, },
"files": {
"error": {
"too_large": "Файл слишком большой",
"unknown": "Ошибка при чтении содержимого файла"
},
"reading": "Чтение содержимого файла..."
},
"history": { "history": {
"clear": "Очистить историю", "clear": "Очистить историю",
"clear_description": "Очистка истории удалит все записи переводов. Продолжить?", "clear_description": "Очистка истории удалит все записи переводов. Продолжить?",

View File

@ -3739,7 +3739,7 @@
}, },
"files": { "files": {
"error": { "error": {
"too_large": "文件过大 (0 ~ 5MB)", "too_large": "文件过大",
"unknown": "读取文件内容失败" "unknown": "读取文件内容失败"
}, },
"reading": "读取文件内容中..." "reading": "读取文件内容中..."

View File

@ -3737,6 +3737,13 @@
"exchange": { "exchange": {
"label": "交換源語言與目標語言" "label": "交換源語言與目標語言"
}, },
"files": {
"error": {
"too_large": "文件過大",
"unknown": "读取文件内容失败"
},
"reading": "讀取檔案內容中..."
},
"history": { "history": {
"clear": "清空歷史", "clear": "清空歷史",
"clear_description": "清空歷史將刪除所有翻譯歷史記錄,是否繼續?", "clear_description": "清空歷史將刪除所有翻譯歷史記錄,是否繼續?",

View File

@ -3737,6 +3737,13 @@
"exchange": { "exchange": {
"label": "Ανταλλαγή γλώσσας πηγής και γλώσσας προορισμού" "label": "Ανταλλαγή γλώσσας πηγής και γλώσσας προορισμού"
}, },
"files": {
"error": {
"too_large": "Το αρχείο είναι πολύ μεγάλο",
"unknown": "Αποτυχία ανάγνωσης του περιεχομένου του αρχείου"
},
"reading": "Διαβάζοντας το περιεχόμενο του αρχείου..."
},
"history": { "history": {
"clear": "Καθαρισμός ιστορικού", "clear": "Καθαρισμός ιστορικού",
"clear_description": "Η διαγραφή του ιστορικού θα διαγράψει όλα τα απομνημονεύματα μετάφρασης. Θέλετε να συνεχίσετε;", "clear_description": "Η διαγραφή του ιστορικού θα διαγράψει όλα τα απομνημονεύματα μετάφρασης. Θέλετε να συνεχίσετε;",

View File

@ -3737,6 +3737,13 @@
"exchange": { "exchange": {
"label": "Intercambiar el idioma de origen y el idioma de destino" "label": "Intercambiar el idioma de origen y el idioma de destino"
}, },
"files": {
"error": {
"too_large": "El archivo es demasiado grande",
"unknown": "Error al leer el contenido del archivo"
},
"reading": "Leyendo el contenido del archivo..."
},
"history": { "history": {
"clear": "Borrar historial", "clear": "Borrar historial",
"clear_description": "Borrar el historial eliminará todos los registros de traducciones, ¿desea continuar?", "clear_description": "Borrar el historial eliminará todos los registros de traducciones, ¿desea continuar?",

View File

@ -3737,6 +3737,13 @@
"exchange": { "exchange": {
"label": "Échanger la langue source et la langue cible" "label": "Échanger la langue source et la langue cible"
}, },
"files": {
"error": {
"too_large": "Fichier trop volumineux",
"unknown": "Échec de la lecture du contenu du fichier"
},
"reading": "Lecture du contenu du fichier en cours..."
},
"history": { "history": {
"clear": "Effacer l'historique", "clear": "Effacer l'historique",
"clear_description": "L'effacement de l'historique supprimera toutes les entrées d'historique de traduction, voulez-vous continuer ?", "clear_description": "L'effacement de l'historique supprimera toutes les entrées d'historique de traduction, voulez-vous continuer ?",

View File

@ -3737,6 +3737,13 @@
"exchange": { "exchange": {
"label": "Trocar idioma de origem e idioma de destino" "label": "Trocar idioma de origem e idioma de destino"
}, },
"files": {
"error": {
"too_large": "Arquivo muito grande",
"unknown": "Falha ao ler o conteúdo do arquivo"
},
"reading": "Lendo o conteúdo do arquivo..."
},
"history": { "history": {
"clear": "Limpar Histórico", "clear": "Limpar Histórico",
"clear_description": "Limpar histórico irá deletar todos os registros de tradução. Deseja continuar?", "clear_description": "Limpar histórico irá deletar todos os registros de tradução. Deseja continuar?",

View File

@ -465,7 +465,7 @@ const TranslatePage: FC = () => {
} else { } else {
// the threshold may be too large // the threshold may be too large
if (file.size > 5 * MB) { if (file.size > 5 * MB) {
window.message.error(t('translate.files.error.too_large')) window.message.error(t('translate.files.error.too_large') + ' (0 ~ 5 MB)')
} else { } else {
window.message.loading({ content: t('translate.files.reading'), key: 'translate_files_reading', duration: 0 }) window.message.loading({ content: t('translate.files.reading'), key: 'translate_files_reading', duration: 0 })
try { try {