diff --git a/NUSGet.py b/NUSGet.py index f5017be..9f39eac 100644 --- a/NUSGet.py +++ b/NUSGet.py @@ -14,7 +14,7 @@ from PySide6.QtGui import QIcon from PySide6.QtWidgets import (QApplication, QMainWindow, QMessageBox, QTreeWidgetItem, QHeaderView, QStyle, QStyleFactory) -from PySide6.QtCore import QRunnable, Slot, QThreadPool, Signal, QObject +from PySide6.QtCore import QRunnable, Slot, QThreadPool, Signal, QObject, QLibraryInfo, QTranslator, QLocale from qt.py.ui_MainMenu import Ui_MainWindow @@ -606,6 +606,15 @@ if __name__ == "__main__": elif "kvantum" in QStyleFactory.keys(): app.setStyle("kvantum") + path = QLibraryInfo.path(QLibraryInfo.LibraryPath.TranslationsPath) + translator = QTranslator(app) + if translator.load(QLocale.system(), 'qtbase', '_', path): + app.installTranslator(translator) + translator = QTranslator(app) + path = 'resources/translations' + if translator.load(QLocale.system(), 'nusget', '_', path): + app.installTranslator(translator) + window = MainWindow() window.setWindowTitle("NUSGet") window.setWindowIcon(QIcon(os.path.join(os.path.dirname(__file__), "resources/icon.png"))) diff --git a/NUSGet.pyproject b/NUSGet.pyproject new file mode 100644 index 0000000..d23a2f6 --- /dev/null +++ b/NUSGet.pyproject @@ -0,0 +1,3 @@ +{ + "files": ["NUSGet.py", "./qt/py/ui_MainMenu.py", "resources/translations/nusget_es.ts"] +} diff --git a/resources/translations/nusget_es.qm b/resources/translations/nusget_es.qm new file mode 100644 index 0000000..aaee3cd Binary files /dev/null and b/resources/translations/nusget_es.qm differ diff --git a/resources/translations/nusget_es.ts b/resources/translations/nusget_es.ts new file mode 100644 index 0000000..cad5091 --- /dev/null +++ b/resources/translations/nusget_es.ts @@ -0,0 +1,115 @@ + + + + + MainWindow + + + MainWindow + + + + + Available Titles + + + + + Wii + Does not change. + Wii + + + + vWii + Does not change. + vWii + + + + DSi + Does not change. + DSi + + + + Title ID + + + + + v + Does not change. + v + + + + Version + + + + + Console: + + + + + Start Download + + + + + General Settings + + + + + Pack installable archive (WAD/TAD) + + + + + File Name + + + + + Keep encrypted contents + + + + + Create decrypted contents (*.app) + + + + + Use local files, if they exist + + + + + Use the Wii U NUS (faster, only effects Wii/vWii) + + + + + vWii Title Settings + + + + + Re-encrypt title using the Wii Common Key + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + +