[locale] Update language even if there is a current location

- the first time we arrive at locale, there isn't a current location
  and the setCurrentLocation(...) method ends up calling setLanguage(),
  usually. The second time, this call is skipped (not called from
  the overloaded setCurrentLocation() which is called from onActivate),
  so the language didn't update.
- now call setLanguage() unless there has been one set explicitly.
This commit is contained in:
Adriaan de Groot 2022-01-18 12:28:57 +01:00
parent 85a3d1dc84
commit da2612d2d9

View File

@ -221,6 +221,11 @@ Config::setCurrentLocation()
{
setCurrentLocation( m_startingTimezone.first, m_startingTimezone.second );
}
if ( !m_selectedLocaleConfiguration.explicit_lang )
{
auto newLocale = automaticLocaleConfiguration();
setLanguage( newLocale.language() );
}
}
void