mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2025-04-25 15:11:02 -04:00
Add base for translating the NUSGet interface via Qt Linguist
This commit is contained in:
parent
2db66af177
commit
dc82790aef
11
NUSGet.py
11
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")))
|
||||
|
3
NUSGet.pyproject
Normal file
3
NUSGet.pyproject
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"files": ["NUSGet.py", "./qt/py/ui_MainMenu.py", "resources/translations/nusget_es.ts"]
|
||||
}
|
BIN
resources/translations/nusget_es.qm
Normal file
BIN
resources/translations/nusget_es.qm
Normal file
Binary file not shown.
115
resources/translations/nusget_es.ts
Normal file
115
resources/translations/nusget_es.ts
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="es_ES">
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="26"/>
|
||||
<source>MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="41"/>
|
||||
<source>Available Titles</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="70"/>
|
||||
<source>Wii</source>
|
||||
<translatorcomment>Does not change.</translatorcomment>
|
||||
<translation>Wii</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="101"/>
|
||||
<source>vWii</source>
|
||||
<translatorcomment>Does not change.</translatorcomment>
|
||||
<translation>vWii</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="132"/>
|
||||
<source>DSi</source>
|
||||
<translatorcomment>Does not change.</translatorcomment>
|
||||
<translation>DSi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="172"/>
|
||||
<source>Title ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="179"/>
|
||||
<source>v</source>
|
||||
<translatorcomment>Does not change.</translatorcomment>
|
||||
<translation>v</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="192"/>
|
||||
<source>Version</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="199"/>
|
||||
<source>Console:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="227"/>
|
||||
<source>Start Download</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="244"/>
|
||||
<source>General Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="251"/>
|
||||
<source>Pack installable archive (WAD/TAD)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="261"/>
|
||||
<source>File Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="268"/>
|
||||
<source>Keep encrypted contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="278"/>
|
||||
<source>Create decrypted contents (*.app)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="288"/>
|
||||
<source>Use local files, if they exist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="295"/>
|
||||
<source>Use the Wii U NUS (faster, only effects Wii/vWii)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="328"/>
|
||||
<source>vWii Title Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="338"/>
|
||||
<source>Re-encrypt title using the Wii Common Key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qt/ui/MainMenu.ui" line="374"/>
|
||||
<source><!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></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
Loading…
x
Reference in New Issue
Block a user