Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
test123456654321 committed Oct 25, 2024
1 parent a01be4e commit f2aef8a
Show file tree
Hide file tree
Showing 24 changed files with 51 additions and 142 deletions.
39 changes: 19 additions & 20 deletions src/LunaTranslator/gui/dialog_savedgame_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,18 +575,17 @@ def __init__(self) -> None:
def menu(self, _1, _):
menu = QMenu(self)

setimage = LAction(("设为封面"))
setimage = LAction("设为封面")
curr = savehook_new_data[self.k]["currentvisimage"]
curricon = savehook_new_data[self.k].get("currenticon")
if curr == curricon:
seticon = LAction(("还原图标"))
else:
seticon = LAction(("设为图标"))
deleteimage = LAction(("删除图片"))
copyimage = LAction(("复制图片"))
deleteimage_x = LAction(("删除图片文件"))
hualang = LAction(("画廊"))
pos = LAction(("位置"))
seticon = LAction("设为图标")
seticon.setCheckable(True)
seticon.setChecked(curr != curricon)
deleteimage = LAction("删除图片")
copyimage = LAction("复制图片")
deleteimage_x = LAction("删除图片文件")
hualang = LAction("画廊")
pos = LAction("位置")
if curr and os.path.exists(curr):
menu.addAction(setimage)
menu.addAction(seticon)
Expand Down Expand Up @@ -708,11 +707,11 @@ def newline(self, res):
def stack_showmenu(self, p):
menu = QMenu(self)

addlist = LAction(("创建列表"))
startgame = LAction(("开始游戏"))
delgame = LAction(("删除游戏"))
opendir = LAction(("打开目录"))
addtolist = LAction(("添加到列表"))
addlist = LAction("创建列表")
startgame = LAction("开始游戏")
delgame = LAction("删除游戏")
opendir = LAction("打开目录")
addtolist = LAction("添加到列表")
if not self.currentfocusuid:

menu.addAction(addlist)
Expand Down Expand Up @@ -926,13 +925,13 @@ def tagbuttonmenu(self, tagid):
self.currentfocusuid = None
self.reftagid = tagid
menu = QMenu(self)
editname = LAction(("修改列表名称"))
addlist = LAction(("创建列表"))
dellist = LAction(("删除列表"))
editname = LAction("修改列表名称")
addlist = LAction("创建列表")
dellist = LAction("删除列表")
Upaction = LAction("上移")
Downaction = LAction("下移")
addgame = LAction(("添加游戏"))
batchadd = LAction(("批量添加"))
addgame = LAction("添加游戏")
batchadd = LAction("批量添加")
menu.addAction(Upaction)
menu.addAction(Downaction)
menu.addSeparator()
Expand Down
40 changes: 22 additions & 18 deletions src/LunaTranslator/gui/showword.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,38 +858,42 @@ def showmenu(self, _):
copy = LAction("复制")
search = LAction("查词")
label = LAction("标记")
delabel = LAction("去除标记")
label.setCheckable(True)
menu.addAction(copy)
if isw:
menu.addAction(search)
if idx.data(isLabeleddWord):
menu.addAction(delabel)
else:
menu.addAction(label)
menu.addAction(label)
label.setChecked(bool(idx.data(isLabeleddWord)))
action = menu.exec(QCursor.pos())
if action == search:
self.model.onDoubleClicked(idx)
elif copy == action:
winsharedutils.clipboard_set(item.text())
elif action == label:
item.setData(True, isLabeleddWord)
item.setData(QBrush(Qt.GlobalColor.cyan), Qt.ItemDataRole.BackgroundRole)
globalconfig["wordlabel"].append(
(self.model.itemFromIndex(self.model.parent(idx)).text(), item.text())
)

elif action == delabel:
item.setData(False, isLabeleddWord)
item.setData(None, Qt.ItemDataRole.BackgroundRole)
try:
globalconfig["wordlabel"].remove(
if not idx.data(isLabeleddWord):
item.setData(True, isLabeleddWord)
item.setData(
QBrush(Qt.GlobalColor.cyan), Qt.ItemDataRole.BackgroundRole
)
globalconfig["wordlabel"].append(
(
self.model.itemFromIndex(self.model.parent(idx)).text(),
item.text(),
)
)
except:
pass

else:
item.setData(False, isLabeleddWord)
item.setData(None, Qt.ItemDataRole.BackgroundRole)
try:
globalconfig["wordlabel"].remove(
(
self.model.itemFromIndex(self.model.parent(idx)).text(),
item.text(),
)
)
except:
pass

def __init__(self, parent: QWidget):
super(showdiction, self).__init__(parent)
Expand Down
12 changes: 9 additions & 3 deletions src/LunaTranslator/gui/transhist.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ def showmenu(self, tb, p):
qingkong = LAction("清空")
baocun = LAction("保存")
copy = LAction("复制到剪贴板")
hideshowraw = LAction("显示原文" if self.hiderawflag else "不显示原文")
hideshowapi = LAction("显示翻译器名称" if self.hideapiflag else "不显示翻译器名称")
hidetime = LAction("显示时间" if self.hidetime else "不显示时间")
hideshowraw = LAction("显示原文")
hideshowraw.setCheckable(True)
hideshowraw.setChecked(not self.hiderawflag)
hideshowapi = LAction("显示翻译器名称")
hideshowapi.setCheckable(True)
hideshowapi.setChecked(not self.hideapiflag)
hidetime = LAction("显示时间")
hidetime.setCheckable(True)
hidetime.setChecked(not self.hidetime)
scrolltoend = LAction("滚动到最后")
menu.addAction(qingkong)
menu.addAction(baocun)
Expand Down
5 changes: 0 additions & 5 deletions src/files/lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@
"不切换": "لا تبديل",
"将汉字转换成繁体/日式汉字": "تحويل الأحرف الصينية إلى الأحرف الصينية التقليدية / اليابانية",
"选择文本": "اختيار النص",
"不显示原文": "لا يتم عرض النص الأصلي",
"发现": "اكتشف",
"连接超时": "اتصال مهلة",
"搜索匹配的特征(hex)": "البحث عن مطابقة ميزة ( هيكس )",
Expand Down Expand Up @@ -575,7 +574,6 @@
"窗口特效": "نافذة المؤثرات الخاصة",
"网络请求": "طلب شبكة",
"显示时间": "عرض الوقت",
"不显示时间": "لا وقت العرض",
"过滤历史重复": "تصفية التاريخ تكرار",
"缓存条数": "عدد شرائط التخزين المؤقت",
"删除列表": "حذف قائمة",
Expand Down Expand Up @@ -778,10 +776,8 @@
"输出的内容": "المحتوى الناتج",
"选取OCR范围时不透明度": "التعتيم عند اختيار مجموعة التعرف الضوئي على الحروف",
"设为图标": "تعيين رمز",
"还原图标": "استعادة الرموز",
"拉丁语": "اللاتينية",
"显示/隐藏翻译": "إظهار / إخفاء الترجمة",
"不显示翻译器名称": "لا يتم عرض اسم المترجم",
"华为云": "هوا وي يون",
"游戏适配": "لعبة مباراة",
"指定翻译器": "تعيين مترجم",
Expand All @@ -808,6 +804,5 @@
"日志": "سجل .",
"查看": "عرض .",
"标记": "علامة",
"去除标记": "إزالة علامة",
"当前OCR引擎不支持设置语言为自动": "التعرف الضوئي على الحروف المحرك الحالي لا يدعم وضع اللغة التلقائي"
}
5 changes: 0 additions & 5 deletions src/files/lang/cht.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
"过滤尖括号<>": "過濾角括弧 <>",
"Moji辞书": "MOJi 辭書",
"清空": "清空",
"不显示原文": "不顯示原文",
"字体": "字體",
"飞书": "飛書",
"编辑": "編輯",
Expand Down Expand Up @@ -575,7 +574,6 @@
"窗口特效": "視窗特效",
"网络请求": "網路請求",
"显示时间": "顯示時間",
"不显示时间": "不顯示時間",
"过滤历史重复": "過濾歷史重複",
"缓存条数": "快取個數",
"删除列表": "刪除清單",
Expand Down Expand Up @@ -778,10 +776,8 @@
"输出的内容": "輸出的內容",
"选取OCR范围时不透明度": "選取 OCR 範圍時不透明度",
"设为图标": "設為圖示",
"还原图标": "還原圖示",
"拉丁语": "拉丁語",
"显示/隐藏翻译": "顯示/隱藏翻譯",
"不显示翻译器名称": "不顯示翻譯器名稱",
"华为云": "華為雲",
"游戏适配": "遊戲適配",
"指定翻译器": "指定翻譯器",
Expand All @@ -808,6 +804,5 @@
"日志": "日誌",
"查看": "查看",
"标记": "標記",
"去除标记": "去除標記",
"当前OCR引擎不支持设置语言为自动": "當前OCR引擎不支持設定語言為自動"
}
5 changes: 0 additions & 5 deletions src/files/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@
"选择文件夹": "Vybrat složku",
"最短翻译字数": "Minimální počet slov překladu",
"问题反馈": "Zpětná vazba problémů",
"不显示原文": "Nezobrazovat původní text",
"缩放时调整光标速度": "Nastavit rychlost kurzoru při zoomování",
"当前MD5": "Aktuální MD5",
"有道5": "Youdao 5.",
Expand Down Expand Up @@ -584,7 +583,6 @@
"窗口特效": "Efekty oken",
"网络请求": "Žádost o síť",
"显示时间": "Čas zobrazení",
"不显示时间": "Nezobrazovat čas",
"过滤历史重复": "Filtrovat duplicitní historii",
"缓存条数": "Počet položek mezipaměti",
"创建列表": "Vytvořit seznam",
Expand Down Expand Up @@ -778,10 +776,8 @@
"输出的内容": "Výstupní obsah",
"选取OCR范围时不透明度": "Krytí při výběru rozsahu OCR",
"设为图标": "Nastavit jako ikona",
"还原图标": "obnovit ikony",
"拉丁语": "Latinský jazyk",
"显示/隐藏翻译": "Zobrazit/skrýt překlad",
"不显示翻译器名称": "Nezobrazovat jméno překladatele",
"华为云": "Hua Weiyun.",
"游戏适配": "Úprava hry",
"指定翻译器": "Upřesnit překladatele",
Expand All @@ -808,6 +804,5 @@
"日志": "deník",
"查看": "viz",
"标记": "značka",
"去除标记": "Odstranit značení",
"当前OCR引擎不支持设置语言为自动": "Aktuální OCR engine nepodporuje nastavení jazyka na automatické"
}
5 changes: 0 additions & 5 deletions src/files/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@
"选择文件夹": "Ordner auswählen",
"最短翻译字数": "Mindestanzahl von Übersetzungswörtern",
"问题反馈": "Problemfeedback",
"不显示原文": "Originaltext nicht anzeigen",
"缩放时调整光标速度": "Cursor-Geschwindigkeit beim Zoomen anpassen",
"当前MD5": "Aktueller MD5",
"有道5": "Youdao 5.",
Expand Down Expand Up @@ -584,7 +583,6 @@
"窗口特效": "Fenstereffekte",
"网络请求": "Netzwerkanfrage",
"显示时间": "Anzeigezeit",
"不显示时间": "Zeit nicht anzeigen",
"过滤历史重复": "Duplizierter Verlauf herausfiltern",
"缓存条数": "Anzahl der Cache-Einträge",
"创建列表": "Liste erstellen",
Expand Down Expand Up @@ -778,10 +776,8 @@
"输出的内容": "Ausgabeinhalt",
"选取OCR范围时不透明度": "Deckkraft bei Auswahl des OCR-Bereichs",
"设为图标": "Als Symbol festlegen",
"还原图标": "Symbole wiederherstellen",
"拉丁语": "Lateinische Sprache",
"显示/隐藏翻译": "Übersetzung ein-/ausblenden",
"不显示翻译器名称": "Übersetzername nicht anzeigen",
"华为云": "Hua Weiyun",
"游戏适配": "Anpassung des Spiels",
"指定翻译器": "Übersetzer angeben",
Expand All @@ -808,6 +804,5 @@
"日志": "Journal",
"查看": "siehe",
"标记": "Zeichen",
"去除标记": "Markierung entfernen",
"当前OCR引擎不支持设置语言为自动": "Die aktuelle OCR-Engine unterstützt die Einstellung der Sprache auf automatisch nicht"
}
5 changes: 0 additions & 5 deletions src/files/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
"过滤尖括号<>": "Filter Angle Brackets <>",
"Moji辞书": "Moji Dictionary",
"清空": "Clear",
"不显示原文": "Don't Display Original Text",
"字体": "Font",
"飞书": "Feishu",
"编辑": "Edit",
Expand Down Expand Up @@ -574,7 +573,6 @@
"窗口特效": "Window Effect",
"网络请求": "Network Request",
"显示时间": "Display Time",
"不显示时间": "Don't Display Time",
"过滤历史重复": "Filter Historical Duplicates",
"缓存条数": "Number of Cached Items",
"删除列表": "Delete List",
Expand Down Expand Up @@ -778,10 +776,8 @@
"输出的内容": "Output content",
"选取OCR范围时不透明度": "Opacity when selecting OCR range",
"设为图标": "Set as icon",
"还原图标": "restore icons",
"拉丁语": "Latin language",
"显示/隐藏翻译": "Show/Hide Translation",
"不显示翻译器名称": "Do not display translator name",
"华为云": "Hua Weiyun",
"游戏适配": "Game adaptation",
"指定翻译器": "Specify translator",
Expand All @@ -808,6 +804,5 @@
"日志": "journal",
"查看": "see",
"标记": "sign",
"去除标记": "Remove marking",
"当前OCR引擎不支持设置语言为自动": "The current OCR engine does not support setting the language to automatic"
}
5 changes: 0 additions & 5 deletions src/files/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
"过滤尖括号<>": "Soporte puntiagudo de filtro < >",
"Moji辞书": "Moji dict",
"清空": "Vaciado",
"不显示原文": "No muestra el texto original",
"字体": "Fuente",
"飞书": "Libro volador",
"编辑": "Edición",
Expand Down Expand Up @@ -575,7 +574,6 @@
"窗口特效": "Efectos especiales de la ventana",
"网络请求": "Solicitud de red",
"显示时间": "Tiempo de visualización",
"不显示时间": "No muestra el tiempo",
"过滤历史重复": "Filtrar repetición histórica",
"缓存条数": "Número de barras de caché",
"删除列表": "Eliminar lista",
Expand Down Expand Up @@ -778,10 +776,8 @@
"输出的内容": "Contenido exportado",
"选取OCR范围时不透明度": "Opacidad al seleccionar el rango OCR",
"设为图标": "Establecer como icono",
"还原图标": "Restaurar iconos",
"拉丁语": "Latín",
"显示/隐藏翻译": "Mostrar / ocultar traducción",
"不显示翻译器名称": "No se muestra el nombre del traductor",
"华为云": "Hua weiyun",
"游戏适配": "Adaptación del juego",
"指定翻译器": "Especificar traductor",
Expand All @@ -808,6 +804,5 @@
"日志": "Diario",
"查看": "Ver",
"标记": "Marcado",
"去除标记": "Eliminar la marca",
"当前OCR引擎不支持设置语言为自动": "El motor OCR actual no admite configurar el lenguaje a automático"
}
5 changes: 0 additions & 5 deletions src/files/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
"过滤尖括号<>": "Filtrer les crochets d'angle < >",
"Moji辞书": "Moji dict",
"清空": "Vider",
"不显示原文": "Ne pas afficher l'original",
"字体": "Les polices",
"飞书": "Le livre volant",
"编辑": "Modifier",
Expand Down Expand Up @@ -575,7 +574,6 @@
"窗口特效": "Effets spéciaux de fenêtre",
"网络请求": "Demande de réseau",
"显示时间": "Afficher l'heure",
"不显示时间": "Ne pas afficher l'heure",
"过滤历史重复": "Filtrer historique répétition",
"缓存条数": "Nombre de barres de cache",
"删除列表": "Supprimer une liste",
Expand Down Expand Up @@ -778,10 +776,8 @@
"输出的内容": "Contenu de la sortie",
"选取OCR范围时不透明度": "Opacité lorsque la plage OCR est sélectionnée",
"设为图标": "Faire une icône",
"还原图标": "Restaurer les icônes",
"拉丁语": "Latin",
"显示/隐藏翻译": "Afficher / masquer la traduction",
"不显示翻译器名称": "Ne pas afficher le nom du traducteur",
"华为云": "Huawei Cloud",
"游戏适配": "Adaptation du jeu",
"指定翻译器": "Spécifier le traducteur",
Expand All @@ -808,6 +804,5 @@
"日志": "Logs",
"查看": "Voir",
"标记": "Marquage",
"去除标记": "Enlever les marques",
"当前OCR引擎不支持设置语言为自动": "Le moteur OCR actuel ne prend pas en charge le réglage de la langue sur auto"
}
Loading

0 comments on commit f2aef8a

Please sign in to comment.