From 0a21c403b73cbebad48bed0cd56780172285c86e 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: Sun, 15 Sep 2024 10:58:06 +0800 Subject: [PATCH] fix --- .github/ISSUE_TEMPLATE/config.yml | 8 +- .../LunaTranslator/gui/dialog_savedgame.py | 2 + .../LunaTranslator/gui/selecthook.py | 2 +- .../LunaTranslator/gui/setting_translate.py | 4 +- .../LunaTranslator/translator/rengong.py | 140 ++++++++++++------ .../files/defaultconfig/config.json | 1 + .../defaultconfig/translatorsetting.json | 2 +- LunaTranslator/files/lang/ar.json | 6 +- LunaTranslator/files/lang/cht.json | 6 +- LunaTranslator/files/lang/cs.json | 6 +- LunaTranslator/files/lang/de.json | 6 +- LunaTranslator/files/lang/en.json | 6 +- LunaTranslator/files/lang/es.json | 6 +- LunaTranslator/files/lang/fr.json | 6 +- LunaTranslator/files/lang/it.json | 6 +- LunaTranslator/files/lang/ja.json | 6 +- LunaTranslator/files/lang/ko.json | 6 +- LunaTranslator/files/lang/nl.json | 6 +- LunaTranslator/files/lang/pl.json | 6 +- LunaTranslator/files/lang/pt.json | 6 +- LunaTranslator/files/lang/ru.json | 6 +- LunaTranslator/files/lang/sv.json | 6 +- LunaTranslator/files/lang/th.json | 6 +- LunaTranslator/files/lang/tr.json | 6 +- LunaTranslator/files/lang/uk.json | 6 +- LunaTranslator/files/lang/vi.json | 6 +- LunaTranslator/files/lang/zh.json | 6 +- docs/zh/sakurallmcolab.md | 2 +- plugins/CMakeLists.txt | 2 +- 29 files changed, 167 insertions(+), 116 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 5018ff61..65881c6c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,9 +1,13 @@ blank_issues_enabled: true contact_links: - - name: Specific Game Related 特定游戏相关 + - name: Game Compatibility 游戏适配 url: https://github.com/HIllya51/LunaHook/issues/new?assignees=&labels=enhancement&projects=&template=01_game_request.yaml about: Request for an unsupported game, or hooked text is incorrect 请求支持尚未支持的游戏,或提取的文本不正确 - name: Discord url: https://discord.com/invite/ErtDwVeAbB - about: Discord \ No newline at end of file + about: Discord + + - name: QQ群 + url: https://qm.qq.com/q/I5rr3uEpi2 + about: QQ群 diff --git a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py index 609e599e..193622e6 100644 --- a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py +++ b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py @@ -410,6 +410,8 @@ class dialog_savedgame_new(QWidget): ) def callback(t): + if not t: + return if t in globalconfig["labelset"]: tp = tagitem.TYPE_USERTAG else: diff --git a/LunaTranslator/LunaTranslator/gui/selecthook.py b/LunaTranslator/LunaTranslator/gui/selecthook.py index 6d2706ff..9f9b74eb 100644 --- a/LunaTranslator/LunaTranslator/gui/selecthook.py +++ b/LunaTranslator/LunaTranslator/gui/selecthook.py @@ -617,7 +617,7 @@ class hookselect(closeashidewindow): self.searchtextlayout = QHBoxLayout() self.vboxlayout.addLayout(self.searchtextlayout) self.searchtext = QLineEdit() - __ = LPushButton("!?_找不到文本_!?") + __ = LPushButton("游戏适配") __.clicked.connect( lambda: gobject.baseobject.openlink( dynamiclink("{main_server}/Resource/game_support") diff --git a/LunaTranslator/LunaTranslator/gui/setting_translate.py b/LunaTranslator/LunaTranslator/gui/setting_translate.py index 73bddbbd..a608afcc 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_translate.py +++ b/LunaTranslator/LunaTranslator/gui/setting_translate.py @@ -482,12 +482,14 @@ def setTabTwo_lazy(self, basel): type="grid", grid=( [ - "预翻译采用模糊匹配", + "模糊匹配", D_getsimpleswitch(globalconfig, "premtsimiuse"), "", "模糊匹配_相似度_%", D_getspinbox(0, 100, globalconfig, "premtsimi2"), "", + "逐行匹配", + D_getsimpleswitch(globalconfig, "premtmatcheveryline"), ], [ (functools.partial(createbtnexport, self), 0), diff --git a/LunaTranslator/LunaTranslator/translator/rengong.py b/LunaTranslator/LunaTranslator/translator/rengong.py index bee05969..db66ea40 100644 --- a/LunaTranslator/LunaTranslator/translator/rengong.py +++ b/LunaTranslator/LunaTranslator/translator/rengong.py @@ -8,19 +8,26 @@ import gobject class TS(basetrans): def checkfilechanged(self, p1, p): - if self.paths != (p1, p): - self.jsons = [] - if p: - for pp in p: - if os.path.exists(pp): - with open(pp, "r", encoding="utf8") as f: - self.jsons.append(json.load(f)) - if p1: - for pp in p1: - if os.path.exists(pp): - with open(pp, "r", encoding="utf8") as f: - self.jsons.append(json.load(f)) - self.paths = (p1, p) + if self.paths == (p1, p): + return + self.paths = (p1, p) + self.json = {} + self.lines = None + if p: + for pp in p: + self.safeload(pp) + if p1: + for pp in p1: + self.safeload(pp) + + def safeload(self, pp): + if not os.path.exists(pp): + return + with open(pp, "r", encoding="utf8") as f: + try: + self.json.update(json.load(f)) + except: + pass def unsafegetcurrentgameconfig(self): try: @@ -38,48 +45,83 @@ class TS(basetrans): self.unsafegetcurrentgameconfig(), tuple(self.config["jsonfile"]) ) - def translate(self, content): - self.checkfilechanged( - self.unsafegetcurrentgameconfig(), tuple(self.config["jsonfile"]) - ) - collect = [] + def analyze_result(self, obj): + if type(obj) == str: + return obj + if type(obj) != dict: + return None + + savet = obj.get("userTrans") + if savet: + return savet + + savet = obj.get("machineTrans") + if savet: + return savet + + return None + + def delayloadlines(self): + if self.lines is not None: + return + self.lines = {} + for k, v in self.json.items(): + if "\n" not in k: + continue + v = self.analyze_result(v) + if not v: + continue + ks = k.split("\n") + vs = v.split("\n") + if len(ks) != len(vs): + continue + for i in range(len(ks)): + self.lines[ks[i]] = vs[i] + + def tryfindtranslate(self, content: str, _js: dict, _js2: dict = None): if globalconfig["premtsimiuse"]: - for _js in self.jsons: - maxsim = 0 - savet = None - for jc in _js: + + maxsim = 0 + savet = None + for jx in (_js, _js2): + if not jx: + continue + for jc in jx: dis = winsharedutils.distance_ratio(content, jc) if dis > maxsim: maxsim = dis if maxsim * 100 >= globalconfig["premtsimi2"]: - if type(_js[jc]) == str: - savet = _js[jc] - elif _js[jc]["userTrans"] and _js[jc]["userTrans"] != "": - savet = _js[jc]["userTrans"] - - elif ( - _js[jc]["machineTrans"] - and _js[jc]["machineTrans"] != "" - ): - savet = _js[jc]["machineTrans"] - if savet is None: - continue - else: - collect.append(savet) + savet = self.analyze_result(jx[jc]) + return savet else: - for _js in self.jsons: - if content not in _js: - continue - if type(_js[content]) == str: - collect.append(_js[content]) - elif _js[content]["userTrans"] and _js[content]["userTrans"] != "": - collect.append(_js[content]["userTrans"]) + if content in _js: + return self.analyze_result(_js[content]) + if _js2 and (content in _js2): + return self.analyze_result(_js2[content]) + return None - elif ( - _js[content]["machineTrans"] and _js[content]["machineTrans"] != "" - ): - collect.append(_js[content]["machineTrans"]) - if len(collect) == 0: - raise Exception(f"can't find: {content}") + def tryfindtranslate_single(self, content: str): + self.delayloadlines() + if "\n" not in content: + return self.tryfindtranslate(content, self.json, self.lines) + + collect = [] + for line in content.split("\n"): + line = self.tryfindtranslate(line, self.json, self.lines) + if not line: + return None + collect.append(line) return "\n".join(collect) + + def translate(self, content: str): + self.checkfilechanged( + self.unsafegetcurrentgameconfig(), tuple(self.config["jsonfile"]) + ) + if globalconfig["premtmatcheveryline"]: + res = self.tryfindtranslate_single(content) + else: + res = self.tryfindtranslate(content, self.json) + if not res: + raise Exception(f"can't find: {content}") + return res diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index 46fbe3fe..d0248c22 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -509,6 +509,7 @@ "accept_use_unicode_start": 0, "accept_use_unicode_end": 65535, "premtsimiuse": false, + "premtmatcheveryline": false, "buttoncolor": "#2e2eff", "buttoncolor2": "#FF69B4", "buttoncolor3": "#afafaf", diff --git a/LunaTranslator/files/defaultconfig/translatorsetting.json b/LunaTranslator/files/defaultconfig/translatorsetting.json index 577620d8..c589fdc0 100644 --- a/LunaTranslator/files/defaultconfig/translatorsetting.json +++ b/LunaTranslator/files/defaultconfig/translatorsetting.json @@ -1132,7 +1132,7 @@ "max_new_token": 1024, "repetition_penalty": 1, "frequency_penalty": 0, - "fix_degeneration": true, + "fix_degeneration": false, "流式输出": true, "prompt_version": 0, "s": "" diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index 46204556..fb8d07e8 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -28,7 +28,6 @@ "彩云": "سحابة ملونة", "非管理员": "غير مسؤول", "用户词典": "قاموس المستخدم", - "预翻译采用模糊匹配": "غامض مطابقة", "汉语翻译结果繁简转换": "الترجمة الصينية نتيجة التحويل", "时间间隔": "الفاصل الزمني", "字数统计": "كلمة إحصائيات", @@ -815,7 +814,6 @@ "添加文件": "إضافة ملف", "添加文件夹": "إضافة مجلد", "类型": "نوع .", - "找不到文本": "لا يمكن العثور على النص", "官方网站": "الموقع الرسمي", "欢迎使用": "مرحبا بكم في استخدام", "显示注音": "عرض صوتي", @@ -856,5 +854,7 @@ "拉丁语": "اللاتينية", "显示/隐藏翻译": "إظهار / إخفاء الترجمة", "不显示翻译器名称": "لا يتم عرض اسم المترجم", - "华为云": "هوا وي يون" + "华为云": "هوا وي يون", + "逐行匹配": "خط مطابقة", + "游戏适配": "لعبة مباراة" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index 7354d9f4..060e776d 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -48,7 +48,6 @@ "目标语言": "目標語言", "最短翻译字数": "最短翻譯字數", "最长翻译字数": "最長翻譯字數", - "预翻译采用模糊匹配": "預先翻譯採用模糊匹配", "录制翻译文件": "錄製翻譯檔案", "导出的第一翻译源": "匯出的第一翻譯來源", "离线翻译": "離線翻譯", @@ -815,7 +814,6 @@ "添加文件": "加入檔案", "添加文件夹": "加入資料夾", "类型": "類型", - "找不到文本": "找不到文字", "官方网站": "官方網站", "欢迎使用": "歡迎使用", "显示注音": "顯示注音", @@ -856,5 +854,7 @@ "拉丁语": "拉丁語", "显示/隐藏翻译": "顯示/隱藏翻譯", "不显示翻译器名称": "不顯示翻譯器名稱", - "华为云": "華為雲" + "华为云": "華為雲", + "逐行匹配": "逐行匹配", + "游戏适配": "遊戲適配" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cs.json b/LunaTranslator/files/lang/cs.json index 1363de33..356a8c3f 100644 --- a/LunaTranslator/files/lang/cs.json +++ b/LunaTranslator/files/lang/cs.json @@ -80,7 +80,6 @@ "手动设置代理(ip:port)": "Ručně nastavit proxy (ip: port)", "录制翻译文件": "Záznam překladových souborů", "字体样式": "Styl písma", - "预翻译采用模糊匹配": "Předpřeklad přijímá fuzzy matching", "搜索文本过短!": "Vyhledávací text je příliš krátký!", "的OCR模型": "Model OCR", "备忘录按钮": "Tlačítko Memo", @@ -815,7 +814,6 @@ "添加文件": "Přidat soubor", "添加文件夹": "přidat složky", "类型": "typ", - "找不到文本": "Text nebyl nalezen", "官方网站": "Oficiální internetové stránky", "欢迎使用": "Vítejte v použití", "显示注音": "Zobrazit fonetickou zápis", @@ -856,5 +854,7 @@ "拉丁语": "Latinský jazyk", "显示/隐藏翻译": "Zobrazit/skrýt překlad", "不显示翻译器名称": "Nezobrazovat jméno překladatele", - "华为云": "Hua Weiyun." + "华为云": "Hua Weiyun.", + "逐行匹配": "Shoda řádku po řádku", + "游戏适配": "Úprava hry" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/de.json b/LunaTranslator/files/lang/de.json index b124239d..89c288d2 100644 --- a/LunaTranslator/files/lang/de.json +++ b/LunaTranslator/files/lang/de.json @@ -80,7 +80,6 @@ "手动设置代理(ip:port)": "Proxy manuell einstellen (IP: Port)", "录制翻译文件": "Übersetzungsdateien aufzeichnen", "字体样式": "Schriftart", - "预翻译采用模糊匹配": "Vorübersetzung verwendet Fuzzy Matching", "搜索文本过短!": "Der Suchtext ist zu kurz!", "的OCR模型": "Das OCR-Modell", "备忘录按钮": "Memo-Taste", @@ -815,7 +814,6 @@ "添加文件": "Datei hinzufügen", "添加文件夹": "Ordner hinzufügen", "类型": "Typ", - "找不到文本": "Text nicht gefunden", "官方网站": "Offizielle Website", "欢迎使用": "Willkommen zur Nutzung", "显示注音": "Phonetische Notation anzeigen", @@ -856,5 +854,7 @@ "拉丁语": "Lateinische Sprache", "显示/隐藏翻译": "Übersetzung ein-/ausblenden", "不显示翻译器名称": "Übersetzername nicht anzeigen", - "华为云": "Hua Weiyun" + "华为云": "Hua Weiyun", + "逐行匹配": "Zeile für Zeile übereinstimmen", + "游戏适配": "Anpassung des Spiels" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index 8c58fc11..8b256bd1 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -147,7 +147,6 @@ "简单替换内容(若替换为空则直接过滤)": "Replace Text (Deleted if Replacement is Blank)", "次数统计": "Count Statistics", "代名詞": "Pronouns", - "预翻译采用模糊匹配": "Pre-translation Uses Fuzzy Matching", "必应": "Bing", "判定詞": "Copulas", "翻译器字体类型": "Translator Font Type", @@ -815,7 +814,6 @@ "添加文件": "Add file", "添加文件夹": "add folders", "类型": "type", - "找不到文本": "Text not found", "官方网站": "Official website", "欢迎使用": "Welcome to use", "显示注音": "Display phonetic notation", @@ -856,5 +854,7 @@ "拉丁语": "Latin language", "显示/隐藏翻译": "Show/Hide Translation", "不显示翻译器名称": "Do not display translator name", - "华为云": "Hua Weiyun" + "华为云": "Hua Weiyun", + "逐行匹配": "Match line by line", + "游戏适配": "Game adaptation" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index 412717df..a52a31e7 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -48,7 +48,6 @@ "目标语言": "Idioma objetivo", "最短翻译字数": "Número mínimo de palabras traducidas", "最长翻译字数": "Número máximo de palabras traducidas", - "预翻译采用模糊匹配": "La traducción previa adopta una coincidencia inútil", "录制翻译文件": "Grabar archivos traducidos", "导出的第一翻译源": "La primera fuente de traducción exportada", "离线翻译": "Traducción fuera de línea", @@ -815,7 +814,6 @@ "添加文件": "Añadir archivo", "添加文件夹": "Añadir carpetas", "类型": "Tipo", - "找不到文本": "No se puede encontrar el texto", "官方网站": "Sitio web oficial", "欢迎使用": "Bienvenido a usar", "显示注音": "Muestra la nota de sonido", @@ -856,5 +854,7 @@ "拉丁语": "Latín", "显示/隐藏翻译": "Mostrar / ocultar traducción", "不显示翻译器名称": "No se muestra el nombre del traductor", - "华为云": "Hua weiyun" + "华为云": "Hua weiyun", + "逐行匹配": "Coincidencia línea a línea", + "游戏适配": "Adaptación del juego" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index 00a7f04d..246fe14d 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -48,7 +48,6 @@ "目标语言": "Langue cible", "最短翻译字数": "Nombre minimum de mots traduits", "最长翻译字数": "Nombre maximum de mots traduits", - "预翻译采用模糊匹配": "Correspondance floue utilisée dans la pré - traduction", "录制翻译文件": "Enregistrer le fichier de traduction", "导出的第一翻译源": "Première source de traduction exportée", "离线翻译": "Traduction hors ligne", @@ -815,7 +814,6 @@ "添加文件": "Ajouter un fichier", "添加文件夹": "Ajouter un dossier", "类型": "Type", - "找不到文本": "Aucun texte trouvé", "官方网站": "Site officiel", "欢迎使用": "Bienvenue à utiliser", "显示注音": "Afficher les notes", @@ -856,5 +854,7 @@ "拉丁语": "Latin", "显示/隐藏翻译": "Afficher / masquer la traduction", "不显示翻译器名称": "Ne pas afficher le nom du traducteur", - "华为云": "Huawei Cloud" + "华为云": "Huawei Cloud", + "逐行匹配": "Correspondance ligne par ligne", + "游戏适配": "Adaptation du jeu" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index bb6cc3da..0060fced 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -48,7 +48,6 @@ "目标语言": "lingua di destinazione", "最短翻译字数": "Numero minimo di parole tradotte", "最长翻译字数": "Numero massimo di parole tradotte", - "预翻译采用模糊匹配": "Pre-traduzione usando corrispondenza sfocata", "录制翻译文件": "Registrazione dei file di traduzione", "导出的第一翻译源": "Prima fonte di traduzione esportata", "离线翻译": "Traduzione offline", @@ -815,7 +814,6 @@ "添加文件": "Aggiungi file", "添加文件夹": "aggiungi cartelle", "类型": "tipo", - "找不到文本": "Testo non trovato", "官方网站": "Sito ufficiale", "欢迎使用": "Benvenuti all'uso", "显示注音": "Mostra notazione fonetica", @@ -856,5 +854,7 @@ "拉丁语": "Lingua latina", "显示/隐藏翻译": "Mostra/Nascondi traduzione", "不显示翻译器名称": "Non visualizzare il nome del traduttore", - "华为云": "Hua Weiyun" + "华为云": "Hua Weiyun", + "逐行匹配": "Corrisponda linea per linea", + "游戏适配": "Adattamento del gioco" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index ef4156cf..d09d6f97 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -48,7 +48,6 @@ "目标语言": "ターゲット言語", "最短翻译字数": "最短翻訳文字数", "最长翻译字数": "最長翻訳文字数", - "预翻译采用模糊匹配": "プリ翻訳にファジィマッチングを採用", "录制翻译文件": "翻訳ファイルの記録", "导出的第一翻译源": "エクスポートされた最初の翻訳ソース", "离线翻译": "オフライン翻訳", @@ -815,7 +814,6 @@ "添加文件": "ファイルを追加", "添加文件夹": "フォルダを追加", "类型": "を選択してオプションを設定します。", - "找不到文本": "テキストが見つかりません", "官方网站": "公式サイト", "欢迎使用": "ようこそ", "显示注音": "ルビを表示", @@ -856,5 +854,7 @@ "拉丁语": "ラテン語", "显示/隐藏翻译": "翻訳の表示/非表示", "不显示翻译器名称": "翻訳者名を表示しない", - "华为云": "華を雲と為す" + "华为云": "華を雲と為す", + "逐行匹配": "プログレッシブマッチング", + "游戏适配": "ゲームアダプタ" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index 654f381d..aee72d94 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -48,7 +48,6 @@ "目标语言": "대상 언어", "最短翻译字数": "최소 번역 단어 수", "最长翻译字数": "최대 번역 단어 수", - "预翻译采用模糊匹配": "사전 번역은 모호한 일치를 채택한다", "录制翻译文件": "번역 파일 기록", "导出的第一翻译源": "내보낸 첫 번째 번역 소스", "离线翻译": "오프라인 번역", @@ -815,7 +814,6 @@ "添加文件": "파일 추가", "添加文件夹": "폴더 추가", "类型": "유형", - "找不到文本": "텍스트를 찾을 수 없음", "官方网站": "공식 사이트", "欢迎使用": "시작", "显示注音": "메모 표시", @@ -856,5 +854,7 @@ "拉丁语": "라틴어", "显示/隐藏翻译": "번역 표시 / 숨기기", "不显示翻译器名称": "번역기 이름이 표시되지 않음", - "华为云": "화위운" + "华为云": "화위운", + "逐行匹配": "행별 일치", + "游戏适配": "게임 적합성" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/nl.json b/LunaTranslator/files/lang/nl.json index 67002143..8a43f8cd 100644 --- a/LunaTranslator/files/lang/nl.json +++ b/LunaTranslator/files/lang/nl.json @@ -80,7 +80,6 @@ "手动设置代理(ip:port)": "Proxy handmatig instellen (ip: poort)", "录制翻译文件": "Vertalingsbestanden opnemen", "字体样式": "Lettertypestijl", - "预翻译采用模糊匹配": "Voorvertaling neemt fuzzy matching aan", "搜索文本过短!": "De zoektekst is te kort!", "的OCR模型": "Het OCR-model", "备忘录按钮": "Memoknop", @@ -815,7 +814,6 @@ "添加文件": "Bestand toevoegen", "添加文件夹": "mappen toevoegen", "类型": "type", - "找不到文本": "Tekst niet gevonden", "官方网站": "Officiële website", "欢迎使用": "Welkom bij gebruik", "显示注音": "Toon fonetische notatie", @@ -856,5 +854,7 @@ "拉丁语": "Latijnse taal", "显示/隐藏翻译": "Vertaling tonen/verbergen", "不显示翻译器名称": "Toon de naam van de vertaler niet", - "华为云": "Hua Weiyun." + "华为云": "Hua Weiyun.", + "逐行匹配": "Lijn voor regel overeenkomen", + "游戏适配": "Game aanpassing" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index e7b0732c..0d156bae 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -48,7 +48,6 @@ "目标语言": "język docelowy", "最短翻译字数": "Minimalna liczba przetłumaczonych słów", "最长翻译字数": "Maksymalna liczba przetłumaczonych słów", - "预翻译采用模糊匹配": "Tłumaczenie wstępne przy użyciu dopasowania rozmytego", "录制翻译文件": "Nagrywanie plików tłumaczeniowych", "导出的第一翻译源": "Pierwsze wyeksportowane źródło tłumaczenia", "离线翻译": "Tłumaczenie offline", @@ -815,7 +814,6 @@ "添加文件": "Dodaj plik", "添加文件夹": "dodaj foldery", "类型": "typ", - "找不到文本": "Tekst nie znaleziony", "官方网站": "Oficjalna strona internetowa", "欢迎使用": "Witamy w użyciu", "显示注音": "Wyświetla notację fonetyczną", @@ -856,5 +854,7 @@ "拉丁语": "Język łaciński", "显示/隐藏翻译": "Pokaż/ukryj tłumaczenie", "不显示翻译器名称": "Nie wyświetlaj nazwy tłumacza", - "华为云": "Hua Weiyun." + "华为云": "Hua Weiyun.", + "逐行匹配": "Dopasuj linię po linii", + "游戏适配": "Adaptacja gry" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pt.json b/LunaTranslator/files/lang/pt.json index 4a5f29ca..d551e9be 100644 --- a/LunaTranslator/files/lang/pt.json +++ b/LunaTranslator/files/lang/pt.json @@ -80,7 +80,6 @@ "手动设置代理(ip:port)": "Configurar manualmente o 'proxy' (ip: port)", "录制翻译文件": "Gravar ficheiros de tradução", "字体样式": "Estilo do Tipo de Letra", - "预翻译采用模糊匹配": "A pré-tradução adota correspondência difusa", "搜索文本过短!": "O texto de pesquisa é muito curto!", "的OCR模型": "O modelo OCR", "备忘录按钮": "Botão de memória", @@ -815,7 +814,6 @@ "添加文件": "Adicionar um ficheiro", "添加文件夹": "adicionar pastas", "类型": "tipo", - "找不到文本": "Texto não encontrado", "官方网站": "Sítio Web oficial", "欢迎使用": "Bem- vindo ao uso", "显示注音": "Mostrar a notação fonética", @@ -856,5 +854,7 @@ "拉丁语": "Língua latina", "显示/隐藏翻译": "Mostrar/ Esconder a Tradução", "不显示翻译器名称": "Não mostrar o nome do tradutor", - "华为云": "Hua Weiyun" + "华为云": "Hua Weiyun", + "逐行匹配": "Corresponder linha por linha", + "游戏适配": "Adaptação do jogo" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index e94d56d6..744af9e3 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -48,7 +48,6 @@ "目标语言": "Целевой язык", "最短翻译字数": "Min слов для перевода", "最长翻译字数": "Max слов для перевода", - "预翻译采用模糊匹配": "Нечеткое совпадение", "录制翻译文件": "Запись переводов в файл", "导出的第一翻译源": "Экспорт источника перевода", "离线翻译": "Автономный перевод", @@ -815,7 +814,6 @@ "添加文件": "Добавить файл", "添加文件夹": "Добавить папку", "类型": "Тип", - "找不到文本": "Текст не найден", "官方网站": "Официальный сайт", "欢迎使用": "Добро пожаловать в использование", "显示注音": "Показать звук", @@ -856,5 +854,7 @@ "拉丁语": "Латинский язык", "显示/隐藏翻译": "Показать / скрыть перевод", "不显示翻译器名称": "Не показывать имя переводчика", - "华为云": "Хуа как облако" + "华为云": "Хуа как облако", + "逐行匹配": "Постепенное согласование", + "游戏适配": "Игра подходит" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/sv.json b/LunaTranslator/files/lang/sv.json index f9ee62c4..2ac07fb1 100644 --- a/LunaTranslator/files/lang/sv.json +++ b/LunaTranslator/files/lang/sv.json @@ -80,7 +80,6 @@ "手动设置代理(ip:port)": "Manuellt inställd proxy (ip: port)", "录制翻译文件": "Spela in översättningsfiler", "字体样式": "Teckensnittsstil", - "预翻译采用模糊匹配": "Före översättning antar suddig matchning", "搜索文本过短!": "Söktexten är för kort!", "的OCR模型": "OCR-modellen", "备忘录按钮": "Memoknapp", @@ -815,7 +814,6 @@ "添加文件": "Lägg till fil", "添加文件夹": "lägg till kataloger", "类型": "typ", - "找不到文本": "Text hittades inte", "官方网站": "Officiell webbplats", "欢迎使用": "Välkommen att använda", "显示注音": "Visa fonetisk notation", @@ -856,5 +854,7 @@ "拉丁语": "Latinska språk", "显示/隐藏翻译": "Visa/dölj översättning", "不显示翻译器名称": "Visa inte översättarens namn", - "华为云": "Hua Weiyun" + "华为云": "Hua Weiyun", + "逐行匹配": "Matcha rad för rad", + "游戏适配": "Spelanpassning" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index 63075a6d..a6b50182 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -80,7 +80,6 @@ "手动设置代理(ip:port)": "ตั้งค่าพร็อกซี่ด้วยตนเอง (ip: port)", "录制翻译文件": "บันทึกไฟล์แปล", "字体样式": "รูปแบบตัวอักษร", - "预翻译采用模糊匹配": "การแปลก่อนใช้การจับคู่ที่คลุมเครือ", "搜索文本过短!": "ค้นหาข้อความสั้นเกินไป!", "的OCR模型": "รุ่น OCR", "备忘录按钮": "ปุ่มบันทึก", @@ -815,7 +814,6 @@ "添加文件": "เพิ่มไฟล์", "添加文件夹": "เพิ่มโฟลเดอร์", "类型": "ประเภท", - "找不到文本": "ไม่พบข้อความ", "官方网站": "เว็บไซต์อย่างเป็นทางการ", "欢迎使用": "ยินดีต้อนรับสู่", "显示注音": "แสดงหมายเหตุ", @@ -856,5 +854,7 @@ "拉丁语": "ละติน", "显示/隐藏翻译": "แสดง/ซ่อนการแปล", "不显示翻译器名称": "ไม่แสดงชื่อแปล", - "华为云": "Huawei เมฆ" + "华为云": "Huawei เมฆ", + "逐行匹配": "จับคู่ตามบรรทัด", + "游戏适配": "การปรับเกม" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index fbd21e14..93c9a04a 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -48,7 +48,6 @@ "目标语言": "hedef dili", "最短翻译字数": "Tercüme edilen kelimelerin en az sayısı", "最长翻译字数": "Tercüme edilen sözlerin en büyük sayısı", - "预翻译采用模糊匹配": "Önceki çeviri, çöplü eşleştirmeyi kabul ediyor", "录制翻译文件": "Çeviri dosyasını kaydedin", "导出的第一翻译源": "İlk çevirim kaynağı dışarı aktarıldı", "离线翻译": "Devre dışı çeviri", @@ -815,7 +814,6 @@ "添加文件": "Dosya ekle", "添加文件夹": "Dosyaları ekle", "类型": "tür", - "找不到文本": "Metin bulunamadı", "官方网站": "Resmi web sitesi", "欢迎使用": "Kullanmaya hoş geldiniz.", "显示注音": "Fonetik notasyonu göster", @@ -856,5 +854,7 @@ "拉丁语": "Latin dili", "显示/隐藏翻译": "Çeviri Göster/Gizle", "不显示翻译器名称": "Tercüme ismini gösterme", - "华为云": "Hua Weiyun" + "华为云": "Hua Weiyun", + "逐行匹配": "Satırla eşleştir", + "游戏适配": "Oyun uygulaması" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index ace9d20b..8827253e 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -48,7 +48,6 @@ "目标语言": "мова призначення", "最短翻译字数": "Мінімальна кількість перекладених слів", "最长翻译字数": "Максимальна кількість перекладених слів", - "预翻译采用模糊匹配": "Попередній переклад за допомогою неприємного збігання", "录制翻译文件": "Запис файлів перекладу", "导出的第一翻译源": "First translation source exported", "离线翻译": "Офлайн переклад", @@ -815,7 +814,6 @@ "添加文件": "Додати файл", "添加文件夹": "додати теки", "类型": "тип", - "找不到文本": "Текст не знайдено", "官方网站": "Офіційна веб-сайт", "欢迎使用": "Ласкаво просимо використовувати", "显示注音": "Показувати фонетичну нотацію", @@ -856,5 +854,7 @@ "拉丁语": "Латинська мова", "显示/隐藏翻译": "Показувати/сховати переклад", "不显示翻译器名称": "Не показувати назву перекладача", - "华为云": "Hua Weiyun" + "华为云": "Hua Weiyun", + "逐行匹配": "Порівнювати рядок за рядком", + "游戏适配": "Адаптація гри" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index b8b8c6ed..9757d0e7 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -48,7 +48,6 @@ "目标语言": "Ngôn ngữ đích", "最短翻译字数": "Số lượng từ phiên dịch ngắn nhất", "最长翻译字数": "Số lượng từ phiên dịch dài nhất", - "预翻译采用模糊匹配": "Sử dụng Blur Match", "录制翻译文件": "Ghi lại tập tin dịch", "导出的第一翻译源": "Nguồn dịch đầu tiên xuất khẩu", "离线翻译": "Dịch ngoại tuyến", @@ -815,7 +814,6 @@ "添加文件": "Thêm tập tin", "添加文件夹": "Thêm thư mục", "类型": "Loại", - "找不到文本": "Không tìm thấy văn bản", "官方网站": "Trang web chính thức", "欢迎使用": "Chào mừng đến với", "显示注音": "Hiện chú thích", @@ -856,5 +854,7 @@ "拉丁语": "Tiếng Việt", "显示/隐藏翻译": "Hiện/ẩn bản dịch", "不显示翻译器名称": "Name", - "华为云": "Hoa Vi Vân" + "华为云": "Hoa Vi Vân", + "逐行匹配": "Khớp từng dòng", + "游戏适配": "Trò chơi phù hợp" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index 58f133c8..c17630b6 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -80,7 +80,6 @@ "手动设置代理(ip:port)": "", "录制翻译文件": "", "字体样式": "", - "预翻译采用模糊匹配": "", "搜索文本过短!": "", "的OCR模型": "", "备忘录按钮": "", @@ -703,7 +702,7 @@ "按钮颜色": "", "按钮大小": "", "软件显示语言": "", - "找不到文本": "", + "游戏适配": "", "填充颜色": "", "阴影强度": "", "阴影半径": "", @@ -856,5 +855,6 @@ "设为图标": "", "还原图标": "", "拉丁语": "", - "华为云": "" + "华为云": "", + "逐行匹配": "" } \ No newline at end of file diff --git a/docs/zh/sakurallmcolab.md b/docs/zh/sakurallmcolab.md index 7b812a82..308dcec0 100644 --- a/docs/zh/sakurallmcolab.md +++ b/docs/zh/sakurallmcolab.md @@ -34,7 +34,7 @@ ### **飞桨Ai Studio** -* 免费额度为每日登录领取4小时,或可累加 +* 免费额度为每日登录领取4小时,并且可以通过一些积分任务获取更多时长
1. 在飞桨Ai Studio中创建项目,注意项目框架必须为PaddlePaddle 3.0.0beta1 diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index c3e47bdd..bd4b2042 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 35) -set(VERSION_PATCH 6) +set(VERSION_PATCH 7) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)