From 65ec6fa62acb31db1b5f21692ef819fd3c34cb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sat, 3 Aug 2024 02:33:30 +0800 Subject: [PATCH] del --- .../LunaTranslator/gui/dialog_savedgame.py | 13 +++++++++++-- LunaTranslator/files/lang/ar.json | 3 ++- LunaTranslator/files/lang/cht.json | 3 ++- LunaTranslator/files/lang/cs.json | 3 ++- LunaTranslator/files/lang/de.json | 3 ++- LunaTranslator/files/lang/en.json | 3 ++- LunaTranslator/files/lang/es.json | 3 ++- LunaTranslator/files/lang/fr.json | 3 ++- LunaTranslator/files/lang/it.json | 3 ++- LunaTranslator/files/lang/ja.json | 3 ++- LunaTranslator/files/lang/ko.json | 3 ++- LunaTranslator/files/lang/nl.json | 3 ++- LunaTranslator/files/lang/pl.json | 3 ++- LunaTranslator/files/lang/pt.json | 3 ++- LunaTranslator/files/lang/ru.json | 3 ++- LunaTranslator/files/lang/sv.json | 3 ++- LunaTranslator/files/lang/th.json | 3 ++- LunaTranslator/files/lang/tr.json | 3 ++- LunaTranslator/files/lang/uk.json | 3 ++- LunaTranslator/files/lang/vi.json | 3 ++- LunaTranslator/files/lang/zh.json | 3 ++- 21 files changed, 51 insertions(+), 22 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py index 92978239..cee01beb 100644 --- a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py +++ b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py @@ -2687,7 +2687,7 @@ class previewimages(QWidget): pixmap_ = item.imagepath self.changepixmappath.emit(pixmap_) - def removecurrent(self): + def removecurrent(self, delfile): idx = self.list.currentRow() item = self.list.currentItem() if item is None: @@ -2695,6 +2695,11 @@ class previewimages(QWidget): path = item.imagepath self.removepath.emit(path) self.list.takeItem(idx) + if delfile: + try: + os.remove(path) + except: + pass def resizeEvent(self, e: QResizeEvent): if self.hor: @@ -2970,18 +2975,22 @@ class pixwrapper(QWidget): setimage = LAction(("设为封面")) deleteimage = LAction(("删除图片")) + deleteimage_x = LAction(("删除图片文件")) hualang = LAction(("画廊")) pos = LAction(("位置")) menu.addAction(setimage) menu.addAction(deleteimage) + menu.addAction(deleteimage_x) menu.addAction(hualang) if _1: menu.addSeparator() menu.addAction(pos) action = menu.exec(QCursor.pos()) if action == deleteimage: - self.removecurrent() + self.removecurrent(False) + elif action == deleteimage_x: + self.removecurrent(True) elif action == pos: getselectpos(self, self.switchpos) diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index 44144f3f..0d84493a 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -837,5 +837,6 @@ "当前游戏ID": "معرف اللعبة الحالية", "粘贴": "لصق", "首尾": "الرأس والذيل", - "包含": "احتواء" + "包含": "احتواء", + "删除图片文件": "حذف ملف الصورة" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index a09db12b..754f0455 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -837,5 +837,6 @@ "当前游戏ID": "當前遊戲ID", "粘贴": "粘貼", "首尾": "首尾", - "包含": "包含" + "包含": "包含", + "删除图片文件": "删除圖片檔案" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cs.json b/LunaTranslator/files/lang/cs.json index 2e08fa3b..d9a5e89a 100644 --- a/LunaTranslator/files/lang/cs.json +++ b/LunaTranslator/files/lang/cs.json @@ -837,5 +837,6 @@ "当前游戏ID": "Aktuální ID hry", "粘贴": "pasta", "首尾": "Konec k konci", - "包含": "obsahovat" + "包含": "obsahovat", + "删除图片文件": "Smazat obrázkové soubory" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/de.json b/LunaTranslator/files/lang/de.json index 63c078cc..edcbf57a 100644 --- a/LunaTranslator/files/lang/de.json +++ b/LunaTranslator/files/lang/de.json @@ -837,5 +837,6 @@ "当前游戏ID": "Aktuelle Spiel-ID", "粘贴": "Paste", "首尾": "Ende zu Ende", - "包含": "enthalten" + "包含": "enthalten", + "删除图片文件": "Bilddateien löschen" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index e8abb5bb..096c3914 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -837,5 +837,6 @@ "当前游戏ID": "Current game ID", "粘贴": "paste", "首尾": "End to end", - "包含": "contain" + "包含": "contain", + "删除图片文件": "Delete image files" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index 1d58623f..da8953bb 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -837,5 +837,6 @@ "当前游戏ID": "Id actual del juego", "粘贴": "Pegar", "首尾": "De principio a fin", - "包含": "Contiene" + "包含": "Contiene", + "删除图片文件": "Eliminar archivos de imagen" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index a271f682..f381901b 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -837,5 +837,6 @@ "当前游戏ID": "Id de jeu actuel", "粘贴": "Coller", "首尾": "Première queue", - "包含": "Contient" + "包含": "Contient", + "删除图片文件": "Supprimer un fichier image" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index 640678db..de662446 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -837,5 +837,6 @@ "当前游戏ID": "ID del gioco corrente", "粘贴": "pasta", "首尾": "Fine a fine", - "包含": "contiene" + "包含": "contiene", + "删除图片文件": "Elimina file immagine" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index 67f0655d..99fe4042 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -837,5 +837,6 @@ "当前游戏ID": "現在のゲームID", "粘贴": "貼り付け", "首尾": "首尾", - "包含": "含める" + "包含": "含める", + "删除图片文件": "画像ファイルを削除" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index 6f5f193d..a70484d0 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -837,5 +837,6 @@ "当前游戏ID": "현재 게임 ID", "粘贴": "붙여넣기", "首尾": "수미", - "包含": "포함" + "包含": "포함", + "删除图片文件": "그림 파일 삭제" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/nl.json b/LunaTranslator/files/lang/nl.json index fe6aff05..e5343626 100644 --- a/LunaTranslator/files/lang/nl.json +++ b/LunaTranslator/files/lang/nl.json @@ -837,5 +837,6 @@ "当前游戏ID": "Huidige game-ID", "粘贴": "plakken", "首尾": "End to end", - "包含": "bevatten" + "包含": "bevatten", + "删除图片文件": "Afbeeldingsbestanden verwijderen" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index 6fadde96..a749de31 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -837,5 +837,6 @@ "当前游戏ID": "Aktualny identyfikator gry", "粘贴": "pasta", "首尾": "Koniec do końca", - "包含": "zawierać" + "包含": "zawierać", + "删除图片文件": "Usuń pliki obrazów" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pt.json b/LunaTranslator/files/lang/pt.json index c672cc43..8ee85310 100644 --- a/LunaTranslator/files/lang/pt.json +++ b/LunaTranslator/files/lang/pt.json @@ -837,5 +837,6 @@ "当前游戏ID": "ID do jogo actual", "粘贴": "colar", "首尾": "De ponta a ponta", - "包含": "contém" + "包含": "contém", + "删除图片文件": "Apagar os ficheiros de imagem" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index 516892da..78992697 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -837,5 +837,6 @@ "当前游戏ID": "Текущий идентификатор игры", "粘贴": "Вставить", "首尾": "Голова и хвост", - "包含": "Включение" + "包含": "Включение", + "删除图片文件": "Удалить файл изображения" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/sv.json b/LunaTranslator/files/lang/sv.json index 69c37faf..e7bfbe28 100644 --- a/LunaTranslator/files/lang/sv.json +++ b/LunaTranslator/files/lang/sv.json @@ -837,5 +837,6 @@ "当前游戏ID": "Aktuellt spelID", "粘贴": "klistra", "首尾": "Slut till slut", - "包含": "innehåller" + "包含": "innehåller", + "删除图片文件": "Ta bort bildfiler" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index 1a0c36b6..5dc2eda5 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -837,5 +837,6 @@ "当前游戏ID": "รหัสเกมปัจจุบัน", "粘贴": "วางบน", "首尾": "หัวหาง", - "包含": "ประกอบด้วย" + "包含": "ประกอบด้วย", + "删除图片文件": "ลบไฟล์รูปภาพ" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index 9a4411c4..5b77c9dc 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -837,5 +837,6 @@ "当前游戏ID": "Şimdiki oyun kimliği", "粘贴": "Yapıştır", "首尾": "Sonuna kadar", - "包含": "içerir" + "包含": "içerir", + "删除图片文件": "Resim dosyalarını sil" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index 2f212399..56e3f12a 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -837,5 +837,6 @@ "当前游戏ID": "Поточний ідентифікатор гри", "粘贴": "вставити", "首尾": "Кінець до кінця", - "包含": "містити" + "包含": "містити", + "删除图片文件": "Вилучити файли зображення" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index 42dcfa6d..84b0c7c2 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -837,5 +837,6 @@ "当前游戏ID": "ID game hiện tại", "粘贴": "Dán", "首尾": "Trang chủ", - "包含": "Bao gồm" + "包含": "Bao gồm", + "删除图片文件": "Xoá tập tin ảnh" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index 0b13083b..3874975d 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -837,5 +837,6 @@ "当前游戏ID": "", "粘贴": "", "首尾": "", - "包含": "" + "包含": "", + "删除图片文件": "" } \ No newline at end of file