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. |