From 6bdca35b27cfae7ac779892fc54b0a6bbc20bd26 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Tue, 22 Dec 2015 23:28:40 +0100 Subject: [PATCH] Fix frozen localisation Addresses Bitmessage#737 --- src/bitmessageqt/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 4ee75f34..9aa12571 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -89,7 +89,10 @@ def change_translation(locale): QtGui.QApplication.installTranslator(qmytranslator) qsystranslator = QtCore.QTranslator() - translationpath = os.path.join (str(QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)), 'qt_' + locale) + if shared.frozen: + translationpath = os.path.join (shared.codePath(), 'translations', 'qt_' + locale) + else: + translationpath = os.path.join (str(QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)), 'qt_' + locale) qsystranslator.load(translationpath) QtGui.QApplication.installTranslator(qsystranslator)