Merge branch 'issue-1864' into calamares

FIXES #1864
This commit is contained in:
Adriaan de Groot 2022-01-18 12:39:46 +01:00
commit 546780d7a8
2 changed files with 23 additions and 7 deletions

View File

@ -14,6 +14,7 @@ This release contains contributions from (alphabetically by first name):
- Erik Dubois
- Evan James
- Johannes Kamprad
- Taejun Park (new contributor, welcome!)
**Replacement notice:** The *umount* module will be replaced by a C++
implementation in the next release. The "preserve log file" feature
@ -38,6 +39,10 @@ will be removed in that release. Use the *preservefiles* module instead.
module. (Thanks Erik and Joe for testing) #1851
- *umount* is now marked as an emergency module in the example configuration,
since it should **probably** be run as a cleanup. (Thanks Evan)
- *welcome* and *locale* could be confusing, together, and configure
the target system with a language that does not match the installer
language, even though the user did not make any explicit choice.
(Thanks Taejun) #1864
# 3.2.49.1 (2021-12-11) #

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
@ -252,15 +257,21 @@ Config::setCurrentLocation( const QString& regionName, const QString& zoneName )
void
Config::setCurrentLocation( const CalamaresUtils::Locale::TimeZoneData* location )
{
if ( location != m_currentLocation )
const bool updateLocation = ( location != m_currentLocation );
if ( updateLocation )
{
m_currentLocation = location;
// Overwrite those settings that have not been made explicit.
auto newLocale = automaticLocaleConfiguration();
if ( !m_selectedLocaleConfiguration.explicit_lang )
{
setLanguage( newLocale.language() );
}
}
// lang should be always be updated
auto newLocale = automaticLocaleConfiguration();
if ( !m_selectedLocaleConfiguration.explicit_lang )
{
setLanguage( newLocale.language() );
}
if ( updateLocation )
{
if ( !m_selectedLocaleConfiguration.explicit_lc )
{
m_selectedLocaleConfiguration.lc_numeric = newLocale.lc_numeric;