[locale] Update language always
onActivate of locale updates the language only when currentLocation changed or when onActivate of locale is called for the first time. However, It is irrelevant solution since the language is set by the welcome. So language should be updated always. The language is used by keyboard module to guessing a layout of keyboard. Once you face the locale, you can't change language in the welcome if you don't change the timezone.
This commit is contained in:
parent
2aaaabe152
commit
79a91b486a
@ -252,15 +252,21 @@ Config::setCurrentLocation( const QString& regionName, const QString& zoneName )
|
|||||||
void
|
void
|
||||||
Config::setCurrentLocation( const CalamaresUtils::Locale::TimeZoneData* location )
|
Config::setCurrentLocation( const CalamaresUtils::Locale::TimeZoneData* location )
|
||||||
{
|
{
|
||||||
if ( location != m_currentLocation )
|
bool updateLocation = ( location != m_currentLocation );
|
||||||
|
if ( updateLocation )
|
||||||
{
|
{
|
||||||
m_currentLocation = location;
|
m_currentLocation = location;
|
||||||
// Overwrite those settings that have not been made explicit.
|
}
|
||||||
|
|
||||||
|
// Always lang should be updated
|
||||||
auto newLocale = automaticLocaleConfiguration();
|
auto newLocale = automaticLocaleConfiguration();
|
||||||
if ( !m_selectedLocaleConfiguration.explicit_lang )
|
if ( !m_selectedLocaleConfiguration.explicit_lang )
|
||||||
{
|
{
|
||||||
setLanguage( newLocale.language() );
|
setLanguage( newLocale.language() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( updateLocation )
|
||||||
|
{
|
||||||
if ( !m_selectedLocaleConfiguration.explicit_lc )
|
if ( !m_selectedLocaleConfiguration.explicit_lc )
|
||||||
{
|
{
|
||||||
m_selectedLocaleConfiguration.lc_numeric = newLocale.lc_numeric;
|
m_selectedLocaleConfiguration.lc_numeric = newLocale.lc_numeric;
|
||||||
|
Loading…
Reference in New Issue
Block a user