mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
fix
This commit is contained in:
parent
16cd0fd6e2
commit
22aceb3814
@ -8,7 +8,7 @@ from gui.usefulwidget import (
|
|||||||
threebuttons,
|
threebuttons,
|
||||||
getlineedit,
|
getlineedit,
|
||||||
TableViewW,
|
TableViewW,
|
||||||
LFocusCombo,
|
SuperCombo,
|
||||||
)
|
)
|
||||||
from gui.dynalang import LStandardItemModel, LDialog, LCheckBox, LLabel
|
from gui.dynalang import LStandardItemModel, LDialog, LCheckBox, LLabel
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ class codeacceptdialog(LDialog):
|
|||||||
itemsaver = QStandardItem()
|
itemsaver = QStandardItem()
|
||||||
self.model.setItem(row, 0, itemsaver)
|
self.model.setItem(row, 0, itemsaver)
|
||||||
index = self.model.index(row, 0)
|
index = self.model.index(row, 0)
|
||||||
codecombox = LFocusCombo()
|
codecombox = SuperCombo()
|
||||||
codecombox.addItems((nowsuppertcodes))
|
codecombox.addItems((nowsuppertcodes))
|
||||||
codecombox.setCurrentIndex(idx)
|
codecombox.setCurrentIndex(idx)
|
||||||
self.table.setIndexWidget(index, codecombox)
|
self.table.setIndexWidget(index, codecombox)
|
||||||
@ -114,7 +114,7 @@ class codeacceptdialog(LDialog):
|
|||||||
def clicked1(self):
|
def clicked1(self):
|
||||||
itemsaver = QStandardItem()
|
itemsaver = QStandardItem()
|
||||||
self.model.insertRow(0, [itemsaver])
|
self.model.insertRow(0, [itemsaver])
|
||||||
codecombox = LFocusCombo()
|
codecombox = SuperCombo()
|
||||||
codecombox.addItems((nowsuppertcodes))
|
codecombox.addItems((nowsuppertcodes))
|
||||||
self._setcode_i(codecombox, itemsaver)
|
self._setcode_i(codecombox, itemsaver)
|
||||||
codecombox.currentIndexChanged.connect(
|
codecombox.currentIndexChanged.connect(
|
||||||
|
@ -324,18 +324,26 @@ class dialog_setting_game_internal(QWidget):
|
|||||||
print_exc()
|
print_exc()
|
||||||
|
|
||||||
def metadataorigin(self, formLayout: LFormLayout, gameuid):
|
def metadataorigin(self, formLayout: LFormLayout, gameuid):
|
||||||
formLayout.addRow(
|
combo = getsimplecombobox(
|
||||||
"首选的",
|
["无"] + list(targetmod.keys()),
|
||||||
getsimplecombobox(
|
|
||||||
list(targetmod.keys()),
|
|
||||||
globalconfig,
|
globalconfig,
|
||||||
"primitivtemetaorigin",
|
"primitivtemetaorigin",
|
||||||
internal=list(targetmod.keys()),
|
internal=[None] + list(targetmod.keys()),
|
||||||
static=True,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
formLayout.addRow("首选的", combo)
|
||||||
formLayout.addRow(None, QLabel())
|
formLayout.addRow(None, QLabel())
|
||||||
for key in targetmod:
|
|
||||||
|
def valid(idx, x):
|
||||||
|
if x:
|
||||||
|
if combo.currentIndex() == 0:
|
||||||
|
combo.setCurrentIndex(idx + 1)
|
||||||
|
combo.setRowVisible(idx + 1, True)
|
||||||
|
else:
|
||||||
|
if combo.currentIndex() == idx + 1:
|
||||||
|
combo.setCurrentIndex(0)
|
||||||
|
combo.setRowVisible(idx + 1, False)
|
||||||
|
|
||||||
|
for i, key in enumerate(targetmod):
|
||||||
try:
|
try:
|
||||||
idname = targetmod[key].idname
|
idname = targetmod[key].idname
|
||||||
|
|
||||||
@ -351,8 +359,14 @@ class dialog_setting_game_internal(QWidget):
|
|||||||
vndbid.returnPressed.connect(
|
vndbid.returnPressed.connect(
|
||||||
functools.partial(gamdidchangedtask, key, idname, gameuid)
|
functools.partial(gamdidchangedtask, key, idname, gameuid)
|
||||||
)
|
)
|
||||||
|
if not globalconfig["metadata"][key]["auto"]:
|
||||||
|
combo.setRowVisible(i + 1, False)
|
||||||
_vbox_internal = [
|
_vbox_internal = [
|
||||||
getsimpleswitch(globalconfig["metadata"][key], "auto"),
|
getsimpleswitch(
|
||||||
|
globalconfig["metadata"][key],
|
||||||
|
"auto",
|
||||||
|
callback=functools.partial(valid, i),
|
||||||
|
),
|
||||||
vndbid,
|
vndbid,
|
||||||
getIconButton(
|
getIconButton(
|
||||||
functools.partial(self.openrefmainpage, key, idname, gameuid),
|
functools.partial(self.openrefmainpage, key, idname, gameuid),
|
||||||
|
@ -14,7 +14,7 @@ from gui.usefulwidget import (
|
|||||||
TableViewW,
|
TableViewW,
|
||||||
getsimplepatheditor,
|
getsimplepatheditor,
|
||||||
FocusSpin,
|
FocusSpin,
|
||||||
LFocusCombo,
|
SuperCombo,
|
||||||
getsimplecombobox,
|
getsimplecombobox,
|
||||||
getspinbox,
|
getspinbox,
|
||||||
SplitLine,
|
SplitLine,
|
||||||
@ -261,7 +261,7 @@ class yuyinzhidingsetting(LDialog):
|
|||||||
self.table.setindexdata(self.model.index(row, 3), item['target'])
|
self.table.setindexdata(self.model.index(row, 3), item['target'])
|
||||||
|
|
||||||
def createacombox(self, config):
|
def createacombox(self, config):
|
||||||
com = LFocusCombo()
|
com = SuperCombo()
|
||||||
com.addItems(["跳过", "默认", "选择声音"])
|
com.addItems(["跳过", "默认", "选择声音"])
|
||||||
target = config.get("target", "skip")
|
target = config.get("target", "skip")
|
||||||
com.target = target
|
com.target = target
|
||||||
@ -278,7 +278,7 @@ class yuyinzhidingsetting(LDialog):
|
|||||||
)
|
)
|
||||||
return com
|
return com
|
||||||
|
|
||||||
def __comchange(self, com: LFocusCombo, config, idx):
|
def __comchange(self, com: SuperCombo, config, idx):
|
||||||
if idx == 0:
|
if idx == 0:
|
||||||
com.target = "skip"
|
com.target = "skip"
|
||||||
if com.count() > 3:
|
if com.count() > 3:
|
||||||
@ -527,7 +527,7 @@ class autoinitdialog__(LDialog):
|
|||||||
lineW = listediterline(line["name"], line["header"], __list)
|
lineW = listediterline(line["name"], line["header"], __list)
|
||||||
regist[key] = functools.partial(__getv, __list)
|
regist[key] = functools.partial(__getv, __list)
|
||||||
elif line["type"] == "combo":
|
elif line["type"] == "combo":
|
||||||
lineW = LFocusCombo()
|
lineW = SuperCombo()
|
||||||
if "list_function" in line:
|
if "list_function" in line:
|
||||||
try:
|
try:
|
||||||
func = getattr(
|
func = getattr(
|
||||||
@ -546,10 +546,10 @@ class autoinitdialog__(LDialog):
|
|||||||
elif line["type"] == "lineedit_or_combo":
|
elif line["type"] == "lineedit_or_combo":
|
||||||
line1 = QLineEdit()
|
line1 = QLineEdit()
|
||||||
lineW = QHBoxLayout()
|
lineW = QHBoxLayout()
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
combo.setLineEdit(line1)
|
combo.setLineEdit(line1)
|
||||||
|
|
||||||
def __refresh(regist, line, combo: LFocusCombo):
|
def __refresh(regist, line, combo: SuperCombo):
|
||||||
try:
|
try:
|
||||||
func = getattr(
|
func = getattr(
|
||||||
importlib.import_module(modelfile), line["list_function"]
|
importlib.import_module(modelfile), line["list_function"]
|
||||||
|
@ -3,7 +3,7 @@ import sqlite3, os, json, functools
|
|||||||
from traceback import print_exc
|
from traceback import print_exc
|
||||||
from myutils.config import globalconfig, _TR
|
from myutils.config import globalconfig, _TR
|
||||||
from myutils.utils import autosql, dynamicapiname
|
from myutils.utils import autosql, dynamicapiname
|
||||||
from gui.usefulwidget import getQMessageBox, LFocusCombo
|
from gui.usefulwidget import getQMessageBox, SuperCombo
|
||||||
from gui.dynalang import LFormLayout, LPushButton, LDialog
|
from gui.dynalang import LFormLayout, LPushButton, LDialog
|
||||||
from textsource.texthook import splitembedlines
|
from textsource.texthook import splitembedlines
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
@ -43,15 +43,14 @@ def sqlite2json2(
|
|||||||
for _, __ in Counter(collect).most_common():
|
for _, __ in Counter(collect).most_common():
|
||||||
if _ in globalconfig["fanyi"]:
|
if _ in globalconfig["fanyi"]:
|
||||||
_collect.append(_)
|
_collect.append(_)
|
||||||
collect = _collect
|
|
||||||
dialog = LDialog(self, Qt.WindowType.WindowCloseButtonHint) # 自定义一个dialog
|
dialog = LDialog(self, Qt.WindowType.WindowCloseButtonHint) # 自定义一个dialog
|
||||||
dialog.setWindowTitle("导出翻译记录为json文件")
|
dialog.setWindowTitle("导出翻译记录为json文件")
|
||||||
dialog.resize(QSize(800, 10))
|
dialog.resize(QSize(800, 10))
|
||||||
formLayout = LFormLayout(dialog) # 配置layout
|
formLayout = LFormLayout(dialog) # 配置layout
|
||||||
dialog.setLayout(formLayout)
|
dialog.setLayout(formLayout)
|
||||||
|
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
combo.addItems([dynamicapiname(_) for _ in collect])
|
combo.addItems([dynamicapiname(_) for _ in _collect], _collect)
|
||||||
|
|
||||||
formLayout.addRow("首选翻译", combo)
|
formLayout.addRow("首选翻译", combo)
|
||||||
e = QLineEdit(sqlitefile[: -(len(".sqlite"))])
|
e = QLineEdit(sqlitefile[: -(len(".sqlite"))])
|
||||||
@ -81,8 +80,8 @@ def sqlite2json2(
|
|||||||
button.rejected.connect(dialog.close)
|
button.rejected.connect(dialog.close)
|
||||||
|
|
||||||
def __savefunction(target, existsmerge, isforembed):
|
def __savefunction(target, existsmerge, isforembed):
|
||||||
if len(collect) > 0:
|
if len(_collect) > 0:
|
||||||
transkirokuuse = collect[combo.currentIndex()]
|
transkirokuuse = combo.getIndexData(combo.currentIndex())
|
||||||
for k in js_format2:
|
for k in js_format2:
|
||||||
js_format2[k] = js_format2[k].get(transkirokuuse, "")
|
js_format2[k] = js_format2[k].get(transkirokuuse, "")
|
||||||
|
|
||||||
|
@ -23,9 +23,8 @@ from gui.usefulwidget import (
|
|||||||
selectcolor,
|
selectcolor,
|
||||||
listediter,
|
listediter,
|
||||||
FocusFontCombo,
|
FocusFontCombo,
|
||||||
LFocusCombo,
|
SuperCombo,
|
||||||
getspinbox,
|
getspinbox,
|
||||||
LLabel,
|
|
||||||
getsmalllabel,
|
getsmalllabel,
|
||||||
SplitLine,
|
SplitLine,
|
||||||
)
|
)
|
||||||
@ -244,7 +243,7 @@ def resetgroudswitchcallback(self, group):
|
|||||||
return
|
return
|
||||||
clearlayout(self.goodfontsettingsformlayout)
|
clearlayout(self.goodfontsettingsformlayout)
|
||||||
|
|
||||||
goodfontgroupswitch = LFocusCombo()
|
goodfontgroupswitch = SuperCombo()
|
||||||
self.seletengeinecombo.lastindex = self.seletengeinecombo.currentIndex()
|
self.seletengeinecombo.lastindex = self.seletengeinecombo.currentIndex()
|
||||||
if group == "webview" or group == "QWebEngine":
|
if group == "webview" or group == "QWebEngine":
|
||||||
_btn = LPushButton("编辑")
|
_btn = LPushButton("编辑")
|
||||||
|
@ -18,7 +18,7 @@ from gui.usefulwidget import (
|
|||||||
saveposwindow,
|
saveposwindow,
|
||||||
pixmapviewer,
|
pixmapviewer,
|
||||||
LStandardItemModel,
|
LStandardItemModel,
|
||||||
LFocusCombo,
|
SuperCombo,
|
||||||
threebuttons,
|
threebuttons,
|
||||||
)
|
)
|
||||||
import gobject, qtawesome
|
import gobject, qtawesome
|
||||||
@ -93,11 +93,11 @@ class triggereditor(LDialog):
|
|||||||
self.vkeys = list(static_data["vkcode_map"].keys())
|
self.vkeys = list(static_data["vkcode_map"].keys())
|
||||||
for row, k in enumerate(self.list): # 2
|
for row, k in enumerate(self.list): # 2
|
||||||
self.hcmodel.insertRow(row, [QStandardItem(), QStandardItem()])
|
self.hcmodel.insertRow(row, [QStandardItem(), QStandardItem()])
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
combo.addItems(self.vkeys)
|
combo.addItems(self.vkeys)
|
||||||
combo.setCurrentIndex(self.vkeys.index(k["vkey"]))
|
combo.setCurrentIndex(self.vkeys.index(k["vkey"]))
|
||||||
self.hctable.setIndexWidget(self.hcmodel.index(row, 0), combo)
|
self.hctable.setIndexWidget(self.hcmodel.index(row, 0), combo)
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
combo.addItems(["按下", "松开"])
|
combo.addItems(["按下", "松开"])
|
||||||
combo.setCurrentIndex(k["event"])
|
combo.setCurrentIndex(k["event"])
|
||||||
self.hctable.setIndexWidget(self.hcmodel.index(row, 1), combo)
|
self.hctable.setIndexWidget(self.hcmodel.index(row, 1), combo)
|
||||||
@ -122,10 +122,10 @@ class triggereditor(LDialog):
|
|||||||
|
|
||||||
def click1(self):
|
def click1(self):
|
||||||
self.hcmodel.insertRow(0, [QStandardItem(), QStandardItem()])
|
self.hcmodel.insertRow(0, [QStandardItem(), QStandardItem()])
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
combo.addItems(self.vkeys)
|
combo.addItems(self.vkeys)
|
||||||
self.hctable.setIndexWidget(self.hcmodel.index(0, 0), combo)
|
self.hctable.setIndexWidget(self.hcmodel.index(0, 0), combo)
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
combo.addItems(["按下", "松开"])
|
combo.addItems(["按下", "松开"])
|
||||||
self.hctable.setIndexWidget(self.hcmodel.index(0, 1), combo)
|
self.hctable.setIndexWidget(self.hcmodel.index(0, 1), combo)
|
||||||
|
|
||||||
|
@ -34,24 +34,54 @@ class FocusCombo(QComboBox):
|
|||||||
else:
|
else:
|
||||||
return super().wheelEvent(e)
|
return super().wheelEvent(e)
|
||||||
|
|
||||||
|
class SuperCombo(FocusCombo):
|
||||||
|
Visoriginrole = Qt.ItemDataRole.UserRole + 1
|
||||||
|
Internalrole = Visoriginrole + 1
|
||||||
|
|
||||||
class LFocusCombo(FocusCombo):
|
def __init__(self, parent=None, static=False) -> None:
|
||||||
def __init__(self, parent: QWidget = None) -> None:
|
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.__items = None
|
self.mo = QStandardItemModel()
|
||||||
|
self.static = static
|
||||||
|
self.setModel(self.mo)
|
||||||
|
self.vu = QListView()
|
||||||
|
self.setView(self.vu)
|
||||||
|
|
||||||
def addItems(self, items):
|
def addItem(self, item, internal=None):
|
||||||
self.__items = items
|
item1 = QStandardItem(_TR(item) if not self.static else item)
|
||||||
super().addItems(_TRL(items))
|
item1.setData(item, self.Visoriginrole)
|
||||||
|
item1.setData(internal, self.Internalrole)
|
||||||
|
self.mo.appendRow(item1)
|
||||||
|
|
||||||
def clear(self):
|
def clear(self):
|
||||||
self.__items = []
|
self.mo.clear()
|
||||||
super().clear()
|
|
||||||
|
def addItems(self, items, internals=None):
|
||||||
|
for i, item in enumerate(items):
|
||||||
|
iternal = None
|
||||||
|
if internals and i < len(internals):
|
||||||
|
iternal = internals[i]
|
||||||
|
self.addItem(item, iternal)
|
||||||
|
|
||||||
def updatelangtext(self):
|
def updatelangtext(self):
|
||||||
if self.__items:
|
if self.static:
|
||||||
for i in range(self.count()):
|
return
|
||||||
self.setItemText(i, _TR(self.__items[i]))
|
for _ in range(self.mo.rowCount()):
|
||||||
|
item = self.mo.item(_, 0)
|
||||||
|
item.setData(
|
||||||
|
_TR(item.data(self.Visoriginrole)), Qt.ItemDataRole.DisplayRole
|
||||||
|
)
|
||||||
|
|
||||||
|
def getIndexData(self, index):
|
||||||
|
item = self.mo.item(index, 0)
|
||||||
|
return item.data(self.Internalrole)
|
||||||
|
|
||||||
|
def setRowVisible(self, row, vis):
|
||||||
|
self.vu.setRowHidden(row, not vis)
|
||||||
|
item = self.mo.item(row, 0)
|
||||||
|
if vis:
|
||||||
|
item.setFlags(item.flags() | Qt.ItemFlag.ItemIsEnabled)
|
||||||
|
else:
|
||||||
|
item.setFlags(item.flags() & ~Qt.ItemFlag.ItemIsEnabled)
|
||||||
|
|
||||||
|
|
||||||
class FocusFontCombo(QFontComboBox, FocusCombo):
|
class FocusFontCombo(QFontComboBox, FocusCombo):
|
||||||
@ -860,8 +890,8 @@ def callbackwrap(d, k, call, _):
|
|||||||
print_exc()
|
print_exc()
|
||||||
|
|
||||||
|
|
||||||
def comboboxcallbackwrap(internal, d, k, call, _):
|
def comboboxcallbackwrap(s: SuperCombo, d, k, call, _):
|
||||||
_ = internal[_]
|
_ = s.getIndexData(_)
|
||||||
d[k] = _
|
d[k] = _
|
||||||
|
|
||||||
if call:
|
if call:
|
||||||
@ -874,12 +904,8 @@ def comboboxcallbackwrap(internal, d, k, call, _):
|
|||||||
def getsimplecombobox(
|
def getsimplecombobox(
|
||||||
lst, d, k, callback=None, fixedsize=False, internal=None, static=False, emit=False
|
lst, d, k, callback=None, fixedsize=False, internal=None, static=False, emit=False
|
||||||
):
|
):
|
||||||
if static:
|
s = SuperCombo(static=static)
|
||||||
s = FocusCombo()
|
s.addItems(lst, internal)
|
||||||
else:
|
|
||||||
|
|
||||||
s = LFocusCombo()
|
|
||||||
s.addItems(lst)
|
|
||||||
|
|
||||||
if internal:
|
if internal:
|
||||||
if len(internal):
|
if len(internal):
|
||||||
@ -888,7 +914,7 @@ def getsimplecombobox(
|
|||||||
|
|
||||||
s.setCurrentIndex(internal.index(d[k]))
|
s.setCurrentIndex(internal.index(d[k]))
|
||||||
s.currentIndexChanged.connect(
|
s.currentIndexChanged.connect(
|
||||||
functools.partial(comboboxcallbackwrap, internal, d, k, callback)
|
functools.partial(comboboxcallbackwrap, s, d, k, callback)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if len(lst):
|
if len(lst):
|
||||||
@ -1908,7 +1934,7 @@ class listediter(LDialog):
|
|||||||
self.hcmodel.insertRow(row, [item])
|
self.hcmodel.insertRow(row, [item])
|
||||||
|
|
||||||
if candidates:
|
if candidates:
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
_vis = self.candidates
|
_vis = self.candidates
|
||||||
if self.namemapfunction:
|
if self.namemapfunction:
|
||||||
_vis = [self.namemapfunction(_) for _ in _vis]
|
_vis = [self.namemapfunction(_) for _ in _vis]
|
||||||
@ -2021,7 +2047,7 @@ class listediter(LDialog):
|
|||||||
self.internalrealname.insert(0, self.candidates[0])
|
self.internalrealname.insert(0, self.candidates[0])
|
||||||
item = QStandardItem("")
|
item = QStandardItem("")
|
||||||
self.hcmodel.insertRow(0, [item])
|
self.hcmodel.insertRow(0, [item])
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
_vis = self.candidates
|
_vis = self.candidates
|
||||||
if self.namemapfunction:
|
if self.namemapfunction:
|
||||||
_vis = [self.namemapfunction(_) for _ in _vis]
|
_vis = [self.namemapfunction(_) for _ in _vis]
|
||||||
@ -2357,6 +2383,7 @@ class FQLineEdit(QLineEdit):
|
|||||||
|
|
||||||
class LRButton(LPushButton):
|
class LRButton(LPushButton):
|
||||||
rightclick = pyqtSignal()
|
rightclick = pyqtSignal()
|
||||||
|
|
||||||
def mouseReleaseEvent(self, ev: QMouseEvent) -> None:
|
def mouseReleaseEvent(self, ev: QMouseEvent) -> None:
|
||||||
if self.rect().contains(ev.pos()):
|
if self.rect().contains(ev.pos()):
|
||||||
if ev.button() == Qt.MouseButton.RightButton:
|
if ev.button() == Qt.MouseButton.RightButton:
|
||||||
|
@ -6,7 +6,7 @@ from gui.usefulwidget import (
|
|||||||
getsimplecombobox,
|
getsimplecombobox,
|
||||||
getspinbox,
|
getspinbox,
|
||||||
getsimpleswitch,
|
getsimpleswitch,
|
||||||
LFocusCombo,
|
SuperCombo,
|
||||||
getspinbox,
|
getspinbox,
|
||||||
SplitLine,
|
SplitLine,
|
||||||
getsimplepatheditor,
|
getsimplepatheditor,
|
||||||
@ -63,7 +63,7 @@ class settingxx:
|
|||||||
|
|
||||||
def settingxx(self, layout, config, call1, call2):
|
def settingxx(self, layout, config, call1, call2):
|
||||||
|
|
||||||
switch = LFocusCombo()
|
switch = SuperCombo()
|
||||||
switch.addItems(["外部", "内置"])
|
switch.addItems(["外部", "内置"])
|
||||||
lay1 = LFormLayout()
|
lay1 = LFormLayout()
|
||||||
lay2 = LFormLayout()
|
lay2 = LFormLayout()
|
||||||
|
@ -216,7 +216,9 @@ def trysearchforid_1(gameuid, searchargs: list, target=None):
|
|||||||
infoid = None
|
infoid = None
|
||||||
if target is None:
|
if target is None:
|
||||||
primitivtemetaorigin = globalconfig["primitivtemetaorigin"]
|
primitivtemetaorigin = globalconfig["primitivtemetaorigin"]
|
||||||
__ = [primitivtemetaorigin]
|
__ = []
|
||||||
|
if primitivtemetaorigin:
|
||||||
|
__.append(primitivtemetaorigin)
|
||||||
for k in targetmod:
|
for k in targetmod:
|
||||||
if k == primitivtemetaorigin:
|
if k == primitivtemetaorigin:
|
||||||
continue
|
continue
|
||||||
@ -1040,7 +1042,6 @@ def is_ascii_control(c: str):
|
|||||||
return cinranges(c, (0, 0x1F), (0x7F, 0xA0))
|
return cinranges(c, (0, 0x1F), (0x7F, 0xA0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def checkchaos(text):
|
def checkchaos(text):
|
||||||
code = globalconfig["accept_encoding"]
|
code = globalconfig["accept_encoding"]
|
||||||
text = filter(lambda x: x not in globalconfig["accept_character"], text)
|
text = filter(lambda x: x not in globalconfig["accept_character"], text)
|
||||||
@ -1048,7 +1049,7 @@ def checkchaos(text):
|
|||||||
if globalconfig["accept_use_unicode"]:
|
if globalconfig["accept_use_unicode"]:
|
||||||
_start = globalconfig["accept_use_unicode_start"]
|
_start = globalconfig["accept_use_unicode_start"]
|
||||||
_end = globalconfig["accept_use_unicode_end"]
|
_end = globalconfig["accept_use_unicode_end"]
|
||||||
return not all(cinranges(c,(_start, _end)) for c in text)
|
return not all(cinranges(c, (_start, _end)) for c in text)
|
||||||
else:
|
else:
|
||||||
text = "".join(text)
|
text = "".join(text)
|
||||||
for c in code:
|
for c in code:
|
||||||
|
@ -17,7 +17,7 @@ import os
|
|||||||
import gobject, functools
|
import gobject, functools
|
||||||
from traceback import print_exc
|
from traceback import print_exc
|
||||||
from qtsymbols import *
|
from qtsymbols import *
|
||||||
from gui.usefulwidget import LFocusCombo, getboxlayout, getQMessageBox
|
from gui.usefulwidget import SuperCombo, getboxlayout, getQMessageBox
|
||||||
from gui.dynalang import LPushButton, LFormLayout, LLabel
|
from gui.dynalang import LPushButton, LFormLayout, LLabel
|
||||||
|
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ def question(dialog: QDialog):
|
|||||||
dialog.setLayout(formLayout)
|
dialog.setLayout(formLayout)
|
||||||
supportlang = LLabel()
|
supportlang = LLabel()
|
||||||
formLayout.addRow("当前支持的语言", supportlang)
|
formLayout.addRow("当前支持的语言", supportlang)
|
||||||
combo = LFocusCombo()
|
combo = SuperCombo()
|
||||||
allsupports = []
|
allsupports = []
|
||||||
|
|
||||||
def callback():
|
def callback():
|
||||||
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "مسح نطاق التعرف الضوئي على الحروف",
|
"清除OCR范围": "مسح نطاق التعرف الضوئي على الحروف",
|
||||||
"重命名": "إعادة تسمية",
|
"重命名": "إعادة تسمية",
|
||||||
"应用ID": "معرف التطبيق",
|
"应用ID": "معرف التطبيق",
|
||||||
"应用密钥": "مفتاح التطبيق"
|
"应用密钥": "مفتاح التطبيق",
|
||||||
|
"无": "لا"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "清除OCR範圍",
|
"清除OCR范围": "清除OCR範圍",
|
||||||
"重命名": "重命名",
|
"重命名": "重命名",
|
||||||
"应用ID": "應用ID",
|
"应用ID": "應用ID",
|
||||||
"应用密钥": "應用金鑰"
|
"应用密钥": "應用金鑰",
|
||||||
|
"无": "無"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Vymazat rozsah OCR",
|
"清除OCR范围": "Vymazat rozsah OCR",
|
||||||
"重命名": "přejmenovat",
|
"重命名": "přejmenovat",
|
||||||
"应用ID": "ID aplikace",
|
"应用ID": "ID aplikace",
|
||||||
"应用密钥": "Klíč aplikace"
|
"应用密钥": "Klíč aplikace",
|
||||||
|
"无": "nic"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "OCR-Bereich löschen",
|
"清除OCR范围": "OCR-Bereich löschen",
|
||||||
"重命名": "umbenennen",
|
"重命名": "umbenennen",
|
||||||
"应用ID": "Anwendungs-ID",
|
"应用ID": "Anwendungs-ID",
|
||||||
"应用密钥": "Anwendungsschlüssel"
|
"应用密钥": "Anwendungsschlüssel",
|
||||||
|
"无": "nichts"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Clear OCR range",
|
"清除OCR范围": "Clear OCR range",
|
||||||
"重命名": "rename",
|
"重命名": "rename",
|
||||||
"应用ID": "Application ID",
|
"应用ID": "Application ID",
|
||||||
"应用密钥": "Application key"
|
"应用密钥": "Application key",
|
||||||
|
"无": "nothing"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Eliminar el rango OCR",
|
"清除OCR范围": "Eliminar el rango OCR",
|
||||||
"重命名": "Cambiar el nombre",
|
"重命名": "Cambiar el nombre",
|
||||||
"应用ID": "ID de la aplicación",
|
"应用ID": "ID de la aplicación",
|
||||||
"应用密钥": "Clave de aplicación"
|
"应用密钥": "Clave de aplicación",
|
||||||
|
"无": "Ninguno"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Effacer la plage ocr",
|
"清除OCR范围": "Effacer la plage ocr",
|
||||||
"重命名": "Renommer",
|
"重命名": "Renommer",
|
||||||
"应用ID": "Id de l'application",
|
"应用ID": "Id de l'application",
|
||||||
"应用密钥": "Appliquer la clé"
|
"应用密钥": "Appliquer la clé",
|
||||||
|
"无": "Aucun"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Cancella intervallo OCR",
|
"清除OCR范围": "Cancella intervallo OCR",
|
||||||
"重命名": "rinomina",
|
"重命名": "rinomina",
|
||||||
"应用ID": "ID dell'applicazione",
|
"应用ID": "ID dell'applicazione",
|
||||||
"应用密钥": "Chiave dell'applicazione"
|
"应用密钥": "Chiave dell'applicazione",
|
||||||
|
"无": "niente"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "OCR範囲のクリア",
|
"清除OCR范围": "OCR範囲のクリア",
|
||||||
"重命名": "名前を変更",
|
"重命名": "名前を変更",
|
||||||
"应用ID": "アプリケーションID",
|
"应用ID": "アプリケーションID",
|
||||||
"应用密钥": "キーの適用"
|
"应用密钥": "キーの適用",
|
||||||
|
"无": "なし"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "OCR 범위 지우기",
|
"清除OCR范围": "OCR 범위 지우기",
|
||||||
"重命名": "이름 바꾸기",
|
"重命名": "이름 바꾸기",
|
||||||
"应用ID": "적용 ID",
|
"应用ID": "적용 ID",
|
||||||
"应用密钥": "키 적용"
|
"应用密钥": "키 적용",
|
||||||
|
"无": "없음"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "OCR-bereik wissen",
|
"清除OCR范围": "OCR-bereik wissen",
|
||||||
"重命名": "hernoemen",
|
"重命名": "hernoemen",
|
||||||
"应用ID": "Applicatie-ID",
|
"应用ID": "Applicatie-ID",
|
||||||
"应用密钥": "Toepassingssleutel"
|
"应用密钥": "Toepassingssleutel",
|
||||||
|
"无": "niets"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Wyczyść zakres OCR",
|
"清除OCR范围": "Wyczyść zakres OCR",
|
||||||
"重命名": "zmień nazwę",
|
"重命名": "zmień nazwę",
|
||||||
"应用ID": "Identyfikator aplikacji",
|
"应用ID": "Identyfikator aplikacji",
|
||||||
"应用密钥": "Klucz aplikacji"
|
"应用密钥": "Klucz aplikacji",
|
||||||
|
"无": "nic"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Limpar o intervalo de OCR",
|
"清除OCR范围": "Limpar o intervalo de OCR",
|
||||||
"重命名": "renomear",
|
"重命名": "renomear",
|
||||||
"应用ID": "ID da Aplicação",
|
"应用ID": "ID da Aplicação",
|
||||||
"应用密钥": "Chave da aplicação"
|
"应用密钥": "Chave da aplicação",
|
||||||
|
"无": "nada"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Очистить диапазон OCR",
|
"清除OCR范围": "Очистить диапазон OCR",
|
||||||
"重命名": "Переименовать",
|
"重命名": "Переименовать",
|
||||||
"应用ID": "Использовать ID",
|
"应用ID": "Использовать ID",
|
||||||
"应用密钥": "Применить ключ"
|
"应用密钥": "Применить ключ",
|
||||||
|
"无": "Нет"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Rensa OCR-område",
|
"清除OCR范围": "Rensa OCR-område",
|
||||||
"重命名": "Byt namn",
|
"重命名": "Byt namn",
|
||||||
"应用ID": "Program- ID",
|
"应用ID": "Program- ID",
|
||||||
"应用密钥": "Programnyckel"
|
"应用密钥": "Programnyckel",
|
||||||
|
"无": "ingenting"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "ล้างช่วง OCR",
|
"清除OCR范围": "ล้างช่วง OCR",
|
||||||
"重命名": "เปลี่ยนชื่อ",
|
"重命名": "เปลี่ยนชื่อ",
|
||||||
"应用ID": "สมัคร ID",
|
"应用ID": "สมัคร ID",
|
||||||
"应用密钥": "ใช้คีย์"
|
"应用密钥": "ใช้คีย์",
|
||||||
|
"无": "ไม่มี"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "OCR aralığını temizle",
|
"清除OCR范围": "OCR aralığını temizle",
|
||||||
"重命名": "Yeniden Adlandır",
|
"重命名": "Yeniden Adlandır",
|
||||||
"应用ID": "Uygulama Kimliği",
|
"应用ID": "Uygulama Kimliği",
|
||||||
"应用密钥": "Uygulama anahtarı"
|
"应用密钥": "Uygulama anahtarı",
|
||||||
|
"无": "Hiçbir şey yok."
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Очистити діапазон OCR",
|
"清除OCR范围": "Очистити діапазон OCR",
|
||||||
"重命名": "перейменувати",
|
"重命名": "перейменувати",
|
||||||
"应用ID": "ІД програми",
|
"应用ID": "ІД програми",
|
||||||
"应用密钥": "Ключ програми"
|
"应用密钥": "Ключ програми",
|
||||||
|
"无": "нічого"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "Xóa dải OCR",
|
"清除OCR范围": "Xóa dải OCR",
|
||||||
"重命名": "Thay tên",
|
"重命名": "Thay tên",
|
||||||
"应用ID": "Ứng dụng ID",
|
"应用ID": "Ứng dụng ID",
|
||||||
"应用密钥": "Khóa ứng dụng"
|
"应用密钥": "Khóa ứng dụng",
|
||||||
|
"无": "Không"
|
||||||
}
|
}
|
@ -810,5 +810,6 @@
|
|||||||
"清除OCR范围": "",
|
"清除OCR范围": "",
|
||||||
"重命名": "",
|
"重命名": "",
|
||||||
"应用ID": "",
|
"应用ID": "",
|
||||||
"应用密钥": ""
|
"应用密钥": "",
|
||||||
|
"无": ""
|
||||||
}
|
}
|
@ -29,7 +29,7 @@ include(generate_product_version)
|
|||||||
|
|
||||||
set(VERSION_MAJOR 5)
|
set(VERSION_MAJOR 5)
|
||||||
set(VERSION_MINOR 53)
|
set(VERSION_MINOR 53)
|
||||||
set(VERSION_PATCH 10)
|
set(VERSION_PATCH 11)
|
||||||
|
|
||||||
add_library(pch pch.cpp)
|
add_library(pch pch.cpp)
|
||||||
target_precompile_headers(pch PUBLIC pch.h)
|
target_precompile_headers(pch PUBLIC pch.h)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user