mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
Update ocrutil.py
This commit is contained in:
parent
b3d0294398
commit
70ff3f8e7f
@ -108,11 +108,11 @@ def __ocr_init():
|
||||
):
|
||||
use = k
|
||||
break
|
||||
_nowuseocrx = use
|
||||
if use is None:
|
||||
raise Exception("no engine")
|
||||
if _nowuseocr == use:
|
||||
return
|
||||
_nowuseocrx = use
|
||||
_ocrengine = None
|
||||
_nowuseocr = None
|
||||
aclass = importlib.import_module("ocrengines." + use).OCR
|
||||
@ -136,7 +136,7 @@ def ocr_run(qimage: QImage):
|
||||
msg = stringfyerror(e)
|
||||
msg = (
|
||||
"<msg_error_refresh>"
|
||||
+ _TR(globalconfig["ocr"][_nowuseocrx]["name"])
|
||||
+ (_TR(globalconfig["ocr"][_nowuseocrx]["name"]) if _nowuseocrx else "")
|
||||
+ " "
|
||||
+ msg
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user