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