From 13ebfd268a77296d9f50941895635687d96f7114 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, 13 Jul 2024 15:38:34 +0800 Subject: [PATCH] lang --- .../LunaTranslator/gui/inputdialog.py | 16 +++- .../gui/setting_textinput_ocr.py | 1 - .../LunaTranslator/myutils/config.py | 17 +++- .../LunaTranslator/myutils/utils.py | 2 +- .../LunaTranslator/ocrengines/local.py | 91 +++++++++++++++++-- .../LunaTranslator/ocrengines/windowsocr.py | 61 +++++++++---- .../files/defaultconfig/ocrsetting.json | 28 ++++++ LunaTranslator/files/lang/ar.json | 6 +- LunaTranslator/files/lang/cht.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/pl.json | 6 +- LunaTranslator/files/lang/ru.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 +- 22 files changed, 243 insertions(+), 63 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/inputdialog.py b/LunaTranslator/LunaTranslator/gui/inputdialog.py index f5f1a9c1..b3764cb8 100644 --- a/LunaTranslator/LunaTranslator/gui/inputdialog.py +++ b/LunaTranslator/LunaTranslator/gui/inputdialog.py @@ -418,8 +418,7 @@ class autoinitdialog(QDialog): self.setWindowTitle(_TR(title)) self.resize(QSize(width, 10)) - formLayout = QFormLayout() - self.setLayout(formLayout) + formLayout = None regist = [] def save(callback=None): @@ -454,6 +453,16 @@ class autoinitdialog(QDialog): regist.append([dd, key, functools.partial(__getv, __list)]) lineW = QHBoxLayout() lineW.addWidget(e) + elif line["type"] == "program": + try: + func = getattr( + importlib.import_module(line["route"][0]), + line["route"][1], + ) + func(self) + except: + print_exc() + break elif line["type"] == "combo": lineW = FocusCombo() if "list_function" in line: @@ -527,6 +536,9 @@ class autoinitdialog(QDialog): lineW.setSingleStep(line.get("step", 1)) lineW.setValue(dd[key]) lineW.valueChanged.connect(functools.partial(dd.__setitem__, key)) + if formLayout is None: + formLayout = QFormLayout() + self.setLayout(formLayout) if "name" in line: formLayout.addRow(_TR(line["name"]), lineW) else: diff --git a/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py b/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py index 181d5bf6..b02c5a32 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py +++ b/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py @@ -45,7 +45,6 @@ def getocrgrid(self): ), icon="fa.gear", ) - else: _3 = "" diff --git a/LunaTranslator/LunaTranslator/myutils/config.py b/LunaTranslator/LunaTranslator/myutils/config.py index caa86c6b..d745d97c 100644 --- a/LunaTranslator/LunaTranslator/myutils/config.py +++ b/LunaTranslator/LunaTranslator/myutils/config.py @@ -154,9 +154,9 @@ def getdefaultsavehook(title=None): "currentvisimage": None, "currentmainimage": "", "noundictconfig": [], - "noundict_use":True, - "vndbnamemap_use" :True, - "vndbnamemap_modified" :False, + "noundict_use": False, + "vndbnamemap_use": True, + "vndbnamemap_modified": False, # 元数据 "namemap": {}, # 人名翻译映射,vndb独占,用于优化翻译 # @@ -444,6 +444,17 @@ def _TRL(kk): return x +def getlang_inner2show(langcode): + return _TR( + dict( + zip( + static_data["language_list_translator_inner"], + static_data["language_list_translator"], + ) + ).get(langcode, "??") + ) + + def safesave(fname, js, beatiful=True): # 有时保存时意外退出,会导致config文件被清空 os.makedirs("./userconfig", exist_ok=True) diff --git a/LunaTranslator/LunaTranslator/myutils/utils.py b/LunaTranslator/LunaTranslator/myutils/utils.py index fe6696d7..d0d4daad 100644 --- a/LunaTranslator/LunaTranslator/myutils/utils.py +++ b/LunaTranslator/LunaTranslator/myutils/utils.py @@ -266,7 +266,7 @@ def kanjitrans(k): def stringfyerror(e): - return str(type(e))[8:-2] + " " + str(e).replace("\n", "").replace("\r", "") + return str(type(e))[8:-2] + " " + str(e).replace("\n", " ").replace("\r", "") def checkportavailable(port): diff --git a/LunaTranslator/LunaTranslator/ocrengines/local.py b/LunaTranslator/LunaTranslator/ocrengines/local.py index d693840b..d44e4484 100644 --- a/LunaTranslator/LunaTranslator/ocrengines/local.py +++ b/LunaTranslator/LunaTranslator/ocrengines/local.py @@ -1,6 +1,6 @@ -import os -from myutils.utils import getlangsrc -from myutils.config import globalconfig, _TR +import os, zipfile +from myutils.utils import getlangsrc, dynamiclink +from myutils.config import globalconfig, _TR, getlang_inner2show from ocrengines.baseocrclass import baseocr from ctypes import ( CDLL, @@ -14,8 +14,11 @@ from ctypes import ( c_char_p, ) import os -import gobject +import gobject, functools from traceback import print_exc +from qtsymbols import * +from gui.inputdialog import autoinitdialog +from gui.usefulwidget import FocusCombo, getboxlayout class ocrpoints(Structure): @@ -116,6 +119,74 @@ class ocrwrapper: pass +def getallsupports(): + langs = [] + for f in os.listdir("./files/ocr"): + path = "./files/ocr/{}".format(f) + if not ( + os.path.exists(path + "/det.onnx") + and os.path.exists(path + "/rec.onnx") + and os.path.exists(path + "/dict.txt") + ): + continue + langs.append(f) + return langs + + +def dodownload(combo: QComboBox, allsupports: list): + lang = allsupports[combo.currentIndex()] + os.startfile(dynamiclink("{main_server}/Resource/ocr_models/" + lang + ".zip")) + + +def doinstall(combo: QComboBox, allsupports: list, parent, callback): + lang = allsupports[combo.currentIndex()] + f = QFileDialog.getOpenFileName(parent, filter=lang + ".zip") + fn = f[0] + if not fn: + return + try: + with zipfile.ZipFile(fn) as zipf: + zipf.extractall("files/ocr") + + gobject.baseobject.showtraymessage("", "安装成功") + callback() + except: + print_exc() + + +def question(dialog: QDialog): + formLayout = QFormLayout() + dialog.setLayout(formLayout) + supportlang = QLabel() + formLayout.addRow(_TR("当前支持的语言"), supportlang) + combo = FocusCombo() + allsupports = [] + + def callback(): + langs = getallsupports() + supportlang.setText(", ".join([getlang_inner2show(f) for f in langs])) + _allsupports = ["ja", "en", "zh", "cht", "ko", "ru"] + allsupports.clear() + for l in _allsupports: + if l not in langs: + allsupports.append(l) + vis = [getlang_inner2show(f) for f in allsupports] + combo.clear() + combo.addItems(vis) + + callback() + btndownload = QPushButton(_TR("下载")) + btndownload.clicked.connect(functools.partial(dodownload, combo, allsupports)) + btninstall = QPushButton(_TR("添加")) + btninstall.clicked.connect( + functools.partial(doinstall, combo, allsupports, dialog, callback) + ) + formLayout.addRow( + _TR("添加语言包"), + getboxlayout([combo, btndownload, btninstall], makewidget=True), + ) + + class OCR(baseocr): def end(self): self._ocr.trydestroy() @@ -137,9 +208,15 @@ class OCR(baseocr): and os.path.exists(path + "/dict.txt") ): raise Exception( - _TR( - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用" - ) + _TR("未添加") + + ' "' + + getlang_inner2show(self.srclang) + + '" ' + + _TR("的OCR模型") + + "\n" + + _TR("当前支持的语言") + + ": " + + ", ".join([getlang_inner2show(f) for f in getallsupports()]) ) self._ocr.init(path + "/det.onnx", path + "/rec.onnx", path + "/dict.txt") self._savelang = self.srclang diff --git a/LunaTranslator/LunaTranslator/ocrengines/windowsocr.py b/LunaTranslator/LunaTranslator/ocrengines/windowsocr.py index d429461f..647b2683 100644 --- a/LunaTranslator/LunaTranslator/ocrengines/windowsocr.py +++ b/LunaTranslator/LunaTranslator/ocrengines/windowsocr.py @@ -1,37 +1,60 @@ import os import winrtutils -from myutils.config import _TR, static_data +from myutils.config import _TR, static_data, getlang_inner2show from ocrengines.baseocrclass import baseocr +from qtsymbols import * + + +def initsupports(): + _allsupport = winrtutils.getlanguagelist() + supportmap = {} + for lang in static_data["language_list_translator_inner"] + [ + "zh-Hans", + "zh-Hant", + ]: + if lang == "zh" or lang == "cht": + continue + for s in _allsupport: + if s.startswith(lang) or lang.startswith(s): + supportmap[lang] = s + break + if "zh-Hans" in supportmap: + v = supportmap.pop("zh-Hans") + supportmap["zh"] = v + if "zh-Hant" in supportmap: + v = supportmap.pop("zh-Hant") + supportmap["cht"] = v + return supportmap + + +def question(dialog: QDialog): + formLayout = QFormLayout() + dialog.setLayout(formLayout) + _allsupport = initsupports() + supportlang = QLabel() + supportlang.setText(", ".join([getlang_inner2show(f) for f in _allsupport])) + formLayout.addRow(_TR("当前支持的语言"), supportlang) class OCR(baseocr): def initocr(self): - _allsupport = winrtutils.getlanguagelist() - self.supportmap = {} - for lang in static_data["language_list_translator_inner"] + [ - "zh-Hans", - "zh-Hant", - ]: - if lang == "zh" or lang == "cht": - continue - for s in _allsupport: - if s.startswith(lang) or lang.startswith(s): - self.supportmap[lang] = s - break - if "zh-Hans" in self.supportmap: - v = self.supportmap.pop("zh-Hans") - self.supportmap["zh"] = v - if "zh-Hant" in self.supportmap: - v = self.supportmap.pop("zh-Hant") - self.supportmap["cht"] = v + self.supportmap = initsupports() def ocr(self, imagebinary): if self.srclang not in self.supportmap: + + _allsupport = initsupports() idx = static_data["language_list_translator_inner"].index(self.srclang) raise Exception( _TR("系统未安装") + + ' "' + _TR(static_data["language_list_translator"][idx]) + + '" ' + _TR("的OCR模型") + + "\n" + + _TR("当前支持的语言") + + ": " + + ", ".join([getlang_inner2show(f) for f in _allsupport]) ) if self.srclang in ["zh", "ja", "cht"]: diff --git a/LunaTranslator/files/defaultconfig/ocrsetting.json b/LunaTranslator/files/defaultconfig/ocrsetting.json index 43b9d576..bb2fd8c0 100644 --- a/LunaTranslator/files/defaultconfig/ocrsetting.json +++ b/LunaTranslator/files/defaultconfig/ocrsetting.json @@ -1,4 +1,32 @@ { + "local": { + "args": { + "": "" + }, + "argstype": { + "": { + "type": "program", + "route": [ + "ocrengines.local", + "question" + ] + } + } + }, + "windowsocr": { + "args": { + "": "" + }, + "argstype": { + "": { + "type": "program", + "route": [ + "ocrengines.windowsocr", + "question" + ] + } + } + }, "baiduocr_X": { "args": { "注册网址": "https://console.bce.baidu.com/ai/?fromai=1#/ai/ocr/app/list", diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index d3643ed8..53980b36 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -627,7 +627,6 @@ "不被打断": "لا يقاطع", "显示/隐藏历史翻译": "إظهار / إخفاء التاريخ", "全屏/恢复游戏窗口": "كامل الشاشة / استعادة نافذة اللعبة", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "لا تحميل نموذج التعرف الضوئي على الحروف في هذه اللغة ، يرجى [ إعدادات أخرى ] - > [ تحميل الموارد ] - > [ التعرف الضوئي على الحروف حزمة اللغة ] تحميل نموذج استخراج الملفات / التعرف الضوئي على الحروف الطريق بعد استخدام", "文本输出": "النص الناتج", "自动输出提取的文本": "التلقائي استخراج النص الناتج", "缩放": "تحجيم", @@ -816,5 +815,8 @@ "自定义优化": "عرف التحسين", "人名": "اسم الشخص", "游戏ID 0表示全局": "معرف اللعبة 0", - "游戏数据": "بيانات اللعبة" + "游戏数据": "بيانات اللعبة", + "当前支持的语言": "اللغات المدعومة حاليا", + "添加语言包": "إضافة حزمة اللغة", + "未添加": "لا إضافة" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index 95712a40..7fcddd31 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -627,7 +627,6 @@ "不被打断": "不被打斷", "显示/隐藏历史翻译": "顯示 / 隱藏歷史翻譯", "全屏/恢复游戏窗口": "全螢幕 / 復原遊戲視窗", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "未下載該語言的 OCR 模型,請在[其他設定]->[資源下載]->[OCR語言包]下載模型解壓到 files/ocr 路徑後使用", "文本输出": "文字輸出", "自动输出提取的文本": "自動輸出提取的文字", "缩放": "縮放", @@ -816,5 +815,8 @@ "自定义优化": "自定義優化", "人名": "人名", "游戏ID 0表示全局": "遊戲ID 0表示全域", - "游戏数据": "遊戲數據" + "游戏数据": "遊戲數據", + "当前支持的语言": "當前支持的語言", + "添加语言包": "添加語言包", + "未添加": "未添加" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index 4507e557..ab1d6298 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -626,7 +626,6 @@ "不被打断": "Don't Interrupt", "显示/隐藏历史翻译": "Show/Hide Translation History", "全屏/恢复游戏窗口": "Full Screen/Restore Game Window", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "The OCR model for this language is not installed. Go to [Other Settings] -> [Resource Download] -> [OCR Language Pack], then download and extract the model to files/ocr.", "文本输出": "Text Output", "自动输出提取的文本": "Automatically Output Extracted Text", "缩放": "Scale", @@ -816,5 +815,8 @@ "自定义优化": "Custom optimization", "人名": "name", "游戏ID 0表示全局": "Game ID 0 represents global", - "游戏数据": "Game data" + "游戏数据": "Game data", + "当前支持的语言": "Currently supported languages", + "添加语言包": "Add language pack", + "未添加": "Not added" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index c5a0da70..9928ec8a 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -627,7 +627,6 @@ "不被打断": "Sin ser interrumpido", "显示/隐藏历史翻译": "Mostrar / ocultar la traducción histórica", "全屏/恢复游戏窗口": "Pantalla completa / restaurar la ventana del juego", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "El modelo OCR del idioma no se ha descargado, por favor use después de descargar el modelo a la ruta files / OCR [configuración adicional] - > descarga de recursos] - > paquete de lenguaje ocr]", "文本输出": "Salida de texto", "自动输出提取的文本": "Salida automática del Texto extraído", "缩放": "Zoom", @@ -816,5 +815,8 @@ "自定义优化": "Optimización personalizada", "人名": "Nombre", "游戏ID 0表示全局": "El ID del juego 0 Indica global", - "游戏数据": "Datos del juego" + "游戏数据": "Datos del juego", + "当前支持的语言": "Idiomas apoyados actualmente", + "添加语言包": "Añadir paquetes de idiomas", + "未添加": "Sin agregar" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index 88657f68..44d32a45 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -627,7 +627,6 @@ "不被打断": "Ne pas être interrompu", "显示/隐藏历史翻译": "Afficher / masquer les traductions historiques", "全屏/恢复游戏窗口": "Plein écran / restaurer la fenêtre de jeu", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Le modèle OCR pour cette langue n'a pas été téléchargé, utilisez - le après [autres paramètres] - > [ressources télécharger] - > [OCR Language Pack] télécharger le modèle Décompresser le chemin files / ocr", "文本输出": "Sortie de texte", "自动输出提取的文本": "Sortie automatique du texte extrait", "缩放": "Zoom", @@ -816,5 +815,8 @@ "自定义优化": "Optimisation personnalisée", "人名": "Nom de la personne", "游戏ID 0表示全局": "Game ID 0 pour global", - "游戏数据": "Données du jeu" + "游戏数据": "Données du jeu", + "当前支持的语言": "Langues actuellement supportées", + "添加语言包": "Ajouter un pack de langue", + "未添加": "Non ajouté" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index 5ef39b5e..d3f5ff83 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -627,7 +627,6 @@ "不被打断": "Non interrotto", "显示/隐藏历史翻译": "Mostra/nasconde traduzioni storiche", "全屏/恢复游戏窗口": "Finestra di gioco a schermo intero/ripristino", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Il modello OCR per questa lingua non è stato scaricato. Si prega di decomprimere il modello nel percorso file/ocr in [Altre impostazioni] ->[Scaricare risorse] ->[OCR Language Pack] e utilizzarlo", "文本输出": "Output testo", "自动输出提取的文本": "Estrai automaticamente il testo estratto", "缩放": "zoom", @@ -816,5 +815,8 @@ "自定义优化": "Ottimizzazione personalizzata", "人名": "nome", "游戏ID 0表示全局": "L'ID del gioco 0 rappresenta globale", - "游戏数据": "Dati di gioco" + "游戏数据": "Dati di gioco", + "当前支持的语言": "Lingue attualmente supportate", + "添加语言包": "Aggiungi pacchetto linguistico", + "未添加": "Non aggiunto" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index d3ea6780..562ccdba 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -627,7 +627,6 @@ "不被打断": "中断されない", "显示/隐藏历史翻译": "履歴翻訳の表示/非表示", "全屏/恢复游戏窗口": "フルスクリーン/リカバリゲームウィンドウ", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "この言語のOCRモデルはダウンロードされていません。[その他の設定]->[リソースダウンロード]->[OCR言語パック]ダウンロードモデルをfiles/ocrパスに解凍した後に使用してください", "文本输出": "テキスト出力", "自动输出提取的文本": "抽出されたテキストを自動的に出力", "缩放": "ズーム", @@ -816,5 +815,8 @@ "自定义优化": "カスタム最適化", "人名": "人名", "游戏ID 0表示全局": "ゲームID 0はグローバルを表す", - "游戏数据": "ゲームデータ" + "游戏数据": "ゲームデータ", + "当前支持的语言": "現在サポートされている言語", + "添加语言包": "言語パックの追加", + "未添加": "追加されていません" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index 73f7ca4e..ece92d74 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -627,7 +627,6 @@ "离线": "오프라인", "显示/隐藏历史翻译": "히스토리 번역 표시 / 숨기기", "全屏/恢复游戏窗口": "전체 화면 / 게임 창 복원", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "이 언어의 OCR 모델을 다운로드하지 않았습니다. [기타 설정] -> [에셋 다운로드] -> [OCR 언어 팩] 모델을 다운로드하여 files/ocr 경로로 압축을 푼 후 사용하십시오.", "文本输出": "텍스트 출력", "自动输出提取的文本": "추출된 텍스트 자동 내보내기", "缩放": "줌", @@ -816,5 +815,8 @@ "自定义优化": "사용자 정의 최적화", "人名": "인명", "游戏ID 0表示全局": "게임 ID 0은 전역을 나타냅니다.", - "游戏数据": "게임 데이터" + "游戏数据": "게임 데이터", + "当前支持的语言": "현재 지원되는 언어", + "添加语言包": "언어 팩 추가", + "未添加": "추가되지 않음" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index 5ca54bd5..b3056f32 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -627,7 +627,6 @@ "不被打断": "Bez przerwy", "显示/隐藏历史翻译": "Pokaż/ukryj tłumaczenia historyczne", "全屏/恢复游戏窗口": "Pełny ekran/przywróć okno gry", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Model OCR dla tego języka nie został pobrany. Proszę rozpakować model do ścieżki plików/ocr w [Inne ustawienia] ->[Pobieranie zasobów] ->[OCR Language Pack] i użyć go", "文本输出": "Wyjście tekstowe", "自动输出提取的文本": "Automatycznie wyświetlać wyodrębniony tekst", "缩放": "powiększenie", @@ -816,5 +815,8 @@ "自定义优化": "Optymalizacja niestandardowa", "人名": "nazwa", "游戏ID 0表示全局": "Identyfikator gry 0 reprezentuje globalny", - "游戏数据": "Dane gry" + "游戏数据": "Dane gry", + "当前支持的语言": "Obecnie obsługiwane języki", + "添加语言包": "Dodaj pakiet językowy", + "未添加": "Nie dodano" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index f9e461d3..e2bd1eca 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -627,7 +627,6 @@ "不被打断": "Не прерывать.", "显示/隐藏历史翻译": "Показать / скрыть исторический перевод", "全屏/恢复游戏窗口": "Полноэкранное / Восстановление игрового окна", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Модель OCR для этого языка не загружена, используйте ее после того, как [другие настройки] - > [загрузка ресурсов] - > [языковой пакет OCR] загрузит модель на путь files / ocr", "文本输出": "Вывод текста", "自动输出提取的文本": "Автоматический вывод извлеченного текста", "缩放": "Масштаб", @@ -816,5 +815,8 @@ "自定义优化": "Настройка оптимизации", "人名": "Имя человека", "游戏ID 0表示全局": "Идентификатор игры 0 означает глобальный", - "游戏数据": "Игровые данные" + "游戏数据": "Игровые данные", + "当前支持的语言": "Поддерживаемые языки", + "添加语言包": "Добавить языковой пакет", + "未添加": "Не добавлено" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index b4d745f3..9aacea91 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -627,7 +627,6 @@ "不被打断": "ไม่ถูกขัดจังหวะ", "显示/隐藏历史翻译": "แสดง/ซ่อนการแปลประวัติ", "全屏/恢复游戏窗口": "เต็มหน้าจอ/กู้คืนหน้าต่างเกม", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "ไม่มีการดาวน์โหลดรุ่น OCR สำหรับภาษาโปรดใช้หลังจาก [การตั้งค่าอื่น ๆ] -> [ดาวน์โหลดทรัพยากร] -> [ชุดภาษา OCR] ดาวน์โหลดแบบจำลองเปิดเส้นทางไฟล์ / OCR", "文本输出": "ข้อความออก", "自动输出提取的文本": "ส่งออกข้อความที่สกัดโดยอัตโนมัติ", "缩放": "ซูม", @@ -816,5 +815,8 @@ "自定义优化": "การปรับแต่งให้เหมาะสม", "人名": "ชื่อบุคคล", "游戏ID 0表示全局": "รหัสเกม 0 หมายถึงทั่วโลก", - "游戏数据": "ข้อมูลเกม" + "游戏数据": "ข้อมูลเกม", + "当前支持的语言": "ภาษาที่รองรับในปัจจุบัน", + "添加语言包": "เพิ่มแพคภาษา", + "未添加": "ไม่ได้เพิ่ม" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index 957ee266..a73d46b3 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -627,7 +627,6 @@ "不被打断": "Bırakılmadı", "显示/隐藏历史翻译": "Tarihi çevirimleri göster/gizle", "全屏/恢复游戏窗口": "Full screen/restore game window", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Bu dilin OCR modeli indirilmedi. Lütfen modelini [Diğer Ayarlar] ->[Kaynak İndirme] ->[OCR Dil Paketi] içindeki dosyalara/ikiyüzlü yola bağlayın ve kullanın", "文本输出": "Metin çıkış", "自动输出提取的文本": "Automatically output extracted text", "缩放": "zoom", @@ -816,5 +815,8 @@ "自定义优化": "Özel optimizasyon", "人名": "isim", "游戏ID 0表示全局": "Oyun ID 0 küresel olarak temsil ediyor", - "游戏数据": "Oyun verileri" + "游戏数据": "Oyun verileri", + "当前支持的语言": "Şu anda desteklenmiş diller", + "添加语言包": "Dil paketi ekle", + "未添加": "Eklenmedi" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index ca53bef9..2552f591 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -627,7 +627,6 @@ "不被打断": "Не перервано", "显示/隐藏历史翻译": "Показувати/сховати історичні переклади", "全屏/恢复游戏窗口": "Повний екран / відновити вікно гри", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Модель OCR для цієї мови не було звантажено. Будь ласка, відкрийте модель до шляху до файлів/ocr у [Інші параметри] ->[Звантаження ресурсів] ->[Пакет мови OCR] і скористайтеся ним", "文本输出": "Вивід тексту", "自动输出提取的文本": "Автоматично виводити вилучений текст", "缩放": "масштаб", @@ -816,5 +815,8 @@ "自定义优化": "Нетипова оптимізація", "人名": "назва", "游戏ID 0表示全局": "ІД гри 0 означає глобальну", - "游戏数据": "Дані гри" + "游戏数据": "Дані гри", + "当前支持的语言": "Поточно підтримувані мови", + "添加语言包": "Додати пакунок мови", + "未添加": "Не додано" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index a20ae216..4be4c027 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -627,7 +627,6 @@ "不被打断": "Không bị gián đoạn", "显示/隐藏历史翻译": "Hiện/ẩn bản dịch lịch sử", "全屏/恢复游戏窗口": "Toàn màn hình/Khôi phục cửa sổ trò chơi", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Mô hình OCR cho ngôn ngữ này chưa được tải xuống, vui lòng sử dụng sau khi [Cài đặt bổ sung] ->[Tải xuống tài nguyên] ->[Gói ngôn ngữ OCR] mô hình tải xuống đã được giải nén vào đường dẫn files/ocr", "文本输出": "Xuất văn bản", "自动输出提取的文本": "Tự động xuất văn bản đã trích xuất", "缩放": "Phóng to", @@ -816,5 +815,8 @@ "自定义优化": "Tối ưu hóa tùy chỉnh", "人名": "Tên người", "游戏ID 0表示全局": "Game ID 0 có nghĩa là toàn cầu", - "游戏数据": "Dữ liệu trò chơi" + "游戏数据": "Dữ liệu trò chơi", + "当前支持的语言": "Ngôn ngữ được hỗ trợ hiện tại", + "添加语言包": "Thêm gói ngôn ngữ", + "未添加": "Chưa thêm" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index 2cd5bcd6..0200e57b 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -634,7 +634,6 @@ "不被打断": "", "显示/隐藏历史翻译": "", "全屏/恢复游戏窗口": "", - "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "", "文本输出": "", "自动输出提取的文本": "", "缩放": "", @@ -816,5 +815,8 @@ "自定义优化": "", "人名": "", "游戏ID 0表示全局": "", - "游戏数据": "" + "游戏数据": "", + "当前支持的语言": "", + "添加语言包": "", + "未添加": "" } \ No newline at end of file