summaryrefslogtreecommitdiff
path: root/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp')
-rw-r--r--raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
index 28d3895..617c8c9 100644
--- a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
+++ b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
@@ -140,12 +140,20 @@ void RaveWelcomeViewStep::onLanguageChanged(int index)
Calamares::Locale::Translation::Id tid { localeId };
Calamares::installTranslator(tid, brandingTranslationsPrefix());
- // Store locale in GlobalStorage for the installed system
+ // Store locale in GlobalStorage for the installed system.
+ // The locale module reads gs["localeConf"]["LANG"] via Calamares::Locale::readGS.
if (Calamares::JobQueue::instance())
{
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
if (gs)
- gs->insert("localeLanguage", localeId);
+ {
+ QString fullLocale = QLocale(localeId).name(); // e.g. "hu" -> "hu_HU"
+ if (!fullLocale.contains('.'))
+ fullLocale += ".UTF-8";
+ QVariantMap localeConf = gs->value("localeConf").toMap();
+ localeConf.insert("LANG", fullLocale);
+ gs->insert("localeConf", localeConf);
+ }
}
}