Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Jan 8, 2025
1 parent 4615c55 commit dff5960
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions py/LunaTranslator/ocrengines/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ def dodownload(combo: QComboBox, allsupports: list):
return
lang = allsupports[combo.currentIndex()]
gobject.baseobject.openlink(
dynamiclink("{main_server}/Resource/ocr_models/" + lang + ".zip")
dynamiclink("{main_server}") + "/Resource/ocr_models/{}.zip".format(lang)
)


def doinstall(self, allsupports: list, parent, callback):
if not allsupports:
return
f = QFileDialog.getOpenFileName(
parent, filter="model ({})".format(" ".join([_ + ".zip" for _ in allsupports]))
parent, filter="model ({})".format(" ".join(["{}.zip".format(_) for _ in allsupports]))
)
fn = f[0]
if not fn:
Expand All @@ -147,6 +147,7 @@ def question():
formLayout.setContentsMargins(0, 0, 0, 0)
dialog.setLayout(formLayout)
supportlang = LLabel()
supportlang.setWordWrap(True)
formLayout.addRow("当前支持的语言", supportlang)
combo = SuperCombo()
allsupports = []
Expand Down

0 comments on commit dff5960

Please sign in to comment.