fix: исправлена локализация стандартных кнопок

This commit is contained in:
Maxim Slipenko 2023-09-28 15:43:01 +03:00
parent 48ae2644e8
commit 2b061bed2f

View File

@ -1,4 +1,6 @@
import sys
from PySide2 import QtCore
from PySide2.QtWidgets import QApplication
from statapp.main_window import MainWindow
@ -6,6 +8,13 @@ from statapp.main_window import MainWindow
def main():
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.show()
return app.exec_()