diff --git a/LunaTranslator/LunaTranslator/gui/inputdialog.py b/LunaTranslator/LunaTranslator/gui/inputdialog.py index 4aa35a1f..e44ed888 100644 --- a/LunaTranslator/LunaTranslator/gui/inputdialog.py +++ b/LunaTranslator/LunaTranslator/gui/inputdialog.py @@ -335,77 +335,6 @@ class noundictconfigdialog2(LDialog): self.button.setFocus() self.apply() - -@Singleton_close -class regexedit(LDialog): - def __init__(self, parent, regexlist) -> None: - super().__init__(parent, Qt.WindowType.WindowCloseButtonHint) - self.regexlist = regexlist - self.setWindowTitle("正则匹配") - - formLayout = QVBoxLayout(self) # 配置layout - - self.model = LStandardItemModel() - self.model.setHorizontalHeaderLabels(["正则"]) - table = TableViewW(self) - table.setModel(self.model) - - table.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch) - - self.table = table - for row, regex in enumerate(regexlist): - self.model.insertRow(row, [QStandardItem(regex)]) - - button = threebuttons(texts=["添加行", "删除行", "立即应用"]) - - def clicked1(): - regexlist.insert(0, "") - self.model.insertRow(0, [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: - self.model.removeRow(row) - regexlist.pop(row) - - button.btn2clicked.connect(clicked2) - button.btn3clicked.connect(self.apply) - self.button = button - formLayout.addWidget(table) - formLayout.addWidget(button) - self.resize(QSize(600, 400)) - self.show() - - def apply(self): - rows = self.model.rowCount() - dedump = set() - needremoves = [] - for row in range(rows): - regex = self.model.item(row, 0).text() - if regex == "" or regex in dedump: - needremoves.append(row) - continue - - self.regexlist[row] = regex - dedump.add(regex) - - for row in reversed(needremoves): - self.model.removeRow(row) - self.regexlist.pop(row) - - def closeEvent(self, _) -> None: - self.button.setFocus() - self.apply() - - def autoinitdialog_items(dic): items = [] for arg in dic["args"]: diff --git a/LunaTranslator/LunaTranslator/gui/setting_textinput.py b/LunaTranslator/LunaTranslator/gui/setting_textinput.py index f55ba82c..83c0bc51 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_textinput.py +++ b/LunaTranslator/LunaTranslator/gui/setting_textinput.py @@ -14,13 +14,13 @@ from gui.pretransfile import sqlite2json2 from gui.codeacceptdialog import codeacceptdialog from gui.setting_textinput_ocr import getocrgrid from gui.dialog_savedgame import dialog_savedgame_integrated -from gui.inputdialog import regexedit from gui.usefulwidget import ( D_getsimplecombobox, D_getspinbox, D_getIconButton, getIconButton, makegrid, + listediter, yuitsu_switch, getvboxwidget, D_getsimpleswitch, @@ -376,8 +376,11 @@ def gethookembedgrid(self): "内嵌安全性检查", D_getsimpleswitch(globalconfig["embedded"], "safecheck_use"), D_getIconButton( - callback=lambda: regexedit( - self, globalconfig["embedded"]["safecheckregexs"] + callback=lambda: listediter( + self, + "正则匹配", + "正则", + globalconfig["embedded"]["safecheckregexs"], ), icon="fa.gear", ), diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index c44b3ce1..b60a79ca 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "تأخر حقن ( ماجستير )", "继承默认": "الميراث الافتراضي", "游戏ID": "معرف اللعبة", - "俺たちに翼はない ―――under the innocent sky.": "إذا كان لديك أي معلومات أخرى عن هذا الموضوع الرجاء إضافته مجانا .", "当前游戏ID": "معرف اللعبة الحالية", - "粘贴": "لصق" + "粘贴": "لصق", + "首尾": "الرأس والذيل", + "包含": "احتواء" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index b29a5d51..1ea195e2 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "延遲注入(ms)", "继承默认": "繼承默認", "游戏ID": "遊戲ID", - "俺たちに翼はない ―――under the innocent sky.": "俺たちに翼はない―――under the innocent sky.", "当前游戏ID": "當前遊戲ID", - "粘贴": "粘貼" + "粘贴": "粘貼", + "首尾": "首尾", + "包含": "包含" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cs.json b/LunaTranslator/files/lang/cs.json index 3f0ca337..3b81e387 100644 --- a/LunaTranslator/files/lang/cs.json +++ b/LunaTranslator/files/lang/cs.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Zpožděná injekce (ms)", "继承默认": "Zdědit výchozí", "游戏ID": "ID hry", - "俺たちに翼はない ―――under the innocent sky.": "Moje křídla jsou pod nevinnou oblohou", "当前游戏ID": "Aktuální ID hry", - "粘贴": "pasta" + "粘贴": "pasta", + "首尾": "Konec k konci", + "包含": "obsahovat" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/de.json b/LunaTranslator/files/lang/de.json index fab43107..25f92be9 100644 --- a/LunaTranslator/files/lang/de.json +++ b/LunaTranslator/files/lang/de.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Verspätete Injektion (ms)", "继承默认": "Standard vererben", "游戏ID": "Spiel-ID", - "俺たちに翼はない ―――under the innocent sky.": "Meine Flügel sind unter dem unschuldigen Himmel", "当前游戏ID": "Aktuelle Spiel-ID", - "粘贴": "Paste" + "粘贴": "Paste", + "首尾": "Ende zu Ende", + "包含": "enthalten" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index 1624fcce..586cfc70 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Delayed injection (ms)", "继承默认": "Inherit default", "游戏ID": "Game ID", - "俺たちに翼はない ―――under the innocent sky.": "My wings are under the innocent sky", "当前游戏ID": "Current game ID", - "粘贴": "paste" + "粘贴": "paste", + "首尾": "End to end", + "包含": "contain" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index 0a5b8db5..290c0c56 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Inyección de retraso (ms)", "继承默认": "Heredar predeterminado", "游戏ID": "ID del juego", - "俺たちに翼はない ―――under the innocent sky.": "ち mi ala es hermosa? Bajo el cielo innocent.", "当前游戏ID": "Id actual del juego", - "粘贴": "Pegar" + "粘贴": "Pegar", + "首尾": "De principio a fin", + "包含": "Contiene" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index 74a14105..89f917aa 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Injection retardée (MS)", "继承默认": "Héritage par défaut", "游戏ID": "ID du jeu", - "俺たちに翼はない ―――under the innocent sky.": "Je suis sous le ciel innocent.", "当前游戏ID": "Id de jeu actuel", - "粘贴": "Coller" + "粘贴": "Coller", + "首尾": "Première queue", + "包含": "Contient" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index 773fcb72..4207111a 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Iniezione ritardata (ms)", "继承默认": "Eredi default", "游戏ID": "ID gioco", - "俺たちに翼はない ―――under the innocent sky.": "Le mie ali sono sotto il cielo innocente", "当前游戏ID": "ID del gioco corrente", - "粘贴": "pasta" + "粘贴": "pasta", + "首尾": "Fine a fine", + "包含": "contiene" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index f84cc9d4..984ea552 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "遅延注入(ms)", "继承默认": "デフォルトの継承", "游戏ID": "ゲームID", - "俺たちに翼はない ―――under the innocent sky.": "私たちに翼はない――under the innocent sky.", "当前游戏ID": "現在のゲームID", - "粘贴": "貼り付け" + "粘贴": "貼り付け", + "首尾": "首尾", + "包含": "含める" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index f0b8b664..0998514c 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "주입 지연 (ms)", "继承默认": "기본 상속", "游戏ID": "게임 ID", - "俺たちに翼はない ―――under the innocent sky.": "나의 날개는 다음과 같다 - under the innocent sky.", "当前游戏ID": "현재 게임 ID", - "粘贴": "붙여넣기" + "粘贴": "붙여넣기", + "首尾": "수미", + "包含": "포함" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/nl.json b/LunaTranslator/files/lang/nl.json index 19ba14c9..5fb055c7 100644 --- a/LunaTranslator/files/lang/nl.json +++ b/LunaTranslator/files/lang/nl.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Vertraagde injectie (ms)", "继承默认": "Standaard overnemen", "游戏ID": "Game ID", - "俺たちに翼はない ―――under the innocent sky.": "Mijn vleugels zijn onder de onschuldige hemel", "当前游戏ID": "Huidige game-ID", - "粘贴": "plakken" + "粘贴": "plakken", + "首尾": "End to end", + "包含": "bevatten" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index db96498d..9bbdd44f 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Opóźnione wstrzyknięcie (ms)", "继承默认": "Odziedziczyć domyślne", "游戏ID": "Identyfikator gry", - "俺たちに翼はない ―――under the innocent sky.": "Moje skrzydła są pod niewinnym niebem", "当前游戏ID": "Aktualny identyfikator gry", - "粘贴": "pasta" + "粘贴": "pasta", + "首尾": "Koniec do końca", + "包含": "zawierać" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pt.json b/LunaTranslator/files/lang/pt.json index b250f155..d886d3bb 100644 --- a/LunaTranslator/files/lang/pt.json +++ b/LunaTranslator/files/lang/pt.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Injeção retardada (ms)", "继承默认": "Herdar por omissão", "游戏ID": "ID do Jogo", - "俺たちに翼はない ―――under the innocent sky.": "Minhas asas estão sob o céu inocente", "当前游戏ID": "ID do jogo actual", - "粘贴": "colar" + "粘贴": "colar", + "首尾": "De ponta a ponta", + "包含": "contém" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index 09c33d9c..ec8b6e3a 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Задержка инъекции (ms)", "继承默认": "Наследование по умолчанию", "游戏ID": "Идентификатор игры", - "俺たちに翼はない ―――under the innocent sky.": "Под моим крылом", "当前游戏ID": "Текущий идентификатор игры", - "粘贴": "Вставить" + "粘贴": "Вставить", + "首尾": "Голова и хвост", + "包含": "Включение" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/sv.json b/LunaTranslator/files/lang/sv.json index 98e5f356..c9cb1db1 100644 --- a/LunaTranslator/files/lang/sv.json +++ b/LunaTranslator/files/lang/sv.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Fördröjd injektion (ms)", "继承默认": "Arv förval", "游戏ID": "Spelid", - "俺たちに翼はない ―――under the innocent sky.": "Mina vingar är under den oskyldiga himlen", "当前游戏ID": "Aktuellt spelID", - "粘贴": "klistra" + "粘贴": "klistra", + "首尾": "Slut till slut", + "包含": "innehåller" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index bdc93993..2b50dcd8 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "การฉีดล่าช้า (ms)", "继承默认": "สืบทอดปริยาย", "游戏ID": "รหัสเกม", - "俺たちに翼はない ―――under the innocent sky.": "คันทะชิบิ - ― อยู่ใต้ท้องฟ้า", "当前游戏ID": "รหัสเกมปัจจุบัน", - "粘贴": "วางบน" + "粘贴": "วางบน", + "首尾": "หัวหาง", + "包含": "ประกอบด้วย" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index 61ca9c49..3e7c86bc 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Uzak injeksiyon (ms)", "继承默认": "Ög- belgilengeni miras edin", "游戏ID": "Oyun Kimliği", - "俺たちに翼はない ―――under the innocent sky.": "Kanatlarım masum gökyüzünün altında.", "当前游戏ID": "Şimdiki oyun kimliği", - "粘贴": "Yapıştır" + "粘贴": "Yapıştır", + "首尾": "Sonuna kadar", + "包含": "içerir" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index 156dec35..a6aa1450 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Затримка інструкції (мс)", "继承默认": "Типовий спадковий", "游戏ID": "ІД гри", - "俺たちに翼はない ―――under the innocent sky.": "Мої крила під невинним небом", "当前游戏ID": "Поточний ідентифікатор гри", - "粘贴": "вставити" + "粘贴": "вставити", + "首尾": "Кінець до кінця", + "包含": "містити" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index 44a6f1c9..c8e2ff18 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -835,7 +835,8 @@ "延迟注入(ms)": "Tiêm chậm (ms)", "继承默认": "Thừa kế mặc định", "游戏ID": "ID trò chơi", - "俺たちに翼はない ―――under the innocent sky.": "Lời bài hát: Under The Innocent Sky", "当前游戏ID": "ID game hiện tại", - "粘贴": "Dán" + "粘贴": "Dán", + "首尾": "Trang chủ", + "包含": "Bao gồm" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index 03dbc202..8647a3d7 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -835,7 +835,8 @@ "其他参数": "", "延迟注入(ms)": "", "继承默认": "", - "俺たちに翼はない ―――under the innocent sky.": "", "当前游戏ID": "", - "粘贴": "" + "粘贴": "", + "首尾": "", + "包含": "" } \ No newline at end of file