diff --git a/LunaTranslator/LunaTranslator/gui/setting_hotkey.py b/LunaTranslator/LunaTranslator/gui/setting_hotkey.py index 2f73383d..ed7171ed 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_hotkey.py +++ b/LunaTranslator/LunaTranslator/gui/setting_hotkey.py @@ -44,7 +44,7 @@ def registrhotkeys(self): "_3": self.showsignal.emit, "_4": lambda: winsharedutils.clipboard_set(gobject.baseobject.currenttext), "_5": gobject.baseobject.translation_ui.changeshowhideraw, - "_51":gobject.baseobject.translation_ui.changeshowhidetrans, + "_51": gobject.baseobject.translation_ui.changeshowhidetrans, "_6": lambda: gobject.baseobject.transhis.showsignal.emit(), "_7": lambda: gobject.baseobject.readcurrent(force=True), "_8": lambda: gobject.baseobject.translation_ui.changemousetransparentstate(0), @@ -66,6 +66,9 @@ def registrhotkeys(self): windows.RegisterWindowMessage("Magpie_Core_CLI_Message_ToggleOverlay"), ), "_26": gobject.baseobject.translation_ui.ocr_once_signal.emit, + "_26_1": gobject.baseobject.translation_ui.ocr_do_function( + gobject.baseobject.translation_ui.ocr_once_follow_rect + ), "_27": gobject.baseobject.translation_ui.simulate_key_enter, "_28": lambda: winsharedutils.clipboard_set( gobject.baseobject.currenttranslate diff --git a/LunaTranslator/LunaTranslator/translator/cohere.py b/LunaTranslator/LunaTranslator/translator/cohere.py index 09b93e02..7f14d086 100644 --- a/LunaTranslator/LunaTranslator/translator/cohere.py +++ b/LunaTranslator/LunaTranslator/translator/cohere.py @@ -153,7 +153,8 @@ class TS(basetrans): message += msg elif t == "stream-end": break - + else: + continue except: print_exc() raise Exception(response_data) diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index 52c1f50f..2e3abaf3 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -1024,6 +1024,11 @@ "name": "进行一次OCR", "keystring": "" }, + "_26_1": { + "use": false, + "name": "再次进行OCR", + "keystring": "" + }, "_27": { "use": false, "name": "模拟按键Enter", diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 8bceb4c1..193de273 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 28) -set(VERSION_PATCH 4) +set(VERSION_PATCH 5) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)