From 5d68156dba99a1425abf8079860812a104cf348a Mon Sep 17 00:00:00 2001 From: 283375 Date: Mon, 11 Sep 2023 18:54:45 +0800 Subject: [PATCH] res: combine resource files --- index.py | 3 +-- ui/resources/images/images.qrc | 7 ------- ui/resources/{translations => lang}/__init__.py | 0 ui/resources/{translations => lang}/en_US.ts | 0 .../extract_translations.py => lang/extract.py} | 0 ui/resources/{translations => lang}/zh_CN.ts | 0 ui/resources/resources.qrc | 10 ++++++++++ ui/resources/translations/translations.qrc | 7 ------- 8 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 ui/resources/images/images.qrc rename ui/resources/{translations => lang}/__init__.py (100%) rename ui/resources/{translations => lang}/en_US.ts (100%) rename ui/resources/{translations/extract_translations.py => lang/extract.py} (100%) rename ui/resources/{translations => lang}/zh_CN.ts (100%) create mode 100644 ui/resources/resources.qrc delete mode 100644 ui/resources/translations/translations.qrc diff --git a/index.py b/index.py index a41cbef..4e6689a 100644 --- a/index.py +++ b/index.py @@ -7,8 +7,7 @@ from PySide6.QtCore import QCoreApplication, QLocale from PySide6.QtGui import QIcon from PySide6.QtWidgets import QApplication, QDialog, QMessageBox -import ui.resources.images.images_rc -import ui.resources.translations.translations_rc +import ui.resources.resources_rc from ui.extends.shared.language import changeAppLanguage from ui.extends.shared.settings import Settings from ui.implements.mainwindow import MainWindow diff --git a/ui/resources/images/images.qrc b/ui/resources/images/images.qrc deleted file mode 100644 index 5bf9acd..0000000 --- a/ui/resources/images/images.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - - icon.png - logo.png - - diff --git a/ui/resources/translations/__init__.py b/ui/resources/lang/__init__.py similarity index 100% rename from ui/resources/translations/__init__.py rename to ui/resources/lang/__init__.py diff --git a/ui/resources/translations/en_US.ts b/ui/resources/lang/en_US.ts similarity index 100% rename from ui/resources/translations/en_US.ts rename to ui/resources/lang/en_US.ts diff --git a/ui/resources/translations/extract_translations.py b/ui/resources/lang/extract.py similarity index 100% rename from ui/resources/translations/extract_translations.py rename to ui/resources/lang/extract.py diff --git a/ui/resources/translations/zh_CN.ts b/ui/resources/lang/zh_CN.ts similarity index 100% rename from ui/resources/translations/zh_CN.ts rename to ui/resources/lang/zh_CN.ts diff --git a/ui/resources/resources.qrc b/ui/resources/resources.qrc new file mode 100644 index 0000000..c593707 --- /dev/null +++ b/ui/resources/resources.qrc @@ -0,0 +1,10 @@ + + + + images/icon.png + images/logo.png + + lang/zh_CN.qm + lang/en_US.qm + + diff --git a/ui/resources/translations/translations.qrc b/ui/resources/translations/translations.qrc deleted file mode 100644 index cd974b2..0000000 --- a/ui/resources/translations/translations.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - - zh_CN.qm - en_US.qm - -