Install translator for pre-set locale if the UI language is not changed.
Thanks Winfried Kusgörd <w.kusgoerd@arcor.de> for the patch.
This commit is contained in:
parent
9064c31b51
commit
42f0e653cc
@ -61,6 +61,8 @@ GreetingPage::GreetingPage( QWidget* parent )
|
|||||||
{
|
{
|
||||||
isTranslationAvailable = true;
|
isTranslationAvailable = true;
|
||||||
ui->languageWidget->setCurrentRow( ui->languageWidget->count() - 1 );
|
ui->languageWidget->setCurrentRow( ui->languageWidget->count() - 1 );
|
||||||
|
cDebug() << "Initial locale " << thisLocale.name();
|
||||||
|
CalamaresUtils::installTranslator( thisLocale.name(), qApp );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui->languageWidget->sortItems();
|
ui->languageWidget->sortItems();
|
||||||
@ -74,6 +76,8 @@ GreetingPage::GreetingPage( QWidget* parent )
|
|||||||
{
|
{
|
||||||
isTranslationAvailable = true;
|
isTranslationAvailable = true;
|
||||||
ui->languageWidget->setCurrentRow( i );
|
ui->languageWidget->setCurrentRow( i );
|
||||||
|
cDebug() << "Initial locale " << thisLocale.name();
|
||||||
|
CalamaresUtils::installTranslator( thisLocale.name(), qApp );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,6 +91,9 @@ GreetingPage::GreetingPage( QWidget* parent )
|
|||||||
if ( thisLocale == QLocale( QLocale::English, QLocale::UnitedStates ) )
|
if ( thisLocale == QLocale( QLocale::English, QLocale::UnitedStates ) )
|
||||||
{
|
{
|
||||||
ui->languageWidget->setCurrentRow( i );
|
ui->languageWidget->setCurrentRow( i );
|
||||||
|
cDebug() << "Translation unavailable, so initial locale set to " << thisLocale.name();
|
||||||
|
QLocale::setDefault( thisLocale );
|
||||||
|
CalamaresUtils::installTranslator( thisLocale.name(), qApp );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user