From da2612d2d9a8a7ed1e9542d2c4a2ce4c78a5b01f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 18 Jan 2022 12:28:57 +0100 Subject: [PATCH] [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. --- src/modules/locale/Config.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/locale/Config.cpp b/src/modules/locale/Config.cpp index 22a942b2a..8593f8385 100644 --- a/src/modules/locale/Config.cpp +++ b/src/modules/locale/Config.cpp @@ -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