This commit is contained in:
恍兮惚兮 2024-09-20 20:35:22 +08:00
parent 852d944004
commit b2fedcc5a0
24 changed files with 99 additions and 69 deletions

View File

@ -13,8 +13,7 @@ from gui.setting_lang import setTablang
from gui.setting_proxy import setTab_proxy from gui.setting_proxy import setTab_proxy
from gui.setting_transopti import setTab7_lazy, delaysetcomparetext from gui.setting_transopti import setTab7_lazy, delaysetcomparetext
from gui.setting_about import ( from gui.setting_about import (
setTab_aboutlazy, setTab_about,
setTab_update,
versionlabelmaybesettext, versionlabelmaybesettext,
versioncheckthread, versioncheckthread,
) )
@ -105,8 +104,7 @@ class Setting(closeashidewindow):
"快捷按键", "快捷按键",
"语言设置", "语言设置",
"网络设置", "网络设置",
"版本更新", "关于软件",
"资源下载",
], ],
[ [
functools.partial(setTabOne_lazy, self), functools.partial(setTabOne_lazy, self),
@ -118,8 +116,7 @@ class Setting(closeashidewindow):
functools.partial(setTab_quick, self), functools.partial(setTab_quick, self),
functools.partial(setTablang, self), functools.partial(setTablang, self),
functools.partial(setTab_proxy, self), functools.partial(setTab_proxy, self),
functools.partial(setTab_update, self), functools.partial(setTab_about, self),
functools.partial(setTab_aboutlazy, self),
], ],
klass=TabWidget, klass=TabWidget,
delay=True, delay=True,

View File

@ -288,34 +288,7 @@ def setTab_aboutlazy(self, basel):
resourcegrid(self, basel) resourcegrid(self, basel)
def setTab_update(self, basel): def setTab_about1(self, basel):
version = winsharedutils.queryversion(getcurrexe())
if version is None:
versionstring = "unknown"
else:
versionstring = (
f"v{version[0]}.{version[1]}.{version[2]} {platform.architecture()[0]}"
)
grid2 = [
[
"自动更新",
(
D_getsimpleswitch(
globalconfig, "autoupdate", callback=versionchecktask.put
),
0,
),
],
[
"当前版本",
versionstring,
"",
"最新版本",
functools.partial(createversionlabel, self),
"",
],
[(functools.partial(createdownloadprogress, self), 0)],
]
shuominggrid = [ shuominggrid = [
["Github", makehtml("https://github.com/HIllya51/LunaTranslator")], ["Github", makehtml("https://github.com/HIllya51/LunaTranslator")],
@ -329,7 +302,7 @@ def setTab_update(self, basel):
shuominggrid += [ shuominggrid += [
[ [
"交流群", "交流群",
makehtml("{main_server}/Resource/QQGroup", show="QQ群"), makehtml("{main_server}/Resource/QQGroup", show="QQ群963119821"),
], ],
[ [
" ", " ",
@ -356,16 +329,6 @@ def setTab_update(self, basel):
] ]
makescrollgrid( makescrollgrid(
[ [
[
(
dict(
grid=grid2,
type="grid",
),
0,
"group",
)
],
[ [
( (
dict( dict(
@ -378,3 +341,53 @@ def setTab_update(self, basel):
], ],
basel, basel,
) )
def setTab_about(self, basel):
tab_widget, do = makesubtab_lazy(
[
"关于软件",
"版本更新",
"资源下载",
],
[
functools.partial(setTab_about1, self),
functools.partial(setTab_update, self),
functools.partial(setTab_aboutlazy, self),
],
delay=True,
)
basel.addWidget(tab_widget)
do()
def setTab_update(self, basel):
version = winsharedutils.queryversion(getcurrexe())
if version is None:
versionstring = "unknown"
else:
versionstring = (
f"v{version[0]}.{version[1]}.{version[2]} {platform.architecture()[0]}"
)
grid2 = [
[
"自动更新",
(
D_getsimpleswitch(
globalconfig, "autoupdate", callback=versionchecktask.put
),
0,
),
],
[
"当前版本",
versionstring,
"",
"最新版本",
functools.partial(createversionlabel, self),
"",
],
[(functools.partial(createdownloadprogress, self), 0)],
]
makescrollgrid(grid2, basel)

View File

@ -517,10 +517,10 @@ def makehtml(text, show=None):
else: else:
__ = True __ = True
text = dynamiclink(text) text = dynamiclink(text)
if __: if show:
show = text.split("/")[-1]
elif show:
pass pass
elif __:
show = text.split("/")[-1]
else: else:
show = text show = text
return '<a href="{}">{}</a>'.format(text, show) return '<a href="{}">{}</a>'.format(text, show)

View File

@ -823,5 +823,6 @@
"华为云": "هوا وي يون", "华为云": "هوا وي يون",
"逐行匹配": "خط مطابقة", "逐行匹配": "خط مطابقة",
"游戏适配": "لعبة مباراة", "游戏适配": "لعبة مباراة",
"指定翻译器": "تعيين مترجم" "指定翻译器": "تعيين مترجم",
"关于软件": "عن البرمجيات"
} }

View File

@ -823,5 +823,6 @@
"华为云": "華為雲", "华为云": "華為雲",
"逐行匹配": "逐行匹配", "逐行匹配": "逐行匹配",
"游戏适配": "遊戲適配", "游戏适配": "遊戲適配",
"指定翻译器": "指定翻譯器" "指定翻译器": "指定翻譯器",
"关于软件": "關於軟件"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun.", "华为云": "Hua Weiyun.",
"逐行匹配": "Shoda řádku po řádku", "逐行匹配": "Shoda řádku po řádku",
"游戏适配": "Úprava hry", "游戏适配": "Úprava hry",
"指定翻译器": "Upřesnit překladatele" "指定翻译器": "Upřesnit překladatele",
"关于软件": "O softwaru"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun", "华为云": "Hua Weiyun",
"逐行匹配": "Zeile für Zeile übereinstimmen", "逐行匹配": "Zeile für Zeile übereinstimmen",
"游戏适配": "Anpassung des Spiels", "游戏适配": "Anpassung des Spiels",
"指定翻译器": "Übersetzer angeben" "指定翻译器": "Übersetzer angeben",
"关于软件": "Über Software"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun", "华为云": "Hua Weiyun",
"逐行匹配": "Match line by line", "逐行匹配": "Match line by line",
"游戏适配": "Game adaptation", "游戏适配": "Game adaptation",
"指定翻译器": "Specify translator" "指定翻译器": "Specify translator",
"关于软件": "About software"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua weiyun", "华为云": "Hua weiyun",
"逐行匹配": "Coincidencia línea a línea", "逐行匹配": "Coincidencia línea a línea",
"游戏适配": "Adaptación del juego", "游戏适配": "Adaptación del juego",
"指定翻译器": "Especificar traductor" "指定翻译器": "Especificar traductor",
"关于软件": "Sobre el software"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Huawei Cloud", "华为云": "Huawei Cloud",
"逐行匹配": "Correspondance ligne par ligne", "逐行匹配": "Correspondance ligne par ligne",
"游戏适配": "Adaptation du jeu", "游戏适配": "Adaptation du jeu",
"指定翻译器": "Spécifier le traducteur" "指定翻译器": "Spécifier le traducteur",
"关于软件": "À propos du logiciel"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun", "华为云": "Hua Weiyun",
"逐行匹配": "Corrisponda linea per linea", "逐行匹配": "Corrisponda linea per linea",
"游戏适配": "Adattamento del gioco", "游戏适配": "Adattamento del gioco",
"指定翻译器": "Specifica traduttore" "指定翻译器": "Specifica traduttore",
"关于软件": "Informazioni sul software"
} }

View File

@ -823,5 +823,6 @@
"华为云": "華を雲と為す", "华为云": "華を雲と為す",
"逐行匹配": "プログレッシブマッチング", "逐行匹配": "プログレッシブマッチング",
"游戏适配": "ゲームアダプタ", "游戏适配": "ゲームアダプタ",
"指定翻译器": "翻訳機の指定" "指定翻译器": "翻訳機の指定",
"关于软件": "ソフトウェアについて"
} }

View File

@ -823,5 +823,6 @@
"华为云": "화위운", "华为云": "화위운",
"逐行匹配": "행별 일치", "逐行匹配": "행별 일치",
"游戏适配": "게임 적합성", "游戏适配": "게임 적합성",
"指定翻译器": "번역기 지정" "指定翻译器": "번역기 지정",
"关于软件": "소프트웨어 정보"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun.", "华为云": "Hua Weiyun.",
"逐行匹配": "Lijn voor regel overeenkomen", "逐行匹配": "Lijn voor regel overeenkomen",
"游戏适配": "Game aanpassing", "游戏适配": "Game aanpassing",
"指定翻译器": "Vertaler opgeven" "指定翻译器": "Vertaler opgeven",
"关于软件": "Over software"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun.", "华为云": "Hua Weiyun.",
"逐行匹配": "Dopasuj linię po linii", "逐行匹配": "Dopasuj linię po linii",
"游戏适配": "Adaptacja gry", "游戏适配": "Adaptacja gry",
"指定翻译器": "Określ tłumacza" "指定翻译器": "Określ tłumacza",
"关于软件": "O oprogramowaniu"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun", "华为云": "Hua Weiyun",
"逐行匹配": "Corresponder linha por linha", "逐行匹配": "Corresponder linha por linha",
"游戏适配": "Adaptação do jogo", "游戏适配": "Adaptação do jogo",
"指定翻译器": "Especificar o tradutor" "指定翻译器": "Especificar o tradutor",
"关于软件": "Sobre o software"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Хуа как облако", "华为云": "Хуа как облако",
"逐行匹配": "Постепенное согласование", "逐行匹配": "Постепенное согласование",
"游戏适配": "Игра подходит", "游戏适配": "Игра подходит",
"指定翻译器": "Назначить переводчика" "指定翻译器": "Назначить переводчика",
"关于软件": "О программном обеспечении"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun", "华为云": "Hua Weiyun",
"逐行匹配": "Matcha rad för rad", "逐行匹配": "Matcha rad för rad",
"游戏适配": "Spelanpassning", "游戏适配": "Spelanpassning",
"指定翻译器": "Ange översättare" "指定翻译器": "Ange översättare",
"关于软件": "Om programvara"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Huawei เมฆ", "华为云": "Huawei เมฆ",
"逐行匹配": "จับคู่ตามบรรทัด", "逐行匹配": "จับคู่ตามบรรทัด",
"游戏适配": "การปรับเกม", "游戏适配": "การปรับเกม",
"指定翻译器": "ระบุนักแปล" "指定翻译器": "ระบุนักแปล",
"关于软件": "เกี่ยวกับซอฟต์แวร์"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun", "华为云": "Hua Weiyun",
"逐行匹配": "Satırla eşleştir", "逐行匹配": "Satırla eşleştir",
"游戏适配": "Oyun uygulaması", "游戏适配": "Oyun uygulaması",
"指定翻译器": "Çevirmeyi belirtin" "指定翻译器": "Çevirmeyi belirtin",
"关于软件": "Yazılım hakkında"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hua Weiyun", "华为云": "Hua Weiyun",
"逐行匹配": "Порівнювати рядок за рядком", "逐行匹配": "Порівнювати рядок за рядком",
"游戏适配": "Адаптація гри", "游戏适配": "Адаптація гри",
"指定翻译器": "Вкажіть перекладач" "指定翻译器": "Вкажіть перекладач",
"关于软件": "Про програмне забезпечення"
} }

View File

@ -823,5 +823,6 @@
"华为云": "Hoa Vi Vân", "华为云": "Hoa Vi Vân",
"逐行匹配": "Khớp từng dòng", "逐行匹配": "Khớp từng dòng",
"游戏适配": "Trò chơi phù hợp", "游戏适配": "Trò chơi phù hợp",
"指定翻译器": "Chỉ định trình dịch" "指定翻译器": "Chỉ định trình dịch",
"关于软件": "Về phần mềm"
} }

View File

@ -823,5 +823,6 @@
"拉丁语": "", "拉丁语": "",
"华为云": "", "华为云": "",
"逐行匹配": "", "逐行匹配": "",
"指定翻译器": "" "指定翻译器": "",
"关于软件": ""
} }

View File

@ -29,7 +29,7 @@ include(generate_product_version)
set(VERSION_MAJOR 5) set(VERSION_MAJOR 5)
set(VERSION_MINOR 38) set(VERSION_MINOR 38)
set(VERSION_PATCH 4) set(VERSION_PATCH 5)
add_library(pch pch.cpp) add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h) target_precompile_headers(pch PUBLIC pch.h)