From 60e0dbf4b3725c22fd49ef7d27f93a36f9283390 Mon Sep 17 00:00:00 2001 From: nippy Date: Thu, 13 Aug 2026 17:42:28 +0200 Subject: fix calamares --- raveos-calamares-module/PKGBUILD | 2 +- .../welcome/RaveWelcomeViewStep.cpp | 23 +++++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'raveos-calamares-module') diff --git a/raveos-calamares-module/PKGBUILD b/raveos-calamares-module/PKGBUILD index fbcf1dd..21d8a16 100644 --- a/raveos-calamares-module/PKGBUILD +++ b/raveos-calamares-module/PKGBUILD @@ -1,6 +1,6 @@ pkgname=raveos-calamares-module pkgver=2.0.0 -pkgrel=17 +pkgrel=18 pkgdesc="RaveOS Calamares modules: Wi-Fi, Welcome, Desktop Selector" arch=('x86_64') options=('!debug') diff --git a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp index 617c8c9..6c4e4a3 100644 --- a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp +++ b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp @@ -141,18 +141,31 @@ void RaveWelcomeViewStep::onLanguageChanged(int index) Calamares::installTranslator(tid, brandingTranslationsPrefix()); // Store locale in GlobalStorage for the installed system. - // The locale module reads gs["localeConf"]["LANG"] via Calamares::Locale::readGS. + // A localecfg a teljes localeConf-ot olvassa, ezért minden LC_* kulcsot + // beírunk, ne csak a LANG-ot. if (Calamares::JobQueue::instance()) { Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); if (gs) { - QString fullLocale = QLocale(localeId).name(); // e.g. "hu" -> "hu_HU" - if (!fullLocale.contains('.')) - fullLocale += ".UTF-8"; + QString lang = QLocale(localeId).name(); // e.g. "hu" -> "hu_HU" + if (lang.isEmpty()) + lang = localeId; + QString fullLocale = lang.contains('.') ? lang : lang + ".UTF-8"; + + const char* lcKeys[] = { + "LANG", "LC_NUMERIC", "LC_TIME", "LC_MONETARY", "LC_PAPER", + "LC_NAME", "LC_ADDRESS", "LC_TELEPHONE", "LC_MEASUREMENT", + "LC_IDENTIFICATION" + }; QVariantMap localeConf = gs->value("localeConf").toMap(); - localeConf.insert("LANG", fullLocale); + for (const char* k : lcKeys) + localeConf.insert(QLatin1String(k), fullLocale); gs->insert("localeConf", localeConf); + + // A 'locale' kulcs is kell (nyelv, kódolás nélkül), ha a standard + // locale modul mégis olvasná. + gs->insert("locale", lang); } } } -- cgit v1.3