From e2b8fb0afed3c0df351d8bd1da675149674f2ad1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 07:47:13 -0400 Subject: [PATCH] [welcome] Log if no translations matched at all --- src/modules/welcome/WelcomePage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 852a5bfb9..5781b3a58 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -162,6 +162,7 @@ WelcomePage::initLanguages() QLocale thisLocale = ui->languageWidget->itemData( i, Qt::UserRole ).toLocale(); if ( thisLocale == QLocale( QLocale::English, QLocale::UnitedStates ) ) { + isTranslationAvailable = true; ui->languageWidget->setCurrentIndex( i ); cDebug() << "Translation unavailable, so initial locale set to " << thisLocale.name(); QLocale::setDefault( thisLocale ); @@ -173,6 +174,9 @@ WelcomePage::initLanguages() } } + if ( !isTranslationAvailable ) + cWarning() << "No available translation matched" << defaultLocale; + connect( ui->languageWidget, static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ), this, [ & ]( int newIndex )