From efb196f61bc04966465b6e463801b9e99b8d8fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 21 Aug 2024 19:16:35 +0800 Subject: [PATCH] trigger --- .../gui/setting_textinput_ocr.py | 104 +++++++++++++++++- .../LunaTranslator/textsource/ocrtext.py | 35 +++--- .../files/defaultconfig/config.json | 22 ++++ .../files/defaultconfig/static_data.json | 2 + LunaTranslator/files/lang/ar.json | 7 +- LunaTranslator/files/lang/cht.json | 7 +- LunaTranslator/files/lang/cs.json | 7 +- LunaTranslator/files/lang/de.json | 7 +- LunaTranslator/files/lang/en.json | 7 +- LunaTranslator/files/lang/es.json | 7 +- LunaTranslator/files/lang/fr.json | 7 +- LunaTranslator/files/lang/it.json | 7 +- LunaTranslator/files/lang/ja.json | 7 +- LunaTranslator/files/lang/ko.json | 7 +- LunaTranslator/files/lang/nl.json | 7 +- LunaTranslator/files/lang/pl.json | 7 +- LunaTranslator/files/lang/pt.json | 7 +- LunaTranslator/files/lang/ru.json | 7 +- LunaTranslator/files/lang/sv.json | 7 +- LunaTranslator/files/lang/th.json | 7 +- LunaTranslator/files/lang/tr.json | 7 +- LunaTranslator/files/lang/uk.json | 7 +- LunaTranslator/files/lang/vi.json | 7 +- LunaTranslator/files/lang/zh.json | 7 +- plugins/CMakeLists.txt | 2 +- 25 files changed, 266 insertions(+), 39 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py b/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py index ab208c04..cb6765d3 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py +++ b/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py @@ -1,6 +1,6 @@ from qtsymbols import * import functools, os -from myutils.config import globalconfig, ocrsetting, ocrerrorfix +from myutils.config import globalconfig, ocrsetting, ocrerrorfix, static_data from myutils.utils import splitocrtypes, dynamiclink from gui.inputdialog import autoinitdialog, postconfigdialog, autoinitdialog_items from gui.usefulwidget import ( @@ -13,11 +13,16 @@ from gui.usefulwidget import ( clearlayout, getboxlayout, selectcolor, + TableViewW, + listediter, + LStandardItemModel, + LFocusCombo, + threebuttons, ) import gobject -from gui.dynalang import LFormLayout +from gui.dynalang import LFormLayout, LDialog, LAction from myutils.ocrutil import ocr_end, ocr_init -from myutils.wrapper import threader +from myutils.wrapper import threader, Singleton_close def __label1(self): @@ -38,6 +43,88 @@ def __directinitend(engine, _ok): ocr_end() +@Singleton_close +class triggereditor(LDialog): + def showmenu(self, p: QPoint): + curr = self.hctable.currentIndex() + r = curr.row() + if r < 0: + return + menu = QMenu(self.hctable) + remove = LAction("删除") + menu.addAction(remove) + action = menu.exec(self.hctable.cursor().pos()) + + if action == remove: + self.hctable.removeselectedrows() + + def moverank(self, dy): + src, tgt = self.hctable.moverank(dy) + self.internalrealname.insert(tgt, self.internalrealname.pop(src)) + + def __init__(self, parent) -> None: + super().__init__(parent) + self.list = globalconfig["ocr_trigger_events"] + + self.setWindowTitle("触发事件") + model = LStandardItemModel() + model.setHorizontalHeaderLabels(["按键", "事件"]) + self.hcmodel = model + table = TableViewW() + table.horizontalHeader().setSectionResizeMode( + QHeaderView.ResizeMode.ResizeToContents + ) + table.horizontalHeader().setStretchLastSection(True) + table.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers) + table.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows) + table.setSelectionMode((QAbstractItemView.SelectionMode.SingleSelection)) + table.setWordWrap(False) + table.setModel(model) + + table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) + table.customContextMenuRequested.connect(self.showmenu) + self.hctable = table + self.internalrealname = [] + formLayout = QVBoxLayout() + self.setLayout(formLayout) + formLayout.addWidget(self.hctable) + self.vkeys = list(static_data["vkcode_map"].keys()) + for row, k in enumerate(self.list): # 2 + self.hcmodel.insertRow(row, [QStandardItem(), QStandardItem()]) + combo = LFocusCombo() + combo.addItems(self.vkeys) + combo.setCurrentIndex(self.vkeys.index(k["vkey"])) + self.hctable.setIndexWidget(self.hcmodel.index(row, 0), combo) + combo = LFocusCombo() + combo.addItems(["按下", "松开"]) + combo.setCurrentIndex(k["event"]) + self.hctable.setIndexWidget(self.hcmodel.index(row, 1), combo) + self.buttons = threebuttons(texts=["添加行", "删除行"]) + self.buttons.btn1clicked.connect(self.click1) + self.buttons.btn2clicked.connect(self.hctable.removeselectedrows) + + formLayout.addWidget(self.buttons) + self.resize(600, self.sizeHint().height()) + self.show() + + def closeEvent(self, a0: QCloseEvent) -> None: + rows = self.hcmodel.rowCount() + self.list.clear() + for row in range(rows): + i0 = self.hctable.indexWidgetX(row, 0).currentIndex() + i1 = self.hctable.indexWidgetX(row, 1).currentIndex() + self.list.append({"vkey": self.vkeys[i0], "event": i1}) + + def click1(self): + self.hcmodel.insertRow(0, [QStandardItem(), QStandardItem()]) + combo = LFocusCombo() + combo.addItems(self.vkeys) + self.hctable.setIndexWidget(self.hcmodel.index(0, 0), combo) + combo = LFocusCombo() + combo.addItems(["按下", "松开"]) + self.hctable.setIndexWidget(self.hcmodel.index(0, 1), combo) + + def initgridsources(self, names): line = [] i = 0 @@ -107,6 +194,17 @@ def _ocrparam_create(self, idx): ), ) if idx in [3]: + self._ocrparaml.addRow( + "触发事件", + getboxlayout( + [ + D_getIconButton( + functools.partial(triggereditor, self), + "fa.gear", + ), + ] + ), + ) self._ocrparaml.addRow( "延迟(s)", getboxlayout( diff --git a/LunaTranslator/LunaTranslator/textsource/ocrtext.py b/LunaTranslator/LunaTranslator/textsource/ocrtext.py index fe55accf..41968ff2 100644 --- a/LunaTranslator/LunaTranslator/textsource/ocrtext.py +++ b/LunaTranslator/LunaTranslator/textsource/ocrtext.py @@ -1,5 +1,5 @@ import time, os, threading -from myutils.config import globalconfig +from myutils.config import globalconfig, static_data import winsharedutils, windows from gui.rangeselect import rangeadjust from myutils.wrapper import threader @@ -95,7 +95,7 @@ class ocrtext(basetext): @threader def gettextthread(self): - laststate = (0, 0, 0, 0, 0) + laststate = tuple((0 for _ in range(len(globalconfig["ocr_trigger_events"])))) while not self.ending: if not self.isautorunning: time.sleep(0.1) @@ -103,20 +103,23 @@ class ocrtext(basetext): if globalconfig["ocr_auto_method"] == 3: triggered = False - this = ( - windows.GetAsyncKeyState(windows.VK_LBUTTON), - windows.GetAsyncKeyState(windows.VK_RETURN), - windows.GetAsyncKeyState(windows.VK_CONTROL), - windows.GetAsyncKeyState(windows.VK_SHIFT), - windows.GetAsyncKeyState(windows.VK_MENU), + this = tuple( + ( + windows.GetAsyncKeyState( + static_data["vkcode_map"][line["vkey"]] + ) + for line in globalconfig["ocr_trigger_events"] + ) ) + for _, line in enumerate(globalconfig["ocr_trigger_events"]): + event = line["event"] + press = this[_] + if ((event == 0) and (laststate[_] == 0) and press) or ( + (event == 1) and laststate[_] and (press == 0) + ): + triggered = True + break - if any(((this[_] and (laststate[_] == 0)) for _ in (0, 1))): - # 按下 - triggered = True - elif any(((this[_] == 0 and laststate[_]) for _ in (2, 3, 4))): - # 松开 - triggered = True laststate = this if triggered: if gobject.baseobject.hwnd: @@ -149,7 +152,9 @@ class ocrtext(basetext): self.dispatchtext(t) time.sleep(0.01) else: - laststate = (0, 0, 0, 0, 0) + laststate = tuple( + (0 for _ in range(len(globalconfig["ocr_trigger_events"]))) + ) t = self.getallres(True) if t: self.dispatchtext(t) diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index 8323398d..1d85a33b 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -2018,6 +2018,28 @@ "ocr_auto_method": 0, "ocr_interval": 5, "ocr_trigger_delay": 0, + "ocr_trigger_events": [ + { + "vkey": "LBUTTON", + "event": 0 + }, + { + "vkey": "ENTER", + "event": 0 + }, + { + "vkey": "CTRL", + "event": 1 + }, + { + "vkey": "ALT", + "event": 1 + }, + { + "vkey": "SHIFT", + "event": 1 + } + ], "mustocr_interval": 5, "ocrmininterval": 1, "selectable": false, diff --git a/LunaTranslator/files/defaultconfig/static_data.json b/LunaTranslator/files/defaultconfig/static_data.json index eca3b0a8..ed00d140 100644 --- a/LunaTranslator/files/defaultconfig/static_data.json +++ b/LunaTranslator/files/defaultconfig/static_data.json @@ -1166,6 +1166,8 @@ "ALT": 1 }, "vkcode_map": { + "LBUTTON": 1, + "RBUTTON": 2, "F1": 112, "F2": 113, "F3": 114, diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index 9ba4672f..4ada48b3 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "تلقائيا ملزمة نافذة بعد تحديد نطاق التعرف الضوئي على الحروف", "延迟(s)": "تأخير ( ق )", "鼠标键盘触发+等待稳定": "الماوس لوحة المفاتيح الزناد + انتظار الاستقرار", - "匈牙利语": "اللغة الهنغارية" + "匈牙利语": "اللغة الهنغارية", + "触发事件": "الحدث الزناد", + "按键": "مفتاح", + "事件": "الأحداث", + "按下": "ضغط", + "松开": "خففت" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index f8b2cb48..20a020d7 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "選取OCR範圍後自動綁定視窗", "延迟(s)": "延遲(s)", "鼠标键盘触发+等待稳定": "滑鼠鍵盤觸發+等待穩定", - "匈牙利语": "匈牙利語" + "匈牙利语": "匈牙利語", + "触发事件": "觸發事件", + "按键": "按鍵", + "事件": "事件", + "按下": "按下", + "松开": "鬆開" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cs.json b/LunaTranslator/files/lang/cs.json index dec96c62..72a74eb5 100644 --- a/LunaTranslator/files/lang/cs.json +++ b/LunaTranslator/files/lang/cs.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Automaticky vázat okno po výběru rozsahu OCR", "延迟(s)": "Zpoždění (s)", "鼠标键盘触发+等待稳定": "Spouštěč myši a klávesnice+čekání na stabilizaci", - "匈牙利语": "Maďarština" + "匈牙利语": "Maďarština", + "触发事件": "Spouštěcí událost", + "按键": "Klíč", + "事件": "událost", + "按下": "Stiskněte dolů", + "松开": "uvolnění" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/de.json b/LunaTranslator/files/lang/de.json index 647c2981..7579166c 100644 --- a/LunaTranslator/files/lang/de.json +++ b/LunaTranslator/files/lang/de.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Fenster nach Auswahl des OCR-Bereichs automatisch binden", "延迟(s)": "Verzögerung (s)", "鼠标键盘触发+等待稳定": "Maus und Tastatur Trigger+warten auf Stabilisierung", - "匈牙利语": "Ungarische Sprache" + "匈牙利语": "Ungarische Sprache", + "触发事件": "Auslöseereignis", + "按键": "Schlüssel", + "事件": "Ereignis", + "按下": "Drücken Sie nach unten", + "松开": "Freigabe" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index c6edd4a0..04bf5408 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Automatically bind window after selecting OCR range", "延迟(s)": "Delay (s)", "鼠标键盘触发+等待稳定": "Mouse and keyboard trigger+waiting for stabilization", - "匈牙利语": "Hungarian language" + "匈牙利语": "Hungarian language", + "触发事件": "Trigger event", + "按键": "Key", + "事件": "event", + "按下": "Press down", + "松开": "release" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index 62dd867b..5da832f4 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Vincular automáticamente la ventana después de seleccionar el rango OCR", "延迟(s)": "Retraso (s)", "鼠标键盘触发+等待稳定": "Activación del ratón y el teclado + espera para estabilizarse", - "匈牙利语": "Húngaro" + "匈牙利语": "Húngaro", + "触发事件": "Evento desencadenante", + "按键": "Teclas", + "事件": "Incidencias", + "按下": "Presionar", + "松开": "Soltar" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index e7fcb821..e4b25bd1 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Fenêtre de liaison automatique après sélection de la plage ocr", "延迟(s)": "Retard (s)", "鼠标键盘触发+等待稳定": "Déclenchement du clavier de la souris + attente de stabilisation", - "匈牙利语": "Hongrois" + "匈牙利语": "Hongrois", + "触发事件": "Événements déclenchés", + "按键": "Appuyez sur la clé", + "事件": "Événements", + "按下": "Appuyez sur", + "松开": "Desserrer" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index b51a5ed5..11d3f0ec 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Associa automaticamente la finestra dopo aver selezionato l'intervallo OCR", "延迟(s)": "Ritardo (s)", "鼠标键盘触发+等待稳定": "Mouse e tastiera trigger + attesa di stabilizzazione", - "匈牙利语": "Lingua ungherese" + "匈牙利语": "Lingua ungherese", + "触发事件": "Evento di attivazione", + "按键": "Chiave", + "事件": "evento", + "按下": "Premere verso il basso", + "松开": "rilascio" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index 4bcbe0d5..8c183c05 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "OCR範囲を選択するとウィンドウが自動的にバインドされます", "延迟(s)": "遅延(s)", "鼠标键盘触发+等待稳定": "マウスのキーボードトリガ+待機安定", - "匈牙利语": "ハンガリー語" + "匈牙利语": "ハンガリー語", + "触发事件": "イベントのトリガー", + "按键": "キーを押す", + "事件": "イベント#イベント#", + "按下": "押す", + "松开": "ゆるめる" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index 10347447..7d856edc 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "OCR 범위 선택 후 창 자동 바인딩", "延迟(s)": "지연 (s)", "鼠标键盘触发+等待稳定": "마우스 키보드 트리거 + 안정 대기 중", - "匈牙利语": "헝가리어" + "匈牙利语": "헝가리어", + "触发事件": "이벤트 트리거", + "按键": "키", + "事件": "이벤트", + "按下": "누르기", + "松开": "풀어" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/nl.json b/LunaTranslator/files/lang/nl.json index 8436647b..7852511f 100644 --- a/LunaTranslator/files/lang/nl.json +++ b/LunaTranslator/files/lang/nl.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Venster automatisch binden na het selecteren van OCR-bereik", "延迟(s)": "Vertraging (s)", "鼠标键盘触发+等待稳定": "Muis en toetsenbord trigger+wachten op stabilisatie", - "匈牙利语": "Hongaarse taal" + "匈牙利语": "Hongaarse taal", + "触发事件": "Trigger gebeurtenis", + "按键": "Sleutel", + "事件": "gebeurtenis", + "按下": "Druk omlaag", + "松开": "release" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index 6d7b6054..fe6c55bc 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Automatycznie wiąże okno po wybraniu zakresu OCR", "延迟(s)": "Opóźnienie (s)", "鼠标键盘触发+等待稳定": "Wyzwalacz myszy i klawiatury+oczekiwanie na stabilizację", - "匈牙利语": "Język węgierski" + "匈牙利语": "Język węgierski", + "触发事件": "Wyzwalanie zdarzenia", + "按键": "Klucz", + "事件": "zdarzenie", + "按下": "Naciśnij w dół", + "松开": "uwolnienie" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pt.json b/LunaTranslator/files/lang/pt.json index c6c09609..9180d9e1 100644 --- a/LunaTranslator/files/lang/pt.json +++ b/LunaTranslator/files/lang/pt.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Vincular automaticamente a janela após selecionar o intervalo de OCR", "延迟(s)": "Atraso (s)", "鼠标键盘触发+等待稳定": "Mouse e teclado gatilho + aguardando estabilização", - "匈牙利语": "Língua húngara" + "匈牙利语": "Língua húngara", + "触发事件": "Evento de disparo", + "按键": "Chave", + "事件": "evento", + "按下": "Pressione para baixo", + "松开": "libertação" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index e8067d4b..3ae0ac72 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Выберите диапазон OCR и автоматически свяжите окно", "延迟(s)": "Задержка (s)", "鼠标键盘触发+等待稳定": "Запуск клавиатуры мыши + Ожидание стабилизации", - "匈牙利语": "Венгерский язык" + "匈牙利语": "Венгерский язык", + "触发事件": "Событие запуска", + "按键": "Клавиши", + "事件": "События", + "按下": "Нажмите", + "松开": "Отпусти." } \ No newline at end of file diff --git a/LunaTranslator/files/lang/sv.json b/LunaTranslator/files/lang/sv.json index c96d9c2e..e09fb2c4 100644 --- a/LunaTranslator/files/lang/sv.json +++ b/LunaTranslator/files/lang/sv.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Bind automatiskt fönster efter markerat OCR-område", "延迟(s)": "Försening (s)", "鼠标键盘触发+等待稳定": "Mus och tangentbord trigger + väntar på stabilisering", - "匈牙利语": "Ungerska språket" + "匈牙利语": "Ungerska språket", + "触发事件": "Trigger- händelse", + "按键": "Nyckel", + "事件": "händelse", + "按下": "Tryck ner", + "松开": "frigörande" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index 75778a2e..c85fc84e 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "ผูกหน้าต่างโดยอัตโนมัติหลังจากเลือกช่วง OCR", "延迟(s)": "ความล่าช้า (s)", "鼠标键盘触发+等待稳定": "เมาส์คีย์บอร์ดทริกเกอร์ + รอความมั่นคง", - "匈牙利语": "ฮังการี" + "匈牙利语": "ฮังการี", + "触发事件": "เหตุการณ์ทริกเกอร์", + "按键": "ปุ่มกด", + "事件": "กิจกรรม", + "按下": "กด", + "松开": "ปล่อย" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index ce59dce9..6ebb32df 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "OCR menzili seçmeden sonra pencereyi otomatik bağlayın", "延迟(s)": "Geç", "鼠标键盘触发+等待稳定": "Fare ve klavye tetikleyici+stabilizasyonu bekliyor", - "匈牙利语": "Macar dili" + "匈牙利语": "Macar dili", + "触发事件": "Dönüştürme olayını", + "按键": "Anahtar", + "事件": "Olay", + "按下": "Aşağı basın", + "松开": "serbest" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index 58f47918..c54119ed 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Автоматично зв’ язати вікно після вибору діапазону OCR", "延迟(s)": "Затримка (с)", "鼠标键盘触发+等待稳定": "Пуск миші і клавіатури+чекає на стабілізацію", - "匈牙利语": "Угорська мова" + "匈牙利语": "Угорська мова", + "触发事件": "Подія пересування", + "按键": "Ключ", + "事件": "подія", + "按下": "Натисніть вниз", + "松开": "випускати" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index 1de2a464..a632892c 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "Tự động ràng buộc cửa sổ sau khi chọn phạm vi OCR", "延迟(s)": "Độ trễ (s)", "鼠标键盘触发+等待稳定": "Kích hoạt bàn phím chuột+chờ ổn định", - "匈牙利语": "Việt Nam" + "匈牙利语": "Việt Nam", + "触发事件": "Sự kiện kích hoạt", + "按键": "Phím", + "事件": "Sự kiện", + "按下": "Nhấn", + "松开": "Thả lỏng" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index 9dacc77b..6d00aec5 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -837,5 +837,10 @@ "选取OCR范围后自动绑定窗口": "", "延迟(s)": "", "鼠标键盘触发+等待稳定": "", - "匈牙利语": "" + "匈牙利语": "", + "触发事件": "", + "按键": "", + "事件": "", + "按下": "", + "松开": "" } \ No newline at end of file diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 76010ab3..a975e618 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 30) -set(VERSION_PATCH 0) +set(VERSION_PATCH 1) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)