mirror of
https://github.com/shizand/statapp.git
synced 2024-12-23 20:22:58 +03:00
fix: исправлена локализация стандартных кнопок
This commit is contained in:
parent
48ae2644e8
commit
2b061bed2f
@ -1,4 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from PySide2 import QtCore
|
||||||
from PySide2.QtWidgets import QApplication
|
from PySide2.QtWidgets import QApplication
|
||||||
|
|
||||||
from statapp.main_window import MainWindow
|
from statapp.main_window import MainWindow
|
||||||
@ -6,6 +8,13 @@ from statapp.main_window import MainWindow
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
|
translator = QtCore.QTranslator(app)
|
||||||
|
locale = QtCore.QLocale.system().name()
|
||||||
|
path = QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)
|
||||||
|
translator.load('qt_%s' % locale, path)
|
||||||
|
app.installTranslator(translator)
|
||||||
|
|
||||||
window = MainWindow()
|
window = MainWindow()
|
||||||
window.show()
|
window.show()
|
||||||
return app.exec_()
|
return app.exec_()
|
||||||
|
Loading…
Reference in New Issue
Block a user