From c021aca406c72b50110e0ae3dba73097b8da5025 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: Sat, 11 May 2024 02:54:46 +0800 Subject: [PATCH] update --- .../LunaTranslator/gui/selecthook.py | 9 ++--- .../LunaTranslator/gui/settingpage1.py | 20 ++++++++-- .../LunaTranslator/textsource/texthook.py | 38 +++++++++++++------ .../files/defaultconfig/config.json | 3 +- LunaTranslator/files/lang/ar.json | 5 ++- LunaTranslator/files/lang/cht.json | 5 ++- LunaTranslator/files/lang/en.json | 5 ++- LunaTranslator/files/lang/es.json | 5 ++- LunaTranslator/files/lang/fr.json | 5 ++- LunaTranslator/files/lang/it.json | 5 ++- LunaTranslator/files/lang/ja.json | 5 ++- LunaTranslator/files/lang/ko.json | 5 ++- LunaTranslator/files/lang/pl.json | 5 ++- LunaTranslator/files/lang/ru.json | 5 ++- LunaTranslator/files/lang/th.json | 5 ++- LunaTranslator/files/lang/tr.json | 5 ++- LunaTranslator/files/lang/uk.json | 5 ++- LunaTranslator/files/lang/vi.json | 5 ++- LunaTranslator/files/lang/zh.json | 5 ++- plugins/CMakeLists.txt | 4 +- 20 files changed, 95 insertions(+), 54 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/selecthook.py b/LunaTranslator/LunaTranslator/gui/selecthook.py index 6e009e89..1d461af6 100644 --- a/LunaTranslator/LunaTranslator/gui/selecthook.py +++ b/LunaTranslator/LunaTranslator/gui/selecthook.py @@ -808,7 +808,7 @@ class hookselect(closeashidewindow): ): ishide = True for i in range( - min(len(gobject.baseobject.textsource.hookdatacollecter[key]), 20) + len(gobject.baseobject.textsource.hookdatacollecter[key]) ): if any( @@ -975,13 +975,10 @@ class hookselect(closeashidewindow): try: # print(gobject.baseobject.textsource) gobject.baseobject.textsource.selectinghook = self.save[index.row()] + pid, addr, ctx1, ctx2, _, _ = self.save[index.row()] self.textOutput.setPlainText( - "\n".join( - gobject.baseobject.textsource.hookdatacollecter[ - self.save[index.row()] - ] - ) + gobject.baseobject.textsource.QueryThreadHistory(pid, addr, ctx1, ctx2) ) self.textOutput.moveCursor(QTextCursor.End) diff --git a/LunaTranslator/LunaTranslator/gui/settingpage1.py b/LunaTranslator/LunaTranslator/gui/settingpage1.py index ae8652bd..73739c33 100644 --- a/LunaTranslator/LunaTranslator/gui/settingpage1.py +++ b/LunaTranslator/LunaTranslator/gui/settingpage1.py @@ -74,18 +74,32 @@ def gethookgrid(self): ), ], [ - ("文本缓冲区长度", 5), + ("最大缓冲区长度", 5), ( getspinbox( 0, - 10000, + 1000000, globalconfig, - "flushbuffersize", + "maxBufferSize", callback=lambda x: gobject.baseobject.textsource.setsettings(), ), 3, ), ], + [ + ("最大缓存文本长度", 5), + ( + getspinbox( + 0, + 1000000000, + globalconfig, + "maxHistorySize", + callback=lambda x: gobject.baseobject.textsource.setsettings(), + ), + 3, + ), + ], + [], [ ("过滤包含乱码的文本行", 5), (getsimpleswitch(globalconfig, "filter_chaos_code"), 1), diff --git a/LunaTranslator/LunaTranslator/textsource/texthook.py b/LunaTranslator/LunaTranslator/textsource/texthook.py index 7c6e3733..8c407134 100644 --- a/LunaTranslator/LunaTranslator/textsource/texthook.py +++ b/LunaTranslator/LunaTranslator/textsource/texthook.py @@ -76,7 +76,7 @@ class SearchParam(Structure): findhookcallback_t = CFUNCTYPE(None, c_wchar_p, c_wchar_p) ProcessEvent = CFUNCTYPE(None, DWORD) ThreadEvent = CFUNCTYPE(None, c_wchar_p, c_char_p, ThreadParam) -OutputCallback = CFUNCTYPE(None, c_wchar_p, c_char_p, ThreadParam, c_wchar_p) +OutputCallback = CFUNCTYPE(c_bool, c_wchar_p, c_char_p, ThreadParam, c_wchar_p) ConsoleHandler = CFUNCTYPE(None, c_wchar_p) HookInsertHandler = CFUNCTYPE(None, c_uint64, c_wchar_p) EmbedCallback = CFUNCTYPE(None, c_wchar_p, ThreadParam) @@ -98,7 +98,6 @@ class texthook(basetext): self.hookdatacollecter = OrderedDict() self.hooktypecollecter = OrderedDict() self.currentname = None - self.numcharactorcounter = {} self.reverse = {} self.forward = [] self.selectinghook = None @@ -139,7 +138,7 @@ class texthook(basetext): ) ) self.Luna_Settings = LunaHost.Luna_Settings - self.Luna_Settings.argtypes = c_int, c_bool, c_int, c_int + self.Luna_Settings.argtypes = c_int, c_bool, c_int, c_int, c_int self.Luna_Start = LunaHost.Luna_Start self.Luna_Start.argtypes = ( c_void_p, @@ -188,6 +187,24 @@ class texthook(basetext): self.Luna_embedcallback = LunaHost.Luna_embedcallback self.Luna_embedcallback.argtypes = DWORD, LPCWSTR, LPCWSTR + self.Luna_FreePtr = LunaHost.Luna_FreePtr + self.Luna_FreePtr.argtypes = (c_void_p,) + + self.Luna_QueryThreadHistory = LunaHost.Luna_QueryThreadHistory + self.Luna_QueryThreadHistory.argtypes = (ThreadParam,) + self.Luna_QueryThreadHistory.restype = c_void_p + + def QueryThreadHistory(self, pid, addr, ctx1, ctx2): + tp = ThreadParam() + tp.addr = addr + tp.processId = pid + tp.ctx = ctx1 + tp.ctx2 = ctx2 + ws = self.Luna_QueryThreadHistory(tp) + string = cast(ws, c_wchar_p).value + self.Luna_FreePtr(ws) + return string + def Luna_Startup(self): procs = [ ProcessEvent(self.onprocconnect), @@ -349,7 +366,8 @@ class texthook(basetext): globalconfig["textthreaddelay"], globalconfig["direct_filterrepeat"], self.codepage(), - globalconfig["flushbuffersize"], + globalconfig["maxBufferSize"], + globalconfig["maxHistorySize"], ) def codepage(self): @@ -439,11 +457,11 @@ class texthook(basetext): key = self.parsetextthread(hc, hn, tp) if globalconfig["filter_chaos_code"] and checkchaos(output): - return + return False if key not in self.hookdatacollecter: if self.onnewhook(hc, hn, tp) == False: - return + return False self.lock.acquire() if self.hooktypecollecter[key] == 1: self.currentname = output @@ -457,16 +475,12 @@ class texthook(basetext): if key == self.selectinghook: gobject.baseobject.hookselectdialog.getnewsentencesignal.emit(output) - if key not in self.numcharactorcounter: - self.numcharactorcounter[key] = 0 - while self.numcharactorcounter[key] > 1000000: - _ = self.hookdatacollecter[key].pop(0) - self.numcharactorcounter[key] -= len(_) self.hookdatacollecter[key].append(output) - self.numcharactorcounter[key] += len(output) + self.hookdatacollecter[key] = self.hookdatacollecter[key][-100:] gobject.baseobject.hookselectdialog.update_item_new_line.emit(key, output) self.lock.release() + return True def checkisusingembed(self, address, ctx1, ctx2): for pid in self.connectedpids: diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index c73a62b5..a782b488 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -75,7 +75,8 @@ "button_color_close": "#D32424", "button_color_normal": "#FFFFFF", "textthreaddelay": 500, - "flushbuffersize": 3000, + "maxBufferSize": 3000, + "maxHistorySize": 1000000, "transuigeo": [ 500, 500, diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index 5b1d2568..853aaa86 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -643,7 +643,6 @@ "Sakura部署教程": "ساكورا نشر البرنامج التعليمي", "Github仓库": "مستودع جيتوب", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "استخدام المعلومات الواردة أعلاه في الترجمة ( عادة ما يكون هناك بعض التحسن ، ولكن يمكن أن يؤدي إلى إبطاء )", - "文本缓冲区长度": "نص طول المخزن المؤقت", "历史翻译和调试输出": "تاريخ الترجمة وتصحيح الأخطاء الناتج", "调试输出": "التصحيح الناتج", "显示翻译": "عرض الترجمة", @@ -770,5 +769,7 @@ "投影字体": "عرض الخط", "发光字体": "خط الانارة", "发光亮度": "سطوع مضيئة", - "投影距离": "المسافة المتوقعة" + "投影距离": "المسافة المتوقعة", + "最大缓冲区长度": "أقصى طول المخزن المؤقت", + "最大缓存文本长度": "أقصى طول النص مخبأ" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index 0be507d0..76007ece 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Sakura部署教程", "Github仓库": "Github倉庫", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "利用上文資訊翻譯(通常會有一定的效果提升,但會導致變慢)", - "文本缓冲区长度": "文字緩衝區長度", "历史翻译和调试输出": "歷史翻譯和調試輸出", "调试输出": "調試輸出", "显示翻译": "顯示翻譯", @@ -770,5 +769,7 @@ "投影字体": "投影字體", "发光字体": "發光字體", "发光亮度": "發光亮度", - "投影距离": "投影距離" + "投影距离": "投影距離", + "最大缓冲区长度": "最大緩衝區長度", + "最大缓存文本长度": "最大緩存文字長度" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index 4f00c865..481cbbbc 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Sakura Deployment Tutorial", "Github仓库": "Github warehouse", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Translate using the information provided in the previous text (usually with some improvement in effectiveness, but it can lead to slower translation)", - "文本缓冲区长度": "Text buffer length", "历史翻译和调试输出": "Historical translation and debugging output", "调试输出": "Debugging output", "显示翻译": "Display translation", @@ -770,5 +769,7 @@ "投影字体": "Projection font", "发光字体": "Luminous font", "发光亮度": "luminance", - "投影距离": "Projection distance" + "投影距离": "Projection distance", + "最大缓冲区长度": "Maximum buffer length", + "最大缓存文本长度": "Maximum cached text length" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index 021b0e32..b73d9b41 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Guía de despliegue Sakura", "Github仓库": "Almacén github", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Traducción utilizando la información anterior (generalmente tiene un cierto efecto de mejora, pero puede causar lentitud)", - "文本缓冲区长度": "Longitud del colchón de texto", "历史翻译和调试输出": "Traducción histórica y salida de depuración", "调试输出": "Salida de depuración", "显示翻译": "Mostrar traducción", @@ -770,5 +769,7 @@ "投影字体": "Fuente de proyección", "发光字体": "Fuente luminosa", "发光亮度": "Brillo luminoso", - "投影距离": "Distancia de proyección" + "投影距离": "Distancia de proyección", + "最大缓冲区长度": "Longitud máxima de la zona de amortiguación", + "最大缓存文本长度": "Longitud máxima del texto en caché" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index 65bbb3ae..127ce548 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Tutoriel de déploiement Sakura", "Github仓库": "Entrepôt github", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Utilisez les informations ci - dessus pour traduire (il y a généralement une certaine augmentation de l'effet, mais cela entraîne un ralentissement)", - "文本缓冲区长度": "Longueur du tampon de texte", "历史翻译和调试输出": "Traduction historique et sortie de débogage", "调试输出": "Sortie de débogage", "显示翻译": "Afficher la traduction", @@ -770,5 +769,7 @@ "投影字体": "Polices de projection", "发光字体": "Polices lumineuses", "发光亮度": "Luminosité lumineuse", - "投影距离": "Distance de projection" + "投影距离": "Distance de projection", + "最大缓冲区长度": "Longueur maximale du tampon", + "最大缓存文本长度": "Longueur maximale du texte mis en cache" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index d0e414b7..cf387424 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Tutorial sull'implementazione di Sakura", "Github仓库": "Magazzino Github", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Tradurre utilizzando le informazioni fornite nel testo precedente (di solito con qualche miglioramento in efficacia, ma può portare a una traduzione più lenta)", - "文本缓冲区长度": "Lunghezza buffer di testo", "历史翻译和调试输出": "Risultato storico di traduzione e debug", "调试输出": "Debug output", "显示翻译": "Mostra traduzione", @@ -770,5 +769,7 @@ "投影字体": "Carattere di proiezione", "发光字体": "Carattere luminoso", "发光亮度": "luminanza", - "投影距离": "Distanza di proiezione" + "投影距离": "Distanza di proiezione", + "最大缓冲区长度": "Lunghezza massima del buffer", + "最大缓存文本长度": "Lunghezza massima del testo memorizzato nella cache" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index 99ec0b40..0d021a1b 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Sakura導入チュートリアル", "Github仓库": "Github倉庫", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "上記の情報翻訳を利用する(通常は一定の効果が上がるが、遅くなる)", - "文本缓冲区长度": "テキストバッファ長", "历史翻译和调试输出": "履歴翻訳とデバッグ出力", "调试输出": "デバッグ出力", "显示翻译": "翻訳を表示", @@ -770,5 +769,7 @@ "投影字体": "投影フォント", "发光字体": "発光フォント", "发光亮度": "発光輝度", - "投影距离": "とうえいきょり" + "投影距离": "とうえいきょり", + "最大缓冲区长度": "最大バッファ長", + "最大缓存文本长度": "最大キャッシュテキスト長" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index 04071558..c7010f03 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Sakura 배포 자습서", "Github仓库": "Github 창고", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "위의 정보를 사용하여 번역 (일반적으로 효과가 향상되지만 느려질 수 있음)", - "文本缓冲区长度": "텍스트 버퍼 길이", "历史翻译和调试输出": "역사 번역 및 디버그 출력", "调试输出": "출력 디버그", "显示翻译": "번역 표시", @@ -770,5 +769,7 @@ "投影字体": "글꼴 투영", "发光字体": "발광 글꼴", "发光亮度": "광도", - "投影距离": "투영 거리" + "投影距离": "투영 거리", + "最大缓冲区长度": "최대 버퍼 길이", + "最大缓存文本长度": "최대 캐시 텍스트 길이" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index 86178703..f5fda309 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Samouczek wdrażania Sakury", "Github仓库": "Magazyn Github", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Przetłumacz za pomocą informacji podanych w poprzednim tekście (zwykle z pewną poprawą skuteczności, ale może to prowadzić do wolniejszego tłumaczenia)", - "文本缓冲区长度": "Długość bufora tekstu", "历史翻译和调试输出": "Historiczne tłumaczenie i debugowanie", "调试输出": "Wyjście debugowania", "显示翻译": "Wyświetl tłumaczenie", @@ -770,5 +769,7 @@ "投影字体": "Czcionka projekcji", "发光字体": "Jasna czcionka", "发光亮度": "luminancja", - "投影距离": "Odległość projekcji" + "投影距离": "Odległość projekcji", + "最大缓冲区长度": "Maksymalna długość bufora", + "最大缓存文本长度": "Maksymalna długość buforowanego tekstu" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index bcf0ec17..3b51eb59 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Курс развертывания Sakura", "Github仓库": "Склад Github", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Использование вышеприведенного перевода информации (обычно имеет определенный эффект улучшения, но приводит к замедлению)", - "文本缓冲区长度": "Длина буфера текста", "历史翻译和调试输出": "Исторический перевод и отладка вывода", "调试输出": "Отладочный вывод", "显示翻译": "Показать перевод", @@ -770,5 +769,7 @@ "投影字体": "Проекционный шрифт", "发光字体": "Светящийся шрифт", "发光亮度": "Светимость", - "投影距离": "Расстояние проекции" + "投影距离": "Расстояние проекции", + "最大缓冲区长度": "Максимальная длина буфера", + "最大缓存文本长度": "Максимальная длина текста кэша" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index dacaa784..ee7b96cc 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Sakura Deployment กวดวิชา", "Github仓库": "คลังสินค้า Github", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "ใช้ประโยชน์จากการแปลข้อมูลข้างต้น (มักจะมีผลบางอย่างเพิ่มขึ้น แต่ทำให้ช้าลง)", - "文本缓冲区长度": "ความยาวบัฟเฟอร์ข้อความ", "历史翻译和调试输出": "การแปลประวัติและการแก้จุดบกพร่องเอาท์พุท", "调试输出": "การว่าจ้างเอาท์พุท", "显示翻译": "แสดงคำแปล", @@ -770,5 +769,7 @@ "投影字体": "Projection ตัวอักษร", "发光字体": "Luminous ตัวอักษร", "发光亮度": "ความสว่างส่องสว่าง", - "投影距离": "ระยะการฉาย" + "投影距离": "ระยะการฉาย", + "最大缓冲区长度": "ความยาวบัฟเฟอร์สูงสุด", + "最大缓存文本长度": "ความยาวสูงสุดของข้อความแคช" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index 50408100..f485d836 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Sakura Deployment Tutorial", "Github仓库": "Github deposu", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Önceki metinde verilen bilgileri kullanarak çevirin (genelde etkinliğinde bazı gelişmelerle, fakat daha yavaş çeviriye yol açabilir)", - "文本缓冲区长度": "Metin buffer uzunluğu", "历史翻译和调试输出": "Tarihi çeviri ve hata ayıklama çıkışı", "调试输出": "Hata ayıklama çıkışı", "显示翻译": "Çeviri göster", @@ -770,5 +769,7 @@ "投影字体": "Projeksyon yazıtipi", "发光字体": "Açık yazıtipi", "发光亮度": "ışık", - "投影距离": "Projeksyon mesafesi" + "投影距离": "Projeksyon mesafesi", + "最大缓冲区长度": "Azamik buffer uzunluğu", + "最大缓存文本长度": "Maximum cached text length" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index e56ada00..c4052cc3 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Навчення розробки Sakura", "Github仓库": "Сховище Github", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Переклад за допомогою інформації, наданої у попередньому тексті (зазвичай, з деяким покращенням ефективності, але це може призвести до повільнішого перекладу)", - "文本缓冲区长度": "Довжина текстового буфера", "历史翻译和调试输出": "Історічний переклад і вивід зневаджування", "调试输出": "Вивод зневаджування", "显示翻译": "Показувати переклад", @@ -770,5 +769,7 @@ "投影字体": "Шрифт проектування", "发光字体": "Світливий шрифт", "发光亮度": "світло", - "投影距离": "Відстань проекту" + "投影距离": "Відстань проекту", + "最大缓冲区长度": "Максимальна довжина буфера", + "最大缓存文本长度": "Максимальна довжина кешування тексту" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index 96234cb1..32fcd216 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -643,7 +643,6 @@ "Sakura部署教程": "Hướng dẫn triển khai Sakura", "Github仓库": "Kho Github", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "Sử dụng thông tin trên để dịch (thường có một số hiệu ứng tăng lên, nhưng có thể dẫn đến chậm hơn)", - "文本缓冲区长度": "Chiều dài bộ đệm văn bản", "历史翻译和调试输出": "Lịch sử dịch và gỡ lỗi đầu ra", "调试输出": "Đầu ra gỡ lỗi", "显示翻译": "Hiện bản dịch", @@ -770,5 +769,7 @@ "投影字体": "Phông chiếu", "发光字体": "Phông phát sáng", "发光亮度": "Độ sáng phát sáng", - "投影距离": "Khoảng cách chiếu" + "投影距离": "Khoảng cách chiếu", + "最大缓冲区长度": "Chiều dài bộ đệm tối đa", + "最大缓存文本长度": "Độ dài văn bản bộ nhớ cache tối đa" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index b14339a7..f4f65852 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -642,7 +642,6 @@ "Sakura部署教程": "", "Github仓库": "", "利用上文信息翻译(通常会有一定的效果提升,但会导致变慢)": "", - "文本缓冲区长度": "", "历史翻译和调试输出": "", "历史翻译": "", "调试输出": "", @@ -770,5 +769,7 @@ "投影字体": "", "发光字体": "", "发光亮度": "", - "投影距离": "" + "投影距离": "", + "最大缓冲区长度": "", + "最大缓存文本长度": "" } \ No newline at end of file diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 9318d031..a5551f69 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -28,8 +28,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/version) include(generate_product_version) set(VERSION_MAJOR 2) -set(VERSION_MINOR 49) -set(VERSION_PATCH 2) +set(VERSION_MINOR 50) +set(VERSION_PATCH 0) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)