Install translator for pre-set locale if the UI language is not changed.

Thanks Winfried Kusgörd <w.kusgoerd@arcor.de> for the patch.
main
Teo Mrnjavac 10 years ago
parent 9064c31b51
commit 42f0e653cc

@ -61,6 +61,8 @@ GreetingPage::GreetingPage( QWidget* parent )
{
isTranslationAvailable = true;
ui->languageWidget->setCurrentRow( ui->languageWidget->count() - 1 );
cDebug() << "Initial locale " << thisLocale.name();
CalamaresUtils::installTranslator( thisLocale.name(), qApp );
}
}
ui->languageWidget->sortItems();
@ -74,6 +76,8 @@ GreetingPage::GreetingPage( QWidget* parent )
{
isTranslationAvailable = true;
ui->languageWidget->setCurrentRow( i );
cDebug() << "Initial locale " << thisLocale.name();
CalamaresUtils::installTranslator( thisLocale.name(), qApp );
break;
}
}
@ -87,6 +91,9 @@ GreetingPage::GreetingPage( QWidget* parent )
if ( thisLocale == QLocale( QLocale::English, QLocale::UnitedStates ) )
{
ui->languageWidget->setCurrentRow( i );
cDebug() << "Translation unavailable, so initial locale set to " << thisLocale.name();
QLocale::setDefault( thisLocale );
CalamaresUtils::installTranslator( thisLocale.name(), qApp );
break;
}
}

Loading…
Cancel
Save