V0.6 #852

Merged
Atheros1 merged 399 commits from v0.6 into master 2016-05-03 01:58:38 +02:00
Showing only changes of commit eb35f35b83 - Show all commits

View File

@ -69,11 +69,27 @@ def _translate(context, text):
return QtGui.QApplication.translate(context, text)
def change_translation(locale):
global qtranslator
qtranslator = QtCore.QTranslator()
global qmytranslator, qsystranslator
try:
if not qmytranslator.isEmpty():
QtGui.QApplication.removeTranslator(qmytranslator)
except:
pass
try:
if not qsystranslator.isEmpty():
QtGui.QApplication.removeTranslator(qsystranslator)
except:
pass
qmytranslator = QtCore.QTranslator()
translationpath = os.path.join (shared.codePath(), 'translations', 'bitmessage_' + locale)
qtranslator.load(translationpath)
QtGui.QApplication.installTranslator(qtranslator)
qmytranslator.load(translationpath)
QtGui.QApplication.installTranslator(qmytranslator)
qsystranslator = QtCore.QTranslator()
translationpath = os.path.join (str(QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)), 'qt_' + locale)
qsystranslator.load(translationpath)
QtGui.QApplication.installTranslator(qsystranslator)
class MyForm(settingsmixin.SMainWindow):