Toolbox/Startup.py

changeset 3670
f0cb7579c0b4
parent 3656
441956d8fce5
child 4021
195a471c327b
equal deleted inserted replaced
3669:ac84ac3c0f05 3670:f0cb7579c0b4
20 20
21 import Globals 21 import Globals
22 22
23 import UI.PixmapCache 23 import UI.PixmapCache
24 24
25 from eric5config import getConfig 25 from eric6config import getConfig
26 26
27 27
28 def usage(appinfo, optlen=12): 28 def usage(appinfo, optlen=12):
29 """ 29 """
30 Module function to show the usage information. 30 Module function to show the usage information.
166 166
167 if qVersion() < "5.0.0": 167 if qVersion() < "5.0.0":
168 # set the default encoding for tr() 168 # set the default encoding for tr()
169 QTextCodec.setCodecForTr(QTextCodec.codecForName("utf-8")) 169 QTextCodec.setCodecForTr(QTextCodec.codecForName("utf-8"))
170 170
171 translations = ("qt", "eric5") + translationFiles 171 translations = ("qt", "eric6") + translationFiles
172 loc = Preferences.getUILanguage() 172 loc = Preferences.getUILanguage()
173 if loc is None: 173 if loc is None:
174 return 174 return
175 175
176 if loc == "System": 176 if loc == "System":
185 translator, ok = loadTranslatorForLocale(dirs, tf) 185 translator, ok = loadTranslatorForLocale(dirs, tf)
186 loaded_translators[tf] = translator 186 loaded_translators[tf] = translator
187 if ok: 187 if ok:
188 app.installTranslator(translator) 188 app.installTranslator(translator)
189 else: 189 else:
190 if tf.startswith("eric5"): 190 if tf.startswith("eric6"):
191 loca = None 191 loca = None
192 loc = loca 192 loc = loca
193 else: 193 else:
194 loc = None 194 loc = None
195 return loc 195 return loc
199 app=None, raiseIt=True, installErrorHandler=False): 199 app=None, raiseIt=True, installErrorHandler=False):
200 """ 200 """
201 Module function to start up an application that doesn't need a specialized 201 Module function to start up an application that doesn't need a specialized
202 start up. 202 start up.
203 203
204 This function is used by all of eric5's helper programs. 204 This function is used by all of eric6's helper programs.
205 205
206 @param argv list of commandline parameters (list of strings) 206 @param argv list of commandline parameters (list of strings)
207 @param appinfo dictionary describing the application 207 @param appinfo dictionary describing the application
208 @param mwFactory factory function generating the main widget. This 208 @param mwFactory factory function generating the main widget. This
209 function must accept the following parameter. 209 function must accept the following parameter.

eric ide

mercurial