diff --git a/src/cutecoin/core/app.py b/src/cutecoin/core/app.py index ca266b27eb0dc05e0d6f04c784917fe53e29826d..5e35e5dd6edcc08a8a7a807ee20b4c804f9924cc 100644 --- a/src/cutecoin/core/app.py +++ b/src/cutecoin/core/app.py @@ -42,6 +42,7 @@ class Application(QObject): :param argv: The argv parameters of the call ''' super().__init__() + self.qapp = qapp self.accounts = {} self.current_account = None self.monitor = None @@ -57,8 +58,10 @@ class Application(QObject): } self.load() + self.switch_language() - translator = QTranslator(qapp) + def switch_language(self): + translator = QTranslator(self.qapp) logging.debug("Loading translations") locale = self.preferences['lang'] QLocale.setDefault(QLocale(locale)) diff --git a/src/cutecoin/gui/preferences.py b/src/cutecoin/gui/preferences.py index 91f0026efef99365da97c6b115bc59a7aea559c1..4adb9860ab47875dd79706e8b444c189f34d8490 100644 --- a/src/cutecoin/gui/preferences.py +++ b/src/cutecoin/gui/preferences.py @@ -20,9 +20,11 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog): ''' def __init__(self, app): - ''' - Constructor - ''' + """ + Init instance + :param cutecoin.core.app.Application app: Application instance + :return: + """ super().__init__() self.setupUi(self) self.app = app