Fix frozen localisation

Addresses Bitmessage#737
This commit is contained in:
mailchuck 2015-12-22 23:28:40 +01:00
parent d2e107b53c
commit 6bdca35b27
Signed by untrusted user who does not match committer: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -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)