From 2b061bed2f6343fc2feb87472afc4c9a051b30a9 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Thu, 28 Sep 2023 15:43:01 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D1=81=D1=82=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D0=B0=D1=80=D1=82=D0=BD=D1=8B=D1=85=20=D0=BA=D0=BD=D0=BE=D0=BF?= =?UTF-8?q?=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- statapp/__main__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/statapp/__main__.py b/statapp/__main__.py index 3005bdb..7f6ccba 100644 --- a/statapp/__main__.py +++ b/statapp/__main__.py @@ -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_()