@@ -161,11 +161,6 @@ MainWindow::MainWindow(QApplication& app, QSplashScreen* splash)
161
161
initPaths ();
162
162
163
163
bool startupOK = false ;
164
- this ->sonicPii18n = new SonicPii18n (rootPath ());
165
- std::cout << " Language setting: " << piSettings->language .toUtf8 ().constData () << std::endl;
166
- this ->ui_language = sonicPii18n->determineUILanguage (piSettings->language );
167
- std::cout << " Using language: " << ui_language.toUtf8 ().constData () << std::endl;
168
- this ->i18n = sonicPii18n->loadTranslations (ui_language);
169
164
170
165
#ifdef QT_OLD_API
171
166
// Clear out old tasks from previous sessions if they still exist
@@ -183,15 +178,6 @@ MainWindow::MainWindow(QApplication& app, QSplashScreen* splash)
183
178
std::cout << " [GUI] - ===========================" << std::endl;
184
179
std::cout << " [GUI] - " << std::endl;
185
180
std::cout << " [GUI] - " << guiID.toStdString () << std::endl;
186
- std::cout << " [GUI] - ui locale: " << ui_language.toUtf8 ().constData () << std::endl;
187
- std::cout << " [GUI] - sys locale: " << QLocale::system ().name ().toStdString () << std::endl;
188
-
189
-
190
- if (i18n) {
191
- std::cout << " [GUI] - translations available " << std::endl;
192
- } else {
193
- std::cout << " [GUI] - translations unavailable (using EN)" << std::endl;
194
- }
195
181
196
182
// dynamically discover port numbers and then check them this will
197
183
// show an error dialogue to the user and then kill the app if any of
@@ -201,6 +187,19 @@ MainWindow::MainWindow(QApplication& app, QSplashScreen* splash)
201
187
m_spAPI->Init (rootPath ().toStdString ());
202
188
#endif
203
189
190
+ this ->sonicPii18n = new SonicPii18n (rootPath ());
191
+ std::cout << " [GUI] - Language setting: " << piSettings->language .toUtf8 ().constData () << std::endl;
192
+ std::cout << " [GUI] - System language: " << QLocale::system ().name ().toStdString () << std::endl;
193
+ this ->ui_language = sonicPii18n->determineUILanguage (piSettings->language );
194
+ std::cout << " [GUI] - Using language: " << ui_language.toUtf8 ().constData () << std::endl;
195
+ this ->i18n = sonicPii18n->loadTranslations (ui_language);
196
+
197
+ if (i18n) {
198
+ std::cout << " [GUI] - translations available " << std::endl;
199
+ } else {
200
+ std::cout << " [GUI] - translations unavailable (using EN)" << std::endl;
201
+ }
202
+
204
203
std::cout << " [GUI] - hiding main window" << std::endl;
205
204
hide ();
206
205
0 commit comments