From 9ad46eca55cfcadde14ed06aea211d4d2bc3f303 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 7 Jun 2017 03:52:44 +0600 Subject: [PATCH] Locale: when entering page, guess language. If user picks an installer language on the welcome page, then the system language follows that setting -- but only after the first action where Calamares must guess the system language based on location. So guess on entry, so that system language follows installer language. FIXES #688. --- src/modules/locale/LocalePage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index 6f4d5c3e3..a54a96b2e 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -419,6 +419,13 @@ void LocalePage::onActivate() { m_regionCombo->setFocus(); + if ( m_selectedLocaleConfiguration.isEmpty() || + !m_selectedLocaleConfiguration.explicit_lang ) + { + auto newLocale = guessLocaleConfiguration(); + m_selectedLocaleConfiguration.lang = newLocale.lang; + updateLocaleLabels(); + } }