Toolbox/Startup.py

changeset 3193
d425f6251b6b
parent 3190
a9a94491c4fd
child 3484
645c12de6b0c
equal deleted inserted replaced
3192:34689c08f095 3193:d425f6251b6b
8 """ 8 """
9 9
10 import os 10 import os
11 import sys 11 import sys
12 12
13 from PyQt4.QtCore import QTranslator, QLocale, QLibraryInfo, QDir, QTextCodec 13 from PyQt4.QtCore import QTranslator, QLocale, QLibraryInfo, QDir, \
14 QTextCodec, qVersion
14 from PyQt4.QtGui import QApplication 15 from PyQt4.QtGui import QApplication
15 16
16 from E5Gui.E5Application import E5Application 17 from E5Gui.E5Application import E5Application
17 18
18 import Globals 19 import Globals
159 """ 160 """
160 import Preferences 161 import Preferences
161 162
162 global loaded_translators 163 global loaded_translators
163 164
164 # set the default encoding for tr() 165 if qVersion() < "5.0.0":
165 QTextCodec.setCodecForTr(QTextCodec.codecForName("utf-8")) 166 # set the default encoding for tr()
167 QTextCodec.setCodecForTr(QTextCodec.codecForName("utf-8"))
166 168
167 translations = ("qt", "eric5") + translationFiles 169 translations = ("qt", "eric5") + translationFiles
168 loc = Preferences.getUILanguage() 170 loc = Preferences.getUILanguage()
169 if loc is None: 171 if loc is None:
170 return 172 return

eric ide

mercurial