From 30eacd660262640476ad7167cd9dc15259842af5 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: Fri, 12 Jul 2024 23:41:49 +0800 Subject: [PATCH] fix --- .../LunaTranslator/LunaTranslator_main.py | 2 +- .../LunaTranslator/gui/dialog_savedgame.py | 290 +++++++++--------- .../LunaTranslator/gui/inputdialog.py | 25 +- .../LunaTranslator/gui/selecthook.py | 7 +- LunaTranslator/LunaTranslator/gui/setting.py | 8 +- .../gui/setting_textinput_ocr.py | 3 +- .../LunaTranslator/gui/setting_transopti.py | 33 +- .../LunaTranslator/myutils/config.py | 2 + .../LunaTranslator/myutils/utils.py | 15 +- .../LunaTranslator/transoptimi/noundict.py | 279 ++++++++++++++--- .../LunaTranslator/transoptimi/vndbnamemap.py | 44 ++- .../files/defaultconfig/config.json | 1 + .../files/defaultconfig/static_data.json | 17 +- LunaTranslator/files/lang/ar.json | 15 +- LunaTranslator/files/lang/cht.json | 15 +- LunaTranslator/files/lang/en.json | 15 +- LunaTranslator/files/lang/es.json | 15 +- LunaTranslator/files/lang/fr.json | 15 +- LunaTranslator/files/lang/it.json | 15 +- LunaTranslator/files/lang/ja.json | 15 +- LunaTranslator/files/lang/ko.json | 15 +- LunaTranslator/files/lang/pl.json | 15 +- LunaTranslator/files/lang/ru.json | 15 +- LunaTranslator/files/lang/th.json | 15 +- LunaTranslator/files/lang/tr.json | 15 +- LunaTranslator/files/lang/uk.json | 15 +- LunaTranslator/files/lang/vi.json | 15 +- LunaTranslator/files/lang/zh.json | 15 +- README.md | 3 +- README_en.md | 1 - README_ru.md | 1 - plugins/CMakeLists.txt | 4 +- 32 files changed, 602 insertions(+), 358 deletions(-) diff --git a/LunaTranslator/LunaTranslator/LunaTranslator_main.py b/LunaTranslator/LunaTranslator/LunaTranslator_main.py index 21962024..d9c8fb1f 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator_main.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator_main.py @@ -40,7 +40,7 @@ if __name__ == "__main__": ) font = QFont() font.setStyleStrategy(QFont.StyleStrategy.PreferAntialias) - font.setHintingPreference(QFont.HintingPreference.PreferFullHinting) + font.setHintingPreference(QFont.HintingPreference.PreferNoHinting) QApplication.setFont(font) app = QApplication(sys.argv) diff --git a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py index f9ce965c..4486fc92 100644 --- a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py +++ b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py @@ -26,6 +26,8 @@ from myutils.utils import ( find_or_create_uid, str2rgba, gamdidchangedtask, + checkpostlangmatch, + loadpostsettingwindowmethod_private, titlechangedtask, idtypecheck, selectdebugfile, @@ -593,8 +595,9 @@ def maybehavebutton(self, gameuid, post): self, savehook_new_data[gameuid]["save_text_process_info"][ "postprocessconfig" - ][post]["args"], + ][post]["args"]["替换内容"], postprocessconfig[post]["name"], + ["原文内容", "替换为"], ) else: items = autoinitdialog_items( @@ -675,38 +678,86 @@ class dialog_setting_game_internal(QWidget): ] ), ) + functs = [ - ("启动", self.starttab), - ("HOOK", self.gethooktab), - ("语言", self.getlangtab), - ("文本处理", self.gettextproc), - ("标签", self.getlabelsetting), - ("元数据", self.metadataorigin), - ("统计", self.getstatistic), - ("语音", self.getttssetting), - ("预翻译", self.getpretranstab), - ("Anki", self.maketabforanki), + ("游戏设置", functools.partial(self.___tabf3, self.makegamesettings)), + ("游戏数据", functools.partial(self.___tabf3, self.makegamedata)), ] methodtab, do = makesubtab_lazy( _TRL([_[0] for _ in functs]), [functools.partial(self.doaddtab, _[1], gameuid) for _ in functs], delay=True, ) - self.methodtab = methodtab vbox.addLayout(formLayout) vbox.addWidget(methodtab) do() + def ___tabf(self, function, gameuid): + _w = QWidget() + formLayout = QFormLayout() + _w.setLayout(formLayout) + function(formLayout, gameuid) + return _w + + def ___tabf2(self, function, gameuid): + _w = QWidget() + formLayout = QVBoxLayout() + _w.setLayout(formLayout) + function(formLayout, gameuid) + return _w + + def ___tabf3(self, function, gameuid): + _w = QWidget() + formLayout = QVBoxLayout() + formLayout.setContentsMargins(0, 0, 0, 0) + _w.setLayout(formLayout) + function(formLayout, gameuid) + return _w + + def makegamedata(self, vbox: QVBoxLayout, gameuid): + + functs = [ + ("元数据", functools.partial(self.___tabf, self.metadataorigin)), + ("统计", functools.partial(self.___tabf2, self.getstatistic)), + ("标签", functools.partial(self.___tabf2, self.getlabelsetting)), + ] + methodtab, do = makesubtab_lazy( + _TRL([_[0] for _ in functs]), + [functools.partial(self.doaddtab, _[1], gameuid) for _ in functs], + delay=True, + ) + vbox.addWidget(methodtab) + do() + + def makegamesettings(self, vbox: QVBoxLayout, gameuid): + + functs = [ + ("启动", functools.partial(self.___tabf, self.starttab)), + ("HOOK", functools.partial(self.___tabf, self.gethooktab)), + ("语言", functools.partial(self.___tabf, self.getlangtab)), + ("文本处理", functools.partial(self.___tabf, self.gettextproc)), + ("翻译优化", functools.partial(self.___tabf, self.gettransoptimi)), + ("语音", functools.partial(self.___tabf, self.getttssetting)), + ("预翻译", functools.partial(self.___tabf, self.getpretranstab)), + ("Anki", functools.partial(self.___tabf, self.maketabforanki)), + ] + methodtab, do = makesubtab_lazy( + _TRL([_[0] for _ in functs]), + [functools.partial(self.doaddtab, _[1], gameuid) for _ in functs], + delay=True, + ) + + self.methodtab = methodtab + vbox.addWidget(methodtab) + do() + def openrefmainpage(self, key, idname, gameuid): try: os.startfile(targetmod[key].refmainpage(savehook_new_data[gameuid][idname])) except: print_exc() - def metadataorigin(self, gameuid): - formLayout = QFormLayout() - _w = QWidget() - _w.setLayout(formLayout) + def metadataorigin(self, formLayout: QFormLayout, gameuid): formLayout.addRow( _TR("首选的"), getsimplecombobox( @@ -762,16 +813,12 @@ class dialog_setting_game_internal(QWidget): key, getboxlayout(_vbox_internal), ) - return _w def doaddtab(self, wfunct, exe, layout): w = wfunct(exe) layout.addWidget(w) - def starttab(self, gameuid): - _w = QWidget() - formLayout = QFormLayout() - _w.setLayout(formLayout) + def starttab(self, formLayout: QFormLayout, gameuid): b = windows.GetBinaryType(uid2gamepath[gameuid]) @@ -811,14 +858,8 @@ class dialog_setting_game_internal(QWidget): "onloadautochangemode2", ), ) - return _w - def getstatistic(self, gameuid): - _w = QWidget() - formLayout = QVBoxLayout() - - _w.setLayout(formLayout) - formLayout.setContentsMargins(0, 0, 0, 0) + def getstatistic(self, formLayout: QVBoxLayout, gameuid): chart = chartwidget() chart.xtext = lambda x: ( "0" if x == 0 else str(datetime.fromtimestamp(x)).split(" ")[0] @@ -843,7 +884,6 @@ class dialog_setting_game_internal(QWidget): t.timeout.connect(self.refresh) t.timeout.emit() t.start() - return _w def split_range_into_days(self, times): everyday = {} @@ -911,11 +951,7 @@ class dialog_setting_game_internal(QWidget): string = "0" return string - def getlabelsetting(self, gameuid): - _w = QWidget() - formLayout = QVBoxLayout() - _w.setLayout(formLayout) - formLayout.setContentsMargins(0, 0, 0, 0) + def getlabelsetting(self, formLayout: QVBoxLayout, gameuid): self.labelflow = ScrollFlow() def newitem(text, removeable, first=False, _type=tagitem.TYPE_RAND): @@ -978,28 +1014,40 @@ class dialog_setting_game_internal(QWidget): ] ) ) - return _w - def getttssetting(self, gameuid): - _w = QWidget() - formLayout = QFormLayout() - _w.setLayout(formLayout) + def createfollowdefault( + self, dic: dict, key: str, formLayout: QFormLayout, callback=None + ) -> QFormLayout: __extraw = QWidget() + def __function(__extraw: QWidget, callback, _): + __extraw.setEnabled(not _) + if callback: + try: + callback() + except: + print_exc() + formLayout.addRow( _TR("跟随默认"), getsimpleswitch( - savehook_new_data[gameuid], - "tts_follow_default", - callback=lambda _: __extraw.setEnabled(not _), + dic, + key, + callback=functools.partial(__function, __extraw, callback), ), ) - __extraw.setEnabled(not savehook_new_data[gameuid]["tts_follow_default"]) + __extraw.setEnabled(not dic[key]) formLayout.addRow(__extraw) formLayout2 = QFormLayout() formLayout2.setContentsMargins(0, 0, 0, 0) __extraw.setLayout(formLayout2) + return formLayout2 + + def getttssetting(self, formLayout: QFormLayout, gameuid): + formLayout2 = self.createfollowdefault( + savehook_new_data[gameuid], "tts_follow_default", formLayout + ) formLayout2.addRow( _TR("语音跳过"), @@ -1042,25 +1090,8 @@ class dialog_setting_game_internal(QWidget): ), ) - return _w + def maketabforanki(self, formLayout: QFormLayout, gameuid): - def maketabforanki(self, gameuid): - _w = QWidget() - formLayout = QFormLayout() - _w.setLayout(formLayout) - __extraw = QWidget() - - formLayout.addRow( - _TR("跟随默认"), - getsimpleswitch( - savehook_new_data[gameuid], - "follow_default_ankisettings", - callback=lambda _: __extraw.setEnabled(not _), - ), - ) - __extraw.setEnabled( - not savehook_new_data[gameuid]["follow_default_ankisettings"] - ) savehook_new_data[gameuid]["anki_DeckName"] = savehook_new_data[gameuid].get( "anki_DeckName", globalconfig["ankiconnect"]["DeckName"] ) @@ -1089,10 +1120,9 @@ class dialog_setting_game_internal(QWidget): globalconfig["ankiconnect"]["simulate_key"]["2"]["keystring"], ) - formLayout.addRow(__extraw) - formLayout2 = QFormLayout() - formLayout2.setContentsMargins(0, 0, 0, 0) - __extraw.setLayout(formLayout2) + formLayout2 = self.createfollowdefault( + savehook_new_data[gameuid], "follow_default_ankisettings", formLayout + ) formLayout2.addRow( _TR("DeckName"), getlineedit( @@ -1130,12 +1160,8 @@ class dialog_setting_game_internal(QWidget): makewidget=True, ), ) - return _w - def getpretranstab(self, gameuid): - _w = QWidget() - formLayout = QFormLayout() - _w.setLayout(formLayout) + def getpretranstab(self, formLayout: QFormLayout, gameuid): def selectimg(gameuid, key, res): savehook_new_data[gameuid][key] = res @@ -1169,30 +1195,44 @@ class dialog_setting_game_internal(QWidget): True, ), ) - return _w - def gettextproc(self, gameuid): - _w = QWidget() - formLayout = QFormLayout() - _w.setLayout(formLayout) - __extra = QWidget() + def gettransoptimi(self, formLayout: QFormLayout, gameuid): - def __function(_): - __extra.setEnabled(not _) - - formLayout.addRow( - _TR("跟随默认"), - getsimpleswitch( - savehook_new_data[gameuid], - "textproc_follow_default", - callback=__function, - ), + vbox = self.createfollowdefault( + savehook_new_data[gameuid], "transoptimi_followdefault", formLayout + ) + + for item in static_data["transoptimi"]: + name = item["name"] + visname = item["visname"] + if checkpostlangmatch(name): + setting = loadpostsettingwindowmethod_private(name) + if not setting: + continue + + def __(_f, _1, gameuid): + return _f(_1, gameuid) + + vbox.addRow( + visname, + getboxlayout( + [ + getIconButton( + callback=functools.partial(__, setting, self, gameuid), + icon="fa.gear", + ), + QLabel(), + ], + makewidget=True, + margin0=True, + ), + ) + + def gettextproc(self, formLayout: QFormLayout, gameuid): + + vbox = self.createfollowdefault( + savehook_new_data[gameuid], "textproc_follow_default", formLayout ) - __extra.setEnabled(not savehook_new_data[gameuid]["textproc_follow_default"]) - vbox = QVBoxLayout() - vbox.setContentsMargins(0, 0, 0, 0) - __extra.setLayout(vbox) - formLayout.addRow(__extra) model = QStandardItemModel() model.setHorizontalHeaderLabels(_TRL(["预处理方法", "使用", "设置"])) @@ -1227,7 +1267,6 @@ class dialog_setting_game_internal(QWidget): ) vbox.addWidget(buttons) vbox.addWidget(buttons) - return _w def __privatetextproc_showmenu(self, p): r = self.__textprocinternaltable.currentIndex().row() @@ -1359,21 +1398,8 @@ class dialog_setting_game_internal(QWidget): ], ) - def getlangtab(self, gameuid): - _w = QWidget() - formLayout = QFormLayout() - _w.setLayout(formLayout) - __extraw = QWidget() + def getlangtab(self, formLayout: QFormLayout, gameuid): - formLayout.addRow( - _TR("跟随默认"), - getsimpleswitch( - savehook_new_data[gameuid], - "lang_follow_default", - callback=lambda _: __extraw.setEnabled(not _), - ), - ) - __extraw.setEnabled(not savehook_new_data[gameuid]["lang_follow_default"]) savehook_new_data[gameuid]["private_tgtlang"] = savehook_new_data[gameuid].get( "private_tgtlang", globalconfig["tgtlang3"] ) @@ -1381,10 +1407,9 @@ class dialog_setting_game_internal(QWidget): "private_srclang", globalconfig["srclang3"] ) - formLayout.addRow(__extraw) - formLayout2 = QFormLayout() - formLayout2.setContentsMargins(0, 0, 0, 0) - __extraw.setLayout(formLayout2) + formLayout2 = self.createfollowdefault( + savehook_new_data[gameuid], "lang_follow_default", formLayout + ) formLayout2.addRow( _TR("源语言"), getsimplecombobox( @@ -1401,12 +1426,9 @@ class dialog_setting_game_internal(QWidget): "private_tgtlang", ), ) - return _w - def gethooktab(self, gameuid): - _w = QWidget() - formLayout = QFormLayout() - _w.setLayout(formLayout) + def gethooktab(self, formLayout: QFormLayout, gameuid): + formLayout.addRow( _TR("特殊码"), listediterline( @@ -1420,26 +1442,6 @@ class dialog_setting_game_internal(QWidget): _TR("插入特殊码延迟(ms)"), getspinbox(0, 1000000, savehook_new_data[gameuid], "inserthooktimeout"), ) - __extraw = QWidget() - - def __function(_): - __extraw.setEnabled(not _) - try: - gobject.baseobject.textsource.setsettings() - except: - pass - - formLayout.addRow( - _TR("跟随默认"), - getsimpleswitch( - savehook_new_data[gameuid], - "hooksetting_follow_default", - callback=__function, - ), - ) - __extraw.setEnabled( - not savehook_new_data[gameuid]["hooksetting_follow_default"] - ) for k in [ "codepage_index", @@ -1453,10 +1455,13 @@ class dialog_setting_game_internal(QWidget): ]: if k not in savehook_new_data[gameuid]["hooksetting_private"]: savehook_new_data[gameuid]["hooksetting_private"][k] = globalconfig[k] - formLayout.addRow(__extraw) - formLayout2 = QFormLayout() - formLayout2.setContentsMargins(0, 0, 0, 0) - __extraw.setLayout(formLayout2) + + formLayout2 = self.createfollowdefault( + savehook_new_data[gameuid], + "hooksetting_follow_default", + formLayout, + lambda: gobject.baseobject.textsource.setsettings(), + ) formLayout2.addRow( _TR("代码页"), getsimplecombobox( @@ -1526,13 +1531,11 @@ class dialog_setting_game_internal(QWidget): ), ) - return _w - @Singleton_close class dialog_setting_game(QDialog): - def __init__(self, parent, gameuid, setindexhook=False) -> None: + def __init__(self, parent, gameuid, setindexhook=0) -> None: super().__init__(parent, Qt.WindowType.WindowCloseButtonHint) global _global_dialog_setting_game _global_dialog_setting_game = self @@ -1541,8 +1544,7 @@ class dialog_setting_game(QDialog): self.setWindowIcon(getExeIcon(uid2gamepath[gameuid], cache=True)) _ = dialog_setting_game_internal(self, gameuid) - if setindexhook: - _.methodtab.setCurrentIndex(1) + _.methodtab.setCurrentIndex(setindexhook) _.setMinimumSize(QSize(600, 500)) l = QHBoxLayout(self) self.setLayout(l) diff --git a/LunaTranslator/LunaTranslator/gui/inputdialog.py b/LunaTranslator/LunaTranslator/gui/inputdialog.py index 2440656e..9117cc3c 100644 --- a/LunaTranslator/LunaTranslator/gui/inputdialog.py +++ b/LunaTranslator/LunaTranslator/gui/inputdialog.py @@ -617,35 +617,33 @@ class postconfigdialog_(QDialog): def apply(self): rows = self.model.rowCount() - newdict = {} + self.configdict.clear() for row in range(rows): if self.model.item(row, 0).text() == "": continue - newdict[(self.model.item(row, 0).text())] = self.model.item(row, 1).text() - self.configdict[self.key] = newdict + self.configdict[(self.model.item(row, 0).text())] = self.model.item( + row, 1 + ).text() - def __init__(self, parent, configdict, title) -> None: + def __init__(self, parent, configdict, title, headers) -> None: super().__init__(parent, Qt.WindowType.WindowCloseButtonHint) - print(title) self.setWindowTitle(_TR(title)) # self.setWindowModality(Qt.ApplicationModal) self.closeevent = False formLayout = QVBoxLayout(self) # 配置layout - key = list(configdict.keys())[0] - - model = QStandardItemModel(len(configdict[key]), 1, self) + model = QStandardItemModel(len(configdict), 1, self) row = 0 - for key1 in configdict[key]: # 2 + for key1 in configdict: # 2 item = QStandardItem(key1) model.setItem(row, 0, item) - item = QStandardItem(configdict[key][key1]) + item = QStandardItem(configdict[key1]) model.setItem(row, 1, item) row += 1 - model.setHorizontalHeaderLabels(_TRL(["原文内容", "替换为"])) + model.setHorizontalHeaderLabels(_TRL(headers)) table = QTableView(self) table.setModel(model) table.setWordWrap(False) @@ -674,7 +672,6 @@ class postconfigdialog_(QDialog): button.btn3clicked.connect(self.apply) self.button = button self.model = model - self.key = key self.configdict = configdict self.closeevent = True search = QHBoxLayout() @@ -706,5 +703,5 @@ class postconfigdialog_(QDialog): self.show() -def postconfigdialog(parent, configdict, title): - postconfigdialog_(parent, configdict, title) +def postconfigdialog(parent, configdict, title, header): + postconfigdialog_(parent, configdict, title, header) diff --git a/LunaTranslator/LunaTranslator/gui/selecthook.py b/LunaTranslator/LunaTranslator/gui/selecthook.py index 1cafadf6..f3d9320b 100644 --- a/LunaTranslator/LunaTranslator/gui/selecthook.py +++ b/LunaTranslator/LunaTranslator/gui/selecthook.py @@ -677,11 +677,14 @@ class hookselect(closeashidewindow): winsharedutils.clipboard_set(copyhook) def opensolvetext(self): - gobject.baseobject.settin_ui.opensolvetextsig.emit() + try: + dialog_setting_game(self, gobject.baseobject.textsource.gameuid, 3) + except: + print_exc() def opengamesetting(self): try: - dialog_setting_game(self, gobject.baseobject.textsource.gameuid, True) + dialog_setting_game(self, gobject.baseobject.textsource.gameuid, 1) except: print_exc() diff --git a/LunaTranslator/LunaTranslator/gui/setting.py b/LunaTranslator/LunaTranslator/gui/setting.py index 856454c9..089fc113 100644 --- a/LunaTranslator/LunaTranslator/gui/setting.py +++ b/LunaTranslator/LunaTranslator/gui/setting.py @@ -67,14 +67,12 @@ class Setting(closeashidewindow): voicelistsignal = pyqtSignal(list, int) versiontextsignal = pyqtSignal(str) progresssignal = pyqtSignal(str, int) - opensolvetextsig = pyqtSignal() showandsolvesig = pyqtSignal(str) def __init__(self, parent): super(Setting, self).__init__(parent, globalconfig["setting_geo_2"]) self.setWindowIcon(qtawesome.icon("fa.gear")) - - self.opensolvetextsig.connect(self.opensolvetextfun) + self.showandsolvesig.connect(functools.partial(delaysetcomparetext, self)) self.voicelistsignal.connect(functools.partial(showvoicelist, self)) self.versiontextsignal.connect( @@ -142,7 +140,3 @@ class Setting(closeashidewindow): self.tab_widget.splitter.setStretchFactor(0, 0) self.tab_widget.splitter.setStretchFactor(1, 1) self.tab_widget.splitter.setSizes([width, self.tab_widget.width() - width]) - - def opensolvetextfun(self): - self.show() - self.tab_widget.setCurrentIndex(3) diff --git a/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py b/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py index e61e204c..181d5bf6 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py +++ b/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py @@ -137,8 +137,9 @@ def getocrgrid(self): callback=functools.partial( postconfigdialog, self, - ocrerrorfix["args"], + ocrerrorfix["args"]["替换内容"], "易错内容修正", + ["原文内容", "替换为"], ), icon="fa.gear", ), diff --git a/LunaTranslator/LunaTranslator/gui/setting_transopti.py b/LunaTranslator/LunaTranslator/gui/setting_transopti.py index ad966bcc..5edb590f 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_transopti.py +++ b/LunaTranslator/LunaTranslator/gui/setting_transopti.py @@ -13,7 +13,7 @@ from myutils.config import ( _TRL, ) from gui.codeacceptdialog import codeacceptdialog -from gui.usefulwidget import ( +from gui.usefulwidget import ( D_getIconButton, getIconButton, D_getsimpleswitch, @@ -42,9 +42,9 @@ def getcomparelayout(self): layout = QHBoxLayout() fromtext = QPlainTextEdit() totext = QPlainTextEdit() - solvebutton = getIconButton( + solvebutton = getIconButton( callback=lambda: totext.setPlainText(POSTSOLVE(fromtext.toPlainText())), - icon="fa.chevron-right", + icon="fa.chevron-right", ) layout.addWidget(fromtext) @@ -97,16 +97,16 @@ def setTab7_lazy(self, basel): for i, post in enumerate(sortlist): if post == "_11": - config = D_getIconButton( + config = D_getIconButton( callback=lambda: selectdebugfile("./userconfig/mypost.py"), - icon="fa.gear", + icon="fa.gear", ) else: if post not in postprocessconfig: continue if post == "_remove_chaos": - config = D_getIconButton( - icon="fa.gear", + config = D_getIconButton( + icon="fa.gear", callback=lambda: codeacceptdialog(self), ) elif "args" in postprocessconfig[post]: @@ -114,8 +114,9 @@ def setTab7_lazy(self, basel): callback = functools.partial( postconfigdialog, self, - postprocessconfig[post]["args"], + postprocessconfig[post]["args"]['替换内容'], postprocessconfig[post]["name"], + ["原文内容", "替换为"] ) else: items = autoinitdialog_items(postprocessconfig[post]) @@ -126,20 +127,20 @@ def setTab7_lazy(self, basel): 600, items, ) - config = D_getIconButton( + config = D_getIconButton( callback=callback, - icon="fa.gear", + icon="fa.gear", ) else: config = "" - button_up = D_getIconButton( + button_up = D_getIconButton( callback=functools.partial(changerank, post, True), - icon="fa.arrow-up", + icon="fa.arrow-up", ) - button_down = D_getIconButton( + button_down = D_getIconButton( callback=functools.partial(changerank, post, False), - icon="fa.arrow-down", + icon="fa.arrow-down", ) l = [ @@ -165,9 +166,9 @@ def setTab7_lazy(self, basel): if setting: grids2[-1].append( - D_getIconButton( + D_getIconButton( callback=functools.partial(__, setting, self), - icon="fa.gear", + icon="fa.gear", ) ) grids2 += [[("", 12)]] diff --git a/LunaTranslator/LunaTranslator/myutils/config.py b/LunaTranslator/LunaTranslator/myutils/config.py index d998dd6e..fbc507e2 100644 --- a/LunaTranslator/LunaTranslator/myutils/config.py +++ b/LunaTranslator/LunaTranslator/myutils/config.py @@ -135,6 +135,7 @@ def getdefaultsavehook(title=None): "tts_repair": False, "tts_repair_regex": [{"regex": True, "key": "(.*?)「", "value": ""}], "tts_skip": False, + "transoptimi_followdefault": True, "tts_skip_regex": [], # "hooktypeasname": {}, "use_saved_text_process": False, @@ -152,6 +153,7 @@ def getdefaultsavehook(title=None): "istitlesetted": False, "currentvisimage": None, "currentmainimage": "", + "noundictconfig": [], # 元数据 "namemap": {}, # 人名翻译映射,vndb独占,用于优化翻译 # diff --git a/LunaTranslator/LunaTranslator/myutils/utils.py b/LunaTranslator/LunaTranslator/myutils/utils.py index faeed71e..fe6696d7 100644 --- a/LunaTranslator/LunaTranslator/myutils/utils.py +++ b/LunaTranslator/LunaTranslator/myutils/utils.py @@ -1,7 +1,7 @@ import windows import os, time import codecs, hashlib, shutil -import socket, gobject, uuid, subprocess +import socket, gobject, uuid, subprocess, functools import ctypes, importlib import ctypes.wintypes from qtsymbols import * @@ -533,7 +533,7 @@ def checkpostusing(name): return use and checkpostlangmatch(name) -def loadpostsettingwindowmethod(name): +def loadpostsettingwindowmethod_1(xx, name): checkpath = "./LunaTranslator/transoptimi/" + name + ".py" if os.path.exists(checkpath) == False: return None @@ -541,11 +541,20 @@ def loadpostsettingwindowmethod(name): try: Process = importlib.import_module(mm).Process - return tryprint(Process.get_setting_window) + if xx: + return tryprint(Process.get_setting_window) + else: + return tryprint(Process.get_setting_window_gameprivate) except: return None +loadpostsettingwindowmethod = functools.partial(loadpostsettingwindowmethod_1, True) +loadpostsettingwindowmethod_private = functools.partial( + loadpostsettingwindowmethod_1, False +) + + class unsupportkey(Exception): pass diff --git a/LunaTranslator/LunaTranslator/transoptimi/noundict.py b/LunaTranslator/LunaTranslator/transoptimi/noundict.py index 0f374bda..6755ab8b 100644 --- a/LunaTranslator/LunaTranslator/transoptimi/noundict.py +++ b/LunaTranslator/LunaTranslator/transoptimi/noundict.py @@ -1,12 +1,7 @@ -from myutils.config import noundictconfig +from myutils.config import noundictconfig, savehook_new_data, _TR, _TRL import gobject, re, functools from qtsymbols import * from traceback import print_exc -from myutils.config import ( - noundictconfig, - _TR, - _TRL, -) import gobject from gui.usefulwidget import getQMessageBox, threebuttons from myutils.wrapper import Singleton_close @@ -50,21 +45,20 @@ class noundictconfigdialog(QDialog): def apply(self): rows = self.model.rowCount() - newdict = {} + self.configdict.clear() for row in range(rows): if self.model.item(row, 1).text() == "": continue - if self.model.item(row, 1).text() not in newdict: - newdict[self.model.item(row, 1).text()] = [ + if self.model.item(row, 1).text() not in self.configdict: + self.configdict[self.model.item(row, 1).text()] = [ self.model.item(row, 0).text(), self.model.item(row, 2).text(), ] else: - newdict[self.model.item(row, 1).text()] += [ + self.configdict[self.model.item(row, 1).text()] += [ self.model.item(row, 0).text(), self.model.item(row, 2).text(), ] - self.configdict["dict"] = newdict def __init__( self, parent, configdict, title, label=["游戏ID MD5", "原文", "翻译"], _=None @@ -76,18 +70,18 @@ class noundictconfigdialog(QDialog): formLayout = QVBoxLayout(self) # 配置layout - model = QStandardItemModel(len(list(configdict["dict"].keys())), 1, self) + model = QStandardItemModel(len(configdict), 1, self) row = 0 - for key in configdict["dict"]: # 2 - if type(configdict["dict"][key]) == str: - configdict["dict"][key] = ["0", configdict["dict"][key]] + for key in configdict: # 2 + if type(configdict[key]) == str: + configdict[key] = ["0", configdict[key]] - for i in range(len(configdict["dict"][key]) // 2): - item = QStandardItem(configdict["dict"][key][i * 2]) + for i in range(len(configdict[key]) // 2): + item = QStandardItem(configdict[key][i * 2]) model.setItem(row, 0, item) item = QStandardItem(key) model.setItem(row, 1, item) - item = QStandardItem(configdict["dict"][key][1 + i * 2]) + item = QStandardItem(configdict[key][1 + i * 2]) model.setItem(row, 2, item) row += 1 model.setHorizontalHeaderLabels(_TRL(label)) @@ -132,9 +126,7 @@ class noundictconfigdialog(QDialog): button.btn4clicked.connect(functools.partial(self.moverank, table, 1)) button.btn5clicked.connect(self.apply) - button2 = threebuttons( - texts=["设置所有词条为全局词条", "以当前md5复制选中行"] - ) + button2 = threebuttons(texts=["设置所有词条为全局词条", "以当前md5复制选中行"]) def clicked5(): rows = model.rowCount() @@ -217,42 +209,235 @@ class noundictconfigdialog(QDialog): ) +@Singleton_close +class noundictconfigdialog_private(QDialog): + def closeEvent(self, a0: QCloseEvent) -> None: + self.button.setFocus() + self.apply() + + def showmenu(self, table: QTableView, pos): + r = table.currentIndex().row() + if r < 0: + return + menu = QMenu(table) + up = QAction(_TR("上移")) + down = QAction(_TR("下移")) + menu.addAction(up) + menu.addAction(down) + action = menu.exec(table.cursor().pos()) + + if action == up: + + self.moverank(table, -1) + + elif action == down: + self.moverank(table, 1) + + def moverank(self, table: QTableView, dy): + curr = table.currentIndex() + target = (curr.row() + dy) % table.model().rowCount() + texts = [ + table.model().item(curr.row(), i).text() + for i in range(table.model().columnCount()) + ] + + table.model().removeRow(curr.row()) + table.model().insertRow(target, [QStandardItem(text) for text in texts]) + table.setCurrentIndex(table.model().index(target, curr.column())) + + def apply(self): + rows = self.model.rowCount() + self.configdict.clear() + _dedump = set() + for row in range(rows): + k, v = self.model.item(row, 0).text(), self.model.item(row, 1).text() + if k == "": + continue + if k in _dedump: + continue + self.configdict.append([k, v]) + _dedump.add(k) + + def __init__( + self, parent, configdict, title, label=["原文", "翻译"], _=None + ) -> None: + super().__init__(parent, Qt.WindowType.WindowCloseButtonHint) + + self.setWindowTitle(_TR(title)) + # self.setWindowModality(Qt.ApplicationModal) + + formLayout = QVBoxLayout(self) # 配置layout + + model = QStandardItemModel(len(configdict), 1, self) + row = 0 + for key in configdict: # 2 + item = QStandardItem(key[0]) + model.setItem(row, 0, item) + item = QStandardItem(key[1]) + model.setItem(row, 1, item) + row += 1 + model.setHorizontalHeaderLabels(_TRL(label)) + table = QTableView(self) + table.setModel(model) + table.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch) + table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) + table.customContextMenuRequested.connect( + functools.partial(self.showmenu, table) + ) + button = threebuttons(texts=["添加行", "删除行", "上移", "下移", "立即应用"]) + self.table = table + + def clicked1(): + + model.insertRow(0, [QStandardItem(), QStandardItem()]) + + button.btn1clicked.connect(clicked1) + + def clicked2(): + + skip = [] + for index in self.table.selectedIndexes(): + if index.row() in skip: + continue + skip.append(index.row()) + skip = reversed(sorted(skip)) + + for row in skip: + model.removeRow(row) + + button.btn2clicked.connect(clicked2) + button.btn3clicked.connect(functools.partial(self.moverank, table, -1)) + button.btn4clicked.connect(functools.partial(self.moverank, table, 1)) + + button.btn5clicked.connect(self.apply) + + search = QHBoxLayout() + searchcontent = QLineEdit() + search.addWidget(searchcontent) + button4 = QPushButton() + button4.setText(_TR("搜索")) + + def clicked4(): + text = searchcontent.text() + + rows = model.rowCount() + cols = model.columnCount() + for row in range(rows): + ishide = True + for c in range(cols): + if text in model.item(row, c).text(): + ishide = False + break + table.setRowHidden(row, ishide) + + button4.clicked.connect(clicked4) + search.addWidget(button4) + + formLayout.addWidget(table) + formLayout.addLayout(search) + formLayout.addWidget(button) + self.button = button + self.model = model + self.configdict = configdict + self.resize(QSize(600, 400)) + self.show() + + def copysetmd5(self): + if len(self.table.selectedIndexes()) == 0: + return + row = self.table.selectedIndexes()[0].row() + skip = [] + for index in self.table.selectedIndexes(): + if index.row() in skip: + continue + skip.append(index.row()) + self.model.insertRow( + row, + [ + QStandardItem(self.model.item(index.row(), 1).text()), + QStandardItem(self.model.item(index.row(), 2).text()), + ], + ) + + class Process: + + @staticmethod + def get_setting_window_gameprivate(parent_window, gameuid): + return ( + noundictconfigdialog_private( + parent_window, + savehook_new_data[gameuid]["noundictconfig"], + "专有名词翻译设置", + ), + ) + @staticmethod def get_setting_window(parent_window): return ( noundictconfigdialog( - parent_window, noundictconfig, "专有名词翻译设置(游戏ID 0表示全局)" + parent_window, + noundictconfig["dict"], + "专有名词翻译设置_游戏ID 0表示全局", ), ) - def process_before(self, content): - ___idx = 1 - mp1 = {} - for key in noundictconfig["dict"]: - v = None - if type(noundictconfig["dict"][key]) == str: - v = noundictconfig["dict"][mp1[key]] - else: - for i in range(len(noundictconfig["dict"][key]) // 2): - if noundictconfig["dict"][key][i * 2] in [ - "0", - gobject.baseobject.currentmd5, - ]: - v = noundictconfig["dict"][key][i * 2 + 1] - break + def usewhich(self) -> dict: + for _ in (0,): + try: + if not gobject.baseobject.textsource: + break + gameuid = gobject.baseobject.textsource.gameuid + if savehook_new_data[gameuid]["transoptimi_followdefault"]: + break + return 0, savehook_new_data[gameuid]["noundictconfig"] - if v is not None and key in content: - if ___idx == 1: - xx = "ZX{}Z".format(chr(ord("B") + gobject.baseobject.zhanweifu)) - elif ___idx == 2: - xx = "{{{}}}".format(gobject.baseobject.zhanweifu) - elif ___idx == 3: - xx = v - content = content.replace(key, xx) + except: + print_exc() + break + return 1, noundictconfig["dict"] + + def process_before(self, content): + def __createfake(): + + ___idx = 1 + if ___idx == 1: + xx = "ZX{}Z".format(chr(ord("B") + gobject.baseobject.zhanweifu)) + elif ___idx == 2: + xx = "{{{}}}".format(gobject.baseobject.zhanweifu) + elif ___idx == 3: + xx = v + gobject.baseobject.zhanweifu += 1 + return xx + + mp1 = {} + _type, dic = self.usewhich() + if _type == 1: + for key in dic: + v = None + if type(dic[key]) == str: + v = dic[mp1[key]] + else: + for i in range(len(dic[key]) // 2): + if dic[key][i * 2] in [ + "0", + gobject.baseobject.currentmd5, + ]: + v = dic[key][i * 2 + 1] + break + + if v is not None and key in content: + xx = __createfake() + content = content.replace(key, xx) + mp1[xx] = v + return content, mp1 + elif _type == 0: + for k, v in dic: + + xx = __createfake() + content = content.replace(k, xx) mp1[xx] = v - gobject.baseobject.zhanweifu += 1 - return content, mp1 + return content, mp1 def process_after(self, res, mp1): for key in mp1: diff --git a/LunaTranslator/LunaTranslator/transoptimi/vndbnamemap.py b/LunaTranslator/LunaTranslator/transoptimi/vndbnamemap.py index 71098467..bff6b7e0 100644 --- a/LunaTranslator/LunaTranslator/transoptimi/vndbnamemap.py +++ b/LunaTranslator/LunaTranslator/transoptimi/vndbnamemap.py @@ -1,13 +1,51 @@ -from myutils.config import savehook_new_data +from myutils.config import savehook_new_data, globalconfig import gobject +from traceback import print_exc +from gui.inputdialog import postconfigdialog_ class Process: + @staticmethod + def get_setting_window(parent_window): + return ( + postconfigdialog_( + parent_window, + globalconfig["global_namemap"], + "指定人名翻译", + ["人名", "翻译"], + ), + ) + + @staticmethod + def get_setting_window_gameprivate(parent_window, gameuid): + return ( + postconfigdialog_( + parent_window, + savehook_new_data[gameuid]["namemap"], + "指定人名翻译", + ["人名", "翻译"], + ), + ) + + def usewhich(self) -> dict: + for _ in (0,): + try: + if not gobject.baseobject.textsource: + break + gameuid = gobject.baseobject.textsource.gameuid + if savehook_new_data[gameuid]["transoptimi_followdefault"]: + break + return savehook_new_data[gameuid]["namemap"] + + except: + print_exc() + break + return globalconfig["global_namemap"] + def process_before(self, s): - gameuid = gobject.baseobject.textsource.gameuid - namemap = savehook_new_data[gameuid]["namemap"] + namemap = self.usewhich() bettermap = {} for k, v in namemap.items(): for sp in ["・", " "]: diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index 5c698c4e..478b670c 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -506,6 +506,7 @@ 1200, 600 ], + "global_namemap":{}, "settingfontsize": 12, "filter_chaos_code": false, "accept_encoding": [ diff --git a/LunaTranslator/files/defaultconfig/static_data.json b/LunaTranslator/files/defaultconfig/static_data.json index aa6d8164..a322e8b3 100644 --- a/LunaTranslator/files/defaultconfig/static_data.json +++ b/LunaTranslator/files/defaultconfig/static_data.json @@ -1705,26 +1705,25 @@ "Magpie_External" ], "transoptimi": [ + { + "name": "vndbnamemap", + "visname": "指定人名翻译" + }, { "name": "noundict", - "visname": "使用专有名词翻译" + "visname": "专有名词翻译" }, { "name": "transerrorfix", - "visname": "使用翻译结果修正" + "visname": "翻译结果修正" }, { "name": "gongxiangcishu", - "visname": "使用VNR共享辞书" - }, - { - "name": "vndbnamemap", - "visname": "使用VNDB数据替换人名", - "languageuse": "en" + "visname": "VNR共享辞书" }, { "name": "myprocess", - "visname": "使用自定义优化" + "visname": "自定义优化" }, { "name": "arabic_reshaper", diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index 2d13b475..d3643ed8 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -70,7 +70,6 @@ "中文": "الصينية .", "注册网址2": "رابط التسجيل", "绘制光标": "رسم المؤشر", - "专有名词翻译设置(游戏ID 0表示全局)": "اسم ترجمة إعدادات ( لعبة رقم 0 يمثل العالم )", "記号": "علامة", "问题反馈": "مشكلة التغذية المرتدة", "系统未安装": "النظام غير مثبت", @@ -236,7 +235,6 @@ "ついなちゃん": "ぼゃゃん", "项目网站": "موقع المشروع", "本地OCR": "التعرف الضوئي على الحروف المحلية", - "使用专有名词翻译": "استخدام الأسماء الصحيحة في الترجمة", "说明": "إيضاحات", "简体中文(CP936,GBK)": "الصينية المبسطة ( cp936 GBK )", "资源下载": "تحميل الموارد", @@ -414,7 +412,6 @@ "搜索结果数上限": "نتائج البحث عن الحد الأعلى", "指示詞": "إشارة عشوائية", "导出的第一翻译源": "أول مصدر الترجمة", - "使用VNR共享辞书": "vnr قاموس مشترك", "使用最快翻译而非指定翻译器": "استخدام أسرع مترجم بدلا من تحديد مترجم", "搜索": "بحث .", "不透明度": "التعتيم", @@ -436,7 +433,6 @@ "过滤HTML标签": "تصفية العلامات أتش تي أم أل", "调整游戏窗口按钮": "ضبط زر نافذة اللعبة", "语音设置": "إعدادات الصوت", - "使用翻译结果修正": "تصحيح نتائج الترجمة", "警告": "حذر", "拉丁(CP1252)": "اللاتينية ( CP1252 )", "当前MD5": "MD5 الحالي", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "إظهار / إخفاء التاريخ", "全屏/恢复游戏窗口": "كامل الشاشة / استعادة نافذة اللعبة", "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "لا تحميل نموذج التعرف الضوئي على الحروف في هذه اللغة ، يرجى [ إعدادات أخرى ] - > [ تحميل الموارد ] - > [ التعرف الضوئي على الحروف حزمة اللغة ] تحميل نموذج استخراج الملفات / التعرف الضوئي على الحروف الطريق بعد استخدام", - "使用VNDB数据替换人名": "استبدال اسم الشخص مع بيانات فندب", "文本输出": "النص الناتج", "自动输出提取的文本": "التلقائي استخراج النص الناتج", "缩放": "تحجيم", @@ -653,7 +648,6 @@ "左移": "تحول اليسار", "右移": "حق التحول", "启动游戏不修改顺序": "بدء اللعبة دون تعديل النظام", - "使用自定义优化": "استخدام التخصيص الأمثل", "游戏管理": "إدارة الألعاب", "显示标题": "عرض العنوان", "收藏": "جمع", @@ -815,5 +809,12 @@ "延申": "تمديد", "进入时才显示": "عرض فقط عند الدخول", "语音跳过": "صوت تخطي", - "条件": "شرط ." + "条件": "شرط .", + "指定人名翻译": "تعيين اسم المترجم", + "专有名词翻译": "ترجمة الأسماء الصحيحة", + "VNR共享辞书": "vnr قاموس مشترك", + "自定义优化": "عرف التحسين", + "人名": "اسم الشخص", + "游戏ID 0表示全局": "معرف اللعبة 0", + "游戏数据": "بيانات اللعبة" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index a8531a6c..95712a40 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "簡單取代內容(若取代為空則直接過濾)", "使用正则表达式替换": "使用正則表達式取代", "自定义python处理": "自訂 Python 處理", - "使用专有名词翻译": "使用專有名詞翻譯", - "使用翻译结果修正": "使用翻譯結果修正", - "使用VNR共享辞书": "使用 VNR 共享辭書", "辞书设置": "辭書設定", "小学馆辞书": "小學館辭書", "快捷键设置": "快速鍵設定", @@ -148,7 +145,6 @@ "sqlite文件": "SQLite 檔案", "替换为": "取代為", "去除重复字符(若为1则自动分析去重)": "去除重複字元(若為 1 則自動分析去除重複)", - "专有名词翻译设置(游戏ID 0表示全局)": "專有名詞翻譯設定(遊戲 ID 0 表示全域)", "密钥": "金鑰", "記号": "記號", "选择文件": "選擇檔案", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "顯示 / 隱藏歷史翻譯", "全屏/恢复游戏窗口": "全螢幕 / 復原遊戲視窗", "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "未下載該語言的 OCR 模型,請在[其他設定]->[資源下載]->[OCR語言包]下載模型解壓到 files/ocr 路徑後使用", - "使用VNDB数据替换人名": "使用 VNDB 資料取代人名", "文本输出": "文字輸出", "自动输出提取的文本": "自動輸出提取的文字", "缩放": "縮放", @@ -653,7 +648,6 @@ "左移": "左移", "右移": "右移", "启动游戏不修改顺序": "啟動遊戲不修改順序", - "使用自定义优化": "使用自訂優化", "游戏管理": "遊戲管理", "显示标题": "顯示標題", "收藏": "收藏", @@ -815,5 +809,12 @@ "延申": "延申", "进入时才显示": "進入時才顯示", "语音跳过": "語音跳過", - "条件": "條件" + "条件": "條件", + "指定人名翻译": "指定人名翻譯", + "专有名词翻译": "專有名詞翻譯", + "VNR共享辞书": "VNR共亯辭書", + "自定义优化": "自定義優化", + "人名": "人名", + "游戏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 5a1e97d8..4507e557 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -19,9 +19,7 @@ "居中显示": "Center Display", "百度api": "Baidu API", "预翻译": "Pre-translation", - "专有名词翻译设置(游戏ID 0表示全局)": "Proper Noun Translation Settings (Game ID 0 means global)", "密钥": "Secret Key", - "使用VNR共享辞书": "Use VNR Shared Dictionary", "显示复制原文按钮": "Show Copy Original Button", "快捷键设置": "Hotkey Settings", "设置": "Settings", @@ -114,10 +112,8 @@ "打开保存的游戏": "Open Saved Game", "离线翻译": "Offline Translation", "添加行": "Add Row", - "使用翻译结果修正": "Use Translation Result Correction", "彩云": "Caiyun", "游戏ID MD5": "Game ID MD5", - "使用专有名词翻译": "Manual Translation for Proper Nouns Correction", "灵格斯": "Lingoes", "备注": "Note", "路径": "Path", @@ -631,7 +627,6 @@ "显示/隐藏历史翻译": "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.", - "使用VNDB数据替换人名": "Replace Names Using Data From VNDB", "文本输出": "Text Output", "自动输出提取的文本": "Automatically Output Extracted Text", "缩放": "Scale", @@ -652,7 +647,6 @@ "左移": "Move Left", "右移": "Move Right", "启动游戏不修改顺序": "Start Game Without Changing Order", - "使用自定义优化": "Use Custom Optimization", "游戏管理": "Game Management", "显示标题": "Show Title", "收藏": "Favourites", @@ -815,5 +809,12 @@ "延申": "Extension", "进入时才显示": "Displayed only upon entry", "语音跳过": "Voice skipping", - "条件": "condition" + "条件": "condition", + "指定人名翻译": "Designated Name Translation", + "专有名词翻译": "Translation of proprietary terms", + "VNR共享辞书": "VNR Shared Lexicon", + "自定义优化": "Custom optimization", + "人名": "name", + "游戏ID 0表示全局": "Game ID 0 represents global", + "游戏数据": "Game data" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index 199cc150..c5a0da70 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "Contenido de reemplazo simple (si se reemplaza por vacío, se filtra directamente)", "使用正则表达式替换": "Reemplazar con expresiones regulares", "自定义python处理": "Procesamiento personalizado de Python", - "使用专有名词翻译": "Traducción con términos propios", - "使用翻译结果修正": "Corrección con resultados de traducción", - "使用VNR共享辞书": "Uso de vnr para compartir diccionarios", "辞书设置": "Configuración del diccionario", "小学馆辞书": "Diccionario de la escuela primaria", "快捷键设置": "Configuración de atajos", @@ -148,7 +145,6 @@ "sqlite文件": "Archivo qlite", "替换为": "Sustituir por", "去除重复字符(若为1则自动分析去重)": "Eliminar caracteres duplicados (si es 1, se analiza automáticamente para eliminar el peso)", - "专有名词翻译设置(游戏ID 0表示全局)": "Configuración de traducción de términos propios (el ID del juego 0 significa global)", "密钥": "Clave", "記号": "Marca", "选择文件": "Seleccionar archivo", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "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]", - "使用VNDB数据替换人名": "Reemplazar nombres con datos vndb", "文本输出": "Salida de texto", "自动输出提取的文本": "Salida automática del Texto extraído", "缩放": "Zoom", @@ -653,7 +648,6 @@ "左移": "Desplazamiento a la izquierda", "右移": "A la derecha", "启动游戏不修改顺序": "Iniciar el juego sin modificar el orden", - "使用自定义优化": "Usar optimizaciones personalizadas", "游戏管理": "Gestión de juegos", "显示标题": "Mostrar título", "收藏": "Colección", @@ -815,5 +809,12 @@ "延申": "Extensión", "进入时才显示": "Se muestra al entrar", "语音跳过": "Salto de voz", - "条件": "Condiciones" + "条件": "Condiciones", + "指定人名翻译": "Traducción de nombre designado", + "专有名词翻译": "Traducción de términos propios", + "VNR共享辞书": "Diccionario compartido vnr", + "自定义优化": "Optimización personalizada", + "人名": "Nombre", + "游戏ID 0表示全局": "El ID del juego 0 Indica global", + "游戏数据": "Datos del juego" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index df09ba1e..88657f68 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "Remplacement simple du contenu (filtre Direct si le remplacement est vide)", "使用正则表达式替换": "Remplacer par une expression régulière", "自定义python处理": "Personnalisation du traitement Python", - "使用专有名词翻译": "Traduction avec des noms propres", - "使用翻译结果修正": "Utiliser les résultats de la traduction pour corriger", - "使用VNR共享辞书": "Partager un dictionnaire avec VNR", "辞书设置": "Configuration du dictionnaire", "小学馆辞书": "Dictionnaire de l'école primaire", "快捷键设置": "Paramètres des raccourcis clavier", @@ -148,7 +145,6 @@ "sqlite文件": "Fichiers SQLite", "替换为": "Remplacer par:", "去除重复字符(若为1则自动分析去重)": "Supprimer les caractères dupliqués (analyser automatiquement si 1)", - "专有名词翻译设置(游戏ID 0表示全局)": "Paramètres de traduction de noms propres (id de jeu 0 pour global)", "密钥": "Clé secrète", "記号": "Marque", "选择文件": "Sélectionner un fichier", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "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", - "使用VNDB数据替换人名": "Remplacement des noms de personnes par des données vndb", "文本输出": "Sortie de texte", "自动输出提取的文本": "Sortie automatique du texte extrait", "缩放": "Zoom", @@ -653,7 +648,6 @@ "左移": "Déplacement à gauche", "右移": "Déplacement à droite", "启动游戏不修改顺序": "Lancer le jeu sans modifier l'ordre", - "使用自定义优化": "Utiliser l'optimisation personnalisée", "游戏管理": "Gestion des jeux", "显示标题": "Afficher le titre", "收藏": "Collections", @@ -815,5 +809,12 @@ "延申": "Yanshin", "进入时才显示": "Ne s'affiche qu'à l'entrée", "语音跳过": "Voix skip", - "条件": "Conditions" + "条件": "Conditions", + "指定人名翻译": "Nom de la personne désignée traduction", + "专有名词翻译": "Traduction de noms propres", + "VNR共享辞书": "VNR partager discours", + "自定义优化": "Optimisation personnalisée", + "人名": "Nom de la personne", + "游戏ID 0表示全局": "Game ID 0 pour global", + "游戏数据": "Données du jeu" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index c472d1ef..5ef39b5e 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -112,9 +112,6 @@ "简单替换内容(若替换为空则直接过滤)": "Basta sostituire il contenuto (se la sostituzione è vuota, filtrarlo direttamente)", "使用正则表达式替换": "Sostituisci con espressioni regolari", "自定义python处理": "Elaborazione Python personalizzata", - "使用专有名词翻译": "Traduci con sostantivo proprio", - "使用翻译结果修正": "Correzione utilizzando i risultati della traduzione", - "使用VNR共享辞书": "Utilizzo di VNR per condividere dizionari", "辞书设置": "Impostazioni del dizionario", "小学馆辞书": "Dizionario della biblioteca della scuola elementare", "快捷键设置": "Impostazioni dei tasti di scelta rapida", @@ -142,7 +139,6 @@ "sqlite文件": "File Sqlite", "替换为": "Sostituisci con", "去除重复字符(若为1则自动分析去重)": "Rimuovere i caratteri duplicati (se è 1, analizzare e rimuovere automaticamente i duplicati)", - "专有名词翻译设置(游戏ID 0表示全局)": "Impostazioni di traduzione del sostantivo appropriato (ID gioco 0 significa globale)", "密钥": "chiave segreta", "記号": "Simbolo", "选择文件": "Seleziona file", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "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", - "使用VNDB数据替换人名": "Sostituisci i nomi delle persone con dati VNDB", "文本输出": "Output testo", "自动输出提取的文本": "Estrai automaticamente il testo estratto", "缩放": "zoom", @@ -653,7 +648,6 @@ "左移": "Spostamento sinistro", "右移": "Spostamento destro", "启动游戏不修改顺序": "Inizia il gioco senza cambiare l'ordine", - "使用自定义优化": "Usa ottimizzazione personalizzata", "游戏管理": "Gestione giochi", "显示标题": "mostra intestazione", "收藏": "raccolta", @@ -815,5 +809,12 @@ "延申": "Estensione", "进入时才显示": "Visualizzato solo all'entrata", "语音跳过": "Salto vocale", - "条件": "condizione" + "条件": "condizione", + "指定人名翻译": "Traduzione del nome designato", + "专有名词翻译": "Traduzione di termini proprietari", + "VNR共享辞书": "Lexicon condiviso VNR", + "自定义优化": "Ottimizzazione personalizzata", + "人名": "nome", + "游戏ID 0表示全局": "L'ID del gioco 0 rappresenta globale", + "游戏数据": "Dati di gioco" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index f1fd7bbf..d3ea6780 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "単純置換(空に置換する場合は直接フィルタ)", "使用正则表达式替换": "正規表現で置換", "自定义python处理": "カスタムpython処理", - "使用专有名词翻译": "固有名詞翻訳の使用", - "使用翻译结果修正": "翻訳結果修正の使用", - "使用VNR共享辞书": "VNRを使用した辞書の共有", "辞书设置": "辞書の設定", "小学馆辞书": "小学館の辞書", "快捷键设置": "ショートカット設定", @@ -148,7 +145,6 @@ "sqlite文件": "sqliteファイル", "替换为": "置換後", "去除重复字符(若为1则自动分析去重)": "重複した文字を除去する(1の場合は自動解析で重複除外)", - "专有名词翻译设置(游戏ID 0表示全局)": "固有名詞翻訳設定(ゲームID 0はグローバルを表す)", "密钥": "キー", "記号": "記号", "选择文件": "ファイルを選択", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "履歴翻訳の表示/非表示", "全屏/恢复游戏窗口": "フルスクリーン/リカバリゲームウィンドウ", "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "この言語のOCRモデルはダウンロードされていません。[その他の設定]->[リソースダウンロード]->[OCR言語パック]ダウンロードモデルをfiles/ocrパスに解凍した後に使用してください", - "使用VNDB数据替换人名": "VNDBデータを使用した人名の置換", "文本输出": "テキスト出力", "自动输出提取的文本": "抽出されたテキストを自動的に出力", "缩放": "ズーム", @@ -653,7 +648,6 @@ "左移": "左へ移動", "右移": "右へ移動", "启动游戏不修改顺序": "ゲームを起動しても順序は変更されません", - "使用自定义优化": "カスタム最適化の使用", "游戏管理": "ゲーム管理", "显示标题": "タイトルを表示", "收藏": "コレクション", @@ -815,5 +809,12 @@ "延申": "に言及", "进入时才显示": "入力時に表示", "语音跳过": "音声スキップ", - "条件": "条件#ジョウケン#" + "条件": "条件#ジョウケン#", + "指定人名翻译": "指定人名翻訳", + "专有名词翻译": "固有名詞の翻訳", + "VNR共享辞书": "VNR共有辞書", + "自定义优化": "カスタム最適化", + "人名": "人名", + "游戏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 1a397c19..73f7ca4e 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "단순 바꿀 내용 (비어 있으면 직접 필터링)", "使用正则表达式替换": "정규 표현식으로 바꾸기", "自定义python处理": "사용자 정의 python 처리", - "使用专有名词翻译": "고유 명사를 사용하여 번역하다.", - "使用翻译结果修正": "번역 결과를 사용하여 수정", - "使用VNR共享辞书": "VNR을 사용하여 사서 공유", "辞书设置": "사서 설정", "小学馆辞书": "소학관 사서", "快捷键设置": "단축키 설정", @@ -148,7 +145,6 @@ "sqlite文件": "sqlite 파일", "替换为": "다음으로 대체", "去除重复字符(若为1则自动分析去重)": "중복 문자 제거 (1인 경우 자동으로 분석 중복 제거)", - "专有名词翻译设置(游戏ID 0表示全局)": "고유 명사 번역 설정(게임 ID 0은 전역을 나타냄)", "密钥": "키", "記号": "기호", "选择文件": "파일 선택", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "히스토리 번역 표시 / 숨기기", "全屏/恢复游戏窗口": "전체 화면 / 게임 창 복원", "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "이 언어의 OCR 모델을 다운로드하지 않았습니다. [기타 설정] -> [에셋 다운로드] -> [OCR 언어 팩] 모델을 다운로드하여 files/ocr 경로로 압축을 푼 후 사용하십시오.", - "使用VNDB数据替换人名": "VNDB 데이터로 사람 이름 바꾸기", "文本输出": "텍스트 출력", "自动输出提取的文本": "추출된 텍스트 자동 내보내기", "缩放": "줌", @@ -653,7 +648,6 @@ "左移": "왼쪽 이동", "右移": "오른쪽 이동", "启动游戏不修改顺序": "게임을 시작하면 순서를 수정하지 않습니다.", - "使用自定义优化": "사용자 정의 최적화 사용", "游戏管理": "게임 관리", "显示标题": "제목 표시", "收藏": "모음집", @@ -815,5 +809,12 @@ "延申": "연장", "进入时才显示": "들어갈 때만 표시", "语音跳过": "음성 건너뛰기", - "条件": "조건" + "条件": "조건", + "指定人名翻译": "사용자 이름 번역 지정", + "专有名词翻译": "고유명사 번역", + "VNR共享辞书": "VNR 공유 사서", + "自定义优化": "사용자 정의 최적화", + "人名": "인명", + "游戏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 e00a073a..5ca54bd5 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "Wystarczy wymienić zawartość (jeśli wymiana jest pusta, filtruj ją bezpośrednio)", "使用正则表达式替换": "Zastąp wyrażeniami regularnymi", "自定义python处理": "Niestandardowe przetwarzanie Pythona", - "使用专有名词翻译": "Przetłumacz rzeczownikiem właściwym", - "使用翻译结果修正": "Korekta przy użyciu wyników tłumaczenia", - "使用VNR共享辞书": "Używanie VNR do udostępniania słowników", "辞书设置": "Ustawienia słownika", "小学馆辞书": "Słownik biblioteki szkół podstawowych", "快捷键设置": "Ustawienia skrótu", @@ -148,7 +145,6 @@ "sqlite文件": "Plik Sqlite", "替换为": "Zastąp na", "去除重复字符(若为1则自动分析去重)": "Usuń duplikaty znaków (jeśli jest to 1, automatycznie analizuj i usuń duplikaty)", - "专有名词翻译设置(游戏ID 0表示全局)": "Ustawienia tłumaczenia rzeczownika właściwego (ID gry 0 oznacza globalny)", "密钥": "tajny klucz", "記号": "Symbol", "选择文件": "Wybierz plik", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "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", - "使用VNDB数据替换人名": "Zastąp nazwiska osób na dane VNDB", "文本输出": "Wyjście tekstowe", "自动输出提取的文本": "Automatycznie wyświetlać wyodrębniony tekst", "缩放": "powiększenie", @@ -653,7 +648,6 @@ "左移": "Przesunięcie w lewo", "右移": "Prawa zmiana", "启动游戏不修改顺序": "Rozpocznij grę bez zmiany kolejności", - "使用自定义优化": "Użyj niestandardowej optymalizacji", "游戏管理": "Zarządzanie grą", "显示标题": "pokaż nagłówek", "收藏": "kolekcja", @@ -815,5 +809,12 @@ "延申": "Rozszerzenie", "进入时才显示": "Wyświetlane tylko przy wejściu", "语音跳过": "Przeskakiwanie głosu", - "条件": "stan" + "条件": "stan", + "指定人名翻译": "Tłumaczenie oznaczonej nazwy", + "专有名词翻译": "Tłumaczenie terminów własności", + "VNR共享辞书": "Wspólny leksykon VNR", + "自定义优化": "Optymalizacja niestandardowa", + "人名": "nazwa", + "游戏ID 0表示全局": "Identyfikator gry 0 reprezentuje globalny", + "游戏数据": "Dane gry" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index 4ec7f152..f9e461d3 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "Заменить содержимое (Если замена пустая, то фильтруйте напрямую)", "使用正则表达式替换": "Заменить регулярными выражениями", "自定义python处理": "Пользовательская обработка на python", - "使用专有名词翻译": "Перевод имени собственного", - "使用翻译结果修正": "Коррекцию результата перевода", - "使用VNR共享辞书": "Словать VNR", "辞书设置": "Настройка словаря", "小学馆辞书": "Словарь Xiaoxueguan", "快捷键设置": "Настройка Комбинации клавиш", @@ -148,7 +145,6 @@ "sqlite文件": "Файл sqlite", "替换为": "Заменить на:", "去除重复字符(若为1则自动分析去重)": "Удалить повторяющиеся символы (1 - автоматически)", - "专有名词翻译设置(游戏ID 0表示全局)": "Настройка перевода имен собственных (идентификатор игры 0 означает глобальный)", "密钥": "Ключ", "記号": "знак", "选择文件": "Выбор файла", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "Показать / скрыть исторический перевод", "全屏/恢复游戏窗口": "Полноэкранное / Восстановление игрового окна", "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Модель OCR для этого языка не загружена, используйте ее после того, как [другие настройки] - > [загрузка ресурсов] - > [языковой пакет OCR] загрузит модель на путь files / ocr", - "使用VNDB数据替换人名": "Использование данных VNDB для замены имен", "文本输出": "Вывод текста", "自动输出提取的文本": "Автоматический вывод извлеченного текста", "缩放": "Масштаб", @@ -653,7 +648,6 @@ "左移": "Переместить налево", "右移": "Направо.", "启动游戏不修改顺序": "Запустить игру без изменения порядка", - "使用自定义优化": "Использовать пользовательскую оптимизацию", "游戏管理": "Управление играми", "显示标题": "Показать заголовок", "收藏": "Коллекция", @@ -815,5 +809,12 @@ "延申": "Яньшэнь", "进入时才显示": "Показать при входе", "语音跳过": "Голос скачать", - "条件": "Условия" + "条件": "Условия", + "指定人名翻译": "Имя назначенного переводчика", + "专有名词翻译": "Перевод терминов", + "VNR共享辞书": "VNR Обмен словарями", + "自定义优化": "Настройка оптимизации", + "人名": "Имя человека", + "游戏ID 0表示全局": "Идентификатор игры 0 означает глобальный", + "游戏数据": "Игровые данные" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index 28e5b4a3..b4d745f3 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -141,7 +141,6 @@ "繁简转换": "การแปลงที่ง่ายดาย", "设置": "การตั้งค่า", "接受的编码": "การเข้ารหัสที่ยอมรับ", - "专有名词翻译设置(游戏ID 0表示全局)": "การตั้งค่าการแปลคำนามที่เป็นกรรมสิทธิ์ (เกม ID 0 หมายถึงทั่วโลก)", "自定义搜索": "ปรับแต่งการค้นหา", "補助記号": "เครื่องหมายเงินอุดหนุน", "小学馆辞书": "หนังสือลาออกจากโรงเรียนประถมศึกษา", @@ -281,7 +280,6 @@ "过滤纯英文": "กรองภาษาอังกฤษ", "预处理方法": "วิธีการปรับสภาพ", "ギャラ子": "ギ สกุลเงิน", - "使用翻译结果修正": "แก้ไขโดยใช้ผลการแปล", "使用代理的项目": "โครงการที่ใช้ตัวแทน", "分词器": "ตัวแบ่งคำ", "西班牙语": "สเปน", @@ -323,7 +321,6 @@ "选择文本": "เลือกข้อความ", "json文件": "ไฟล์ json", "剪贴板": "คลิปบอร์ด", - "使用VNR共享辞书": "แบ่งปันสำนวนกับ VNR", "系统未安装": "ระบบยังไม่ได้ติดตั้ง", "在重叠显示的字间插入空格": "แทรกช่องว่างระหว่างคำที่แสดงทับซ้อนกัน", "显示/隐藏翻译窗口": "แสดง/ซ่อนหน้าต่างการแปล", @@ -333,7 +330,6 @@ "保存路径": "บันทึกพาธ", "编辑": "บรรณาธิการ", "ついなちゃん": "ついなちゃん", - "使用专有名词翻译": "ใช้การแปลคำนามที่เป็นกรรมสิทธิ์", "选择": "เลือก", "最邻近": "ใกล้เคียงที่สุด", "显示分词结果": "แสดงผลการแบ่งคำ", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "แสดง/ซ่อนการแปลประวัติ", "全屏/恢复游戏窗口": "เต็มหน้าจอ/กู้คืนหน้าต่างเกม", "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "ไม่มีการดาวน์โหลดรุ่น OCR สำหรับภาษาโปรดใช้หลังจาก [การตั้งค่าอื่น ๆ] -> [ดาวน์โหลดทรัพยากร] -> [ชุดภาษา OCR] ดาวน์โหลดแบบจำลองเปิดเส้นทางไฟล์ / OCR", - "使用VNDB数据替换人名": "แทนที่ชื่อบุคคลด้วยข้อมูล VNDB", "文本输出": "ข้อความออก", "自动输出提取的文本": "ส่งออกข้อความที่สกัดโดยอัตโนมัติ", "缩放": "ซูม", @@ -653,7 +648,6 @@ "左移": "เลื่อนซ้าย", "右移": "ย้ายขวา", "启动游戏不修改顺序": "เริ่มเกมโดยไม่มีการปรับเปลี่ยนลำดับ", - "使用自定义优化": "ใช้การปรับแต่งให้เหมาะสม", "游戏管理": "การจัดการเกม", "显示标题": "แสดงหัวเรื่อง", "收藏": "คอลเลกชัน", @@ -815,5 +809,12 @@ "延申": "ยันชิน", "进入时才显示": "แสดงเฉพาะเมื่อเข้า", "语音跳过": "ข้ามเสียง", - "条件": "เงื่อนไข" + "条件": "เงื่อนไข", + "指定人名翻译": "ระบุการแปลชื่อบุคคล", + "专有名词翻译": "การแปลคำนามที่เป็นกรรมสิทธิ์", + "VNR共享辞书": "VNR สำนวนที่ใช้ร่วมกัน", + "自定义优化": "การปรับแต่งให้เหมาะสม", + "人名": "ชื่อบุคคล", + "游戏ID 0表示全局": "รหัสเกม 0 หมายถึงทั่วโลก", + "游戏数据": "ข้อมูลเกม" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index 8fc344a0..957ee266 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "Basit değiştirme içeriği (değiştirme boş ise direkt filtrelecek)", "使用正则表达式替换": "Düzenli ifade ile değiştir", "自定义python处理": "Özel Python işleme", - "使用专有名词翻译": "Doğru isim çevirimi kullan", - "使用翻译结果修正": "Tercüme sonuçlarını düzeltmek için kullan", - "使用VNR共享辞书": "Sözlükleri paylaşmak için VNR kullanın", "辞书设置": "Sözlük ayarları", "小学馆辞书": "İlkokul sözlüğü", "快捷键设置": "Kısayol tuş ayarları", @@ -148,7 +145,6 @@ "sqlite文件": "Sqlite dosyası", "替换为": "Bununla değiştir", "去除重复字符(若为1则自动分析去重)": "Çiftli karakterleri sil (1 ise otomatik analiz edilecek ve silecek)", - "专有名词翻译设置(游戏ID 0表示全局)": "Özel isim tercüme ayarları (oyun kimliği 0 küresel gösteriyor)", "密钥": "gizli anahtar", "記号": "Simbol", "选择文件": "Dosya Seç", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "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", - "使用VNDB数据替换人名": "İnsan isimlerini VNDB veriyle değiştir", "文本输出": "Metin çıkış", "自动输出提取的文本": "Automatically output extracted text", "缩放": "zoom", @@ -653,7 +648,6 @@ "左移": "Sol vardiyası", "右移": "Sağ değişiklik", "启动游戏不修改顺序": "Düzeni değiştirmeden oyunu başlat", - "使用自定义优化": "Özel optimizasyon kullan", "游戏管理": "Oyun Yönetimi", "显示标题": "başlığı göster", "收藏": "koleksiyon", @@ -815,5 +809,12 @@ "延申": "Uzantı", "进入时才显示": "Sadece giriş üzerinde gösterilir", "语音跳过": "Ses atlama", - "条件": "durum" + "条件": "durum", + "指定人名翻译": "Tasarlanmış İsim Çevirmesi", + "专有名词翻译": "Özel terimlerin çevirimi", + "VNR共享辞书": "VNR Paylaşılmış Lexicon", + "自定义优化": "Özel optimizasyon", + "人名": "isim", + "游戏ID 0表示全局": "Oyun ID 0 küresel olarak temsil ediyor", + "游戏数据": "Oyun verileri" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index a39d3ffa..ca53bef9 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -112,9 +112,6 @@ "简单替换内容(若替换为空则直接过滤)": "Просто замініть вміст (якщо заміна порожня, фільтруйте його безпосередньо)", "使用正则表达式替换": "Замінити формальними виразами", "自定义python处理": "Custom Python processing", - "使用专有名词翻译": "Переклад з правильною назвою", - "使用翻译结果修正": "Виправка за допомогою результатів перекладу", - "使用VNR共享辞书": "Використання VNR для поділу словників", "辞书设置": "Параметри словника", "小学馆辞书": "Словник бібліотеки основних школ", "快捷键设置": "Параметри клавіш скорочення", @@ -142,7 +139,6 @@ "sqlite文件": "Файл Sqlite", "替换为": "Замінити за", "去除重复字符(若为1则自动分析去重)": "Вилучити дублікати символи (якщо це 1, автоматично аналізувати і вилучити дублікати)", - "专有名词翻译设置(游戏ID 0表示全局)": "Параметри перекладу належної назви (ІД гри 0 означає глобальну)", "密钥": "секретний ключ", "記号": "Символ", "选择文件": "Виберіть файл", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "Показувати/сховати історичні переклади", "全屏/恢复游戏窗口": "Повний екран / відновити вікно гри", "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "Модель OCR для цієї мови не було звантажено. Будь ласка, відкрийте модель до шляху до файлів/ocr у [Інші параметри] ->[Звантаження ресурсів] ->[Пакет мови OCR] і скористайтеся ним", - "使用VNDB数据替换人名": "Замінити назви людей даними VNDB", "文本输出": "Вивід тексту", "自动输出提取的文本": "Автоматично виводити вилучений текст", "缩放": "масштаб", @@ -653,7 +648,6 @@ "左移": "Ліва зміна", "右移": "Права зміна", "启动游戏不修改顺序": "Почати гру без зміни порядку", - "使用自定义优化": "Використовувати нетипову оптимізацію", "游戏管理": "Керування грами", "显示标题": "показувати заголовок", "收藏": "збірка", @@ -815,5 +809,12 @@ "延申": "Розширення", "进入时才显示": "Показано лише після запису", "语音跳过": "Пропускання голосу", - "条件": "умови" + "条件": "умови", + "指定人名翻译": "Переклад визначеної назви", + "专有名词翻译": "Переклад приєднаних термінів", + "VNR共享辞书": "Спільна ліксикона VNR", + "自定义优化": "Нетипова оптимізація", + "人名": "назва", + "游戏ID 0表示全局": "ІД гри 0 означає глобальну", + "游戏数据": "Дані гри" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index a18b09a7..a20ae216 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -118,9 +118,6 @@ "简单替换内容(若替换为空则直接过滤)": "Nội dung thay thế đơn giản (lọc trực tiếp nếu thay thế bằng trống)", "使用正则表达式替换": "Sử dụng Regular Expression", "自定义python处理": "Xử lý Python tùy chỉnh", - "使用专有名词翻译": "Bản dịch của proprietary nouns", - "使用翻译结果修正": "Chỉnh sửa với kết quả dịch", - "使用VNR共享辞书": "Chia sẻ từ điển với VNR", "辞书设置": "Thiết lập từ điển", "小学馆辞书": "Thư từ trường tiểu học", "快捷键设置": "Thiết lập phím tắt", @@ -148,7 +145,6 @@ "sqlite文件": "Tập tin sqlite", "替换为": "Thay thế bằng", "去除重复字符(若为1则自动分析去重)": "Loại bỏ các ký tự trùng lặp (nếu là 1 thì tự động phân tích trọng lượng)", - "专有名词翻译设置(游戏ID 0表示全局)": "Cài đặt dịch danh từ độc quyền (ID trò chơi 0 cho toàn cầu)", "密钥": "Chìa khóa", "記号": "Đánh dấu", "选择文件": "Chọn tập tin", @@ -632,7 +628,6 @@ "显示/隐藏历史翻译": "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", - "使用VNDB数据替换人名": "Thay tên người bằng dữ liệu VNDB", "文本输出": "Xuất văn bản", "自动输出提取的文本": "Tự động xuất văn bản đã trích xuất", "缩放": "Phóng to", @@ -653,7 +648,6 @@ "左移": "Dịch trái", "右移": "Dịch phải", "启动游戏不修改顺序": "Bắt đầu trò chơi Không thay đổi thứ tự", - "使用自定义优化": "Sử dụng Custom Optimization", "游戏管理": "Quản lý trò chơi", "显示标题": "Hiện tiêu đề", "收藏": "Bộ sưu tập", @@ -815,5 +809,12 @@ "延申": "Dương Thân", "进入时才显示": "Hiển thị khi vào", "语音跳过": "Bỏ qua giọng nói", - "条件": "Điều kiện" + "条件": "Điều kiện", + "指定人名翻译": "Name", + "专有名词翻译": "Bản dịch của proprietary noun", + "VNR共享辞书": "VNR chia sẻ thư từ", + "自定义优化": "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" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index 48486183..2cd5bcd6 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -143,7 +143,6 @@ "设置": "", "接受的编码": "", "手动翻译": "", - "专有名词翻译设置(游戏ID 0表示全局)": "", "補助記号": "", "小学馆辞书": "", "项目地址": "", @@ -282,7 +281,6 @@ "过滤纯英文": "", "预处理方法": "", "ギャラ子": "", - "使用翻译结果修正": "", "使用代理的项目": "", "分词器": "", "西班牙语": "", @@ -323,7 +321,6 @@ "选择文本": "", "json文件": "", "剪贴板": "", - "使用VNR共享辞书": "", "系统未安装": "", "在重叠显示的字间插入空格": "", "显示/隐藏翻译窗口": "", @@ -333,7 +330,6 @@ "保存路径": "", "编辑": "", "ついなちゃん": "", - "使用专有名词翻译": "", "选择": "", "最邻近": "", "显示分词结果": "", @@ -639,7 +635,6 @@ "显示/隐藏历史翻译": "", "全屏/恢复游戏窗口": "", "未下载该语言的OCR模型,请在[其他设置]->[资源下载]->[OCR语言包]下载模型解压到files/ocr路径后使用": "", - "使用VNDB数据替换人名": "", "文本输出": "", "自动输出提取的文本": "", "缩放": "", @@ -660,7 +655,6 @@ "左移": "", "右移": "", "启动游戏不修改顺序": "", - "使用自定义优化": "", "游戏管理": "", "显示标题": "", "收藏": "", @@ -815,5 +809,12 @@ "延申": "", "进入时才显示": "", "语音跳过": "", - "条件": "" + "条件": "", + "指定人名翻译": "", + "专有名词翻译": "", + "VNR共享辞书": "", + "自定义优化": "", + "人名": "", + "游戏ID 0表示全局": "", + "游戏数据": "" } \ No newline at end of file diff --git a/README.md b/README.md index 9d602768..d63aface 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,7 @@ > **一款galgame翻译器** -### 使用说明 视频教程 [交流群912525396](https://lunatranslator.xyz/Resource/QQGroup) - +### 使用说明 视频教程 [交流群912525396](https://lunatranslator.xyz/Resource/QQGroup) ## 功能支持 diff --git a/README_en.md b/README_en.md index 5f9cb1c4..ef5aa3b7 100644 --- a/README_en.md +++ b/README_en.md @@ -12,7 +12,6 @@ ### Documentation -Welcome friends who want to help us improve the documentation! [Documentation Repo](https://lunatranslator.xyz/Github/LunaTranslator) ## Features diff --git a/README_ru.md b/README_ru.md index 51943019..db511348 100644 --- a/README_ru.md +++ b/README_ru.md @@ -14,7 +14,6 @@ ### Инструкция по настройке программы (Полностью на русском языке) -Welcome friends who find it helpful to improve the documentation together.[Documentation Repo](https://lunatranslator.xyz/Github/LunaTranslator) ## Основные функции: diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 4e838e5f..eb00c162 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 5) -set(VERSION_MINOR 10) -set(VERSION_PATCH 1) +set(VERSION_MINOR 11) +set(VERSION_PATCH 0) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)