V0.6 #852
|
@ -67,11 +67,13 @@ def _translate(context, text):
|
||||||
def change_translation(locale):
|
def change_translation(locale):
|
||||||
global qtranslator
|
global qtranslator
|
||||||
qtranslator = QtCore.QTranslator()
|
qtranslator = QtCore.QTranslator()
|
||||||
translationpath = os.path.join(
|
if shared.frozen == "macosx_app":
|
||||||
getattr(sys, '_MEIPASS', sys.path[0]),
|
translationpath = os.environ.get("RESOURCEPATH")
|
||||||
'translations',
|
elif shared.frozen: # windows
|
||||||
'bitmessage_' + locale
|
translationpath = sys._MEIPASS
|
||||||
)
|
else:
|
||||||
|
translationpath = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
translationpath = os.path.join (translationpath, 'translations', 'bitmessage_' + locale)
|
||||||
qtranslator.load(translationpath)
|
qtranslator.load(translationpath)
|
||||||
QtGui.QApplication.installTranslator(qtranslator)
|
QtGui.QApplication.installTranslator(qtranslator)
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user