mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
fix
This commit is contained in:
parent
e05aed69bc
commit
51f0688011
@ -764,16 +764,15 @@ class MAINUI:
|
|||||||
aclass = importlib.import_module("translator." + classname).TS
|
aclass = importlib.import_module("translator." + classname).TS
|
||||||
elif which == 1:
|
elif which == 1:
|
||||||
aclass = importlib.import_module("userconfig.copyed." + classname).TS
|
aclass = importlib.import_module("userconfig.copyed." + classname).TS
|
||||||
|
return aclass(classname)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print_exc()
|
|
||||||
self.displayinfomessage(
|
self.displayinfomessage(
|
||||||
globalconfig["fanyi"][classname]["name"]
|
globalconfig["fanyi"][classname]["name"]
|
||||||
+ " import failed : "
|
+ " import failed : "
|
||||||
+ str(stringfyerror(e)),
|
+ str(stringfyerror(e)),
|
||||||
"<msg_error_not_refresh>",
|
"<msg_error_not_refresh>",
|
||||||
)
|
)
|
||||||
return None
|
raise e
|
||||||
return aclass(classname)
|
|
||||||
|
|
||||||
@threader
|
@threader
|
||||||
def prepare(self, now=None, _=None):
|
def prepare(self, now=None, _=None):
|
||||||
@ -802,17 +801,15 @@ class MAINUI:
|
|||||||
if _type not in globalconfig[rankkey]:
|
if _type not in globalconfig[rankkey]:
|
||||||
globalconfig[rankkey].append(_type)
|
globalconfig[rankkey].append(_type)
|
||||||
else:
|
else:
|
||||||
|
|
||||||
if _type in globalconfig[rankkey]:
|
if _type in globalconfig[rankkey]:
|
||||||
globalconfig[rankkey].remove(_type)
|
globalconfig[rankkey].remove(_type)
|
||||||
|
|
||||||
if not use:
|
|
||||||
|
|
||||||
return
|
return
|
||||||
item = initmethod(_type)
|
item = initmethod(_type)
|
||||||
if item:
|
if item:
|
||||||
dictobject[_type] = item
|
dictobject[_type] = item
|
||||||
except:
|
except:
|
||||||
|
if _type in globalconfig[rankkey]:
|
||||||
|
globalconfig[rankkey].remove(_type)
|
||||||
print_exc()
|
print_exc()
|
||||||
|
|
||||||
@threader
|
@threader
|
||||||
@ -820,13 +817,9 @@ class MAINUI:
|
|||||||
self.commonloader("cishu", self.cishus, self.cishuinitmethod, type_)
|
self.commonloader("cishu", self.cishus, self.cishuinitmethod, type_)
|
||||||
|
|
||||||
def cishuinitmethod(self, type_):
|
def cishuinitmethod(self, type_):
|
||||||
try:
|
|
||||||
aclass = importlib.import_module("cishu." + type_)
|
|
||||||
aclass = getattr(aclass, type_)
|
|
||||||
except:
|
|
||||||
print_exc()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
aclass = importlib.import_module("cishu." + type_)
|
||||||
|
aclass = getattr(aclass, type_)
|
||||||
return aclass(type_)
|
return aclass(type_)
|
||||||
|
|
||||||
def maybesetedittext(self, text):
|
def maybesetedittext(self, text):
|
||||||
|
@ -29,7 +29,7 @@ include(generate_product_version)
|
|||||||
|
|
||||||
set(VERSION_MAJOR 5)
|
set(VERSION_MAJOR 5)
|
||||||
set(VERSION_MINOR 28)
|
set(VERSION_MINOR 28)
|
||||||
set(VERSION_PATCH 2)
|
set(VERSION_PATCH 3)
|
||||||
|
|
||||||
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