mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-29 23:12:38 +08:00
fix: 添加OCR未知错误的翻译并更新错误提示
在OCR处理失败时,使用翻译后的错误消息替代原始错误提示
This commit is contained in:
parent
97435c9294
commit
a4257d9efe
@ -1559,6 +1559,9 @@
|
||||
"tip": "如果响应成功,则只针对超过30秒的消息进行提醒"
|
||||
},
|
||||
"ocr": {
|
||||
"error": {
|
||||
"unknown": "OCR过程发生错误"
|
||||
},
|
||||
"file": {
|
||||
"not_supported": "不支持的文件类型 {{type}}"
|
||||
},
|
||||
|
||||
@ -448,7 +448,7 @@ const TranslatePage: FC = () => {
|
||||
}
|
||||
} catch (e) {
|
||||
logger.error('Failed to select file and ocr.', e as Error)
|
||||
window.message.error(formatErrorMessage(e))
|
||||
window.message.error(t('ocr.error.unknown') + ' ' + formatErrorMessage(e))
|
||||
} finally {
|
||||
setIsProcessing(false)
|
||||
window.message.destroy('translate_ocr_processing')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user