diff options
| author | Nippy <nippy@Nippy-Mac-mini.local> | 2026-09-26 10:17:41 +0200 |
|---|---|---|
| committer | Nippy <nippy@Nippy-Mac-mini.local> | 2026-09-26 10:17:41 +0200 |
| commit | 0b4dfab576aad0d2b98654f919acc9f1b7ab7f88 (patch) | |
| tree | f893351a3b1f542f38e42cae96739f460b59f907 /raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp | |
| parent | b686f6049f9447a5abe8691729fba20cf8f10f07 (diff) | |
| download | RaveOS-PKGBUILD-0b4dfab576aad0d2b98654f919acc9f1b7ab7f88.tar.gz RaveOS-PKGBUILD-0b4dfab576aad0d2b98654f919acc9f1b7ab7f88.zip | |
calamares fix
Diffstat (limited to 'raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp')
| -rw-r--r-- | raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp index b2108c6..86ab549 100644 --- a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp +++ b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp @@ -55,9 +55,44 @@ RaveWelcomeViewStep::~RaveWelcomeViewStep() QString RaveWelcomeViewStep::prettyName() const { + const QString locale = getLocale(); + if (locale.startsWith("hu")) + { + return QStringLiteral("Üdvözlés"); + } + if (locale.startsWith("de")) + { + return QStringLiteral("Willkommen"); + } return tr("Welcome"); } +QString RaveWelcomeViewStep::getLocale() const +{ + if (Calamares::JobQueue::instance()) + { + Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); + if (gs) + { + if (gs->contains("locale")) + { + const QString loc = gs->value("locale").toString(); + if (!loc.isEmpty()) + return loc; + } + + if (gs->contains("localeConf")) + { + const QString loc = gs->value("localeConf").toMap().value("LANG").toString(); + if (!loc.isEmpty()) + return loc; + } + } + } + + return QLocale::system().name(); +} + void RaveWelcomeViewStep::buildWidget() { auto* bg = new BgWidget(); @@ -141,10 +176,6 @@ void RaveWelcomeViewStep::onLanguageChanged(int index) m_currentLocaleIndex = index; QString localeId = m_localeIds[index]; - // Install new translator - this changes the entire Calamares UI language - Calamares::Locale::Translation::Id tid { localeId }; - Calamares::installTranslator(tid, brandingTranslationsPrefix()); - // Store locale in GlobalStorage for the installed system. // A localecfg a teljes localeConf-ot olvassa, ezért minden LC_* kulcsot // beírunk, ne csak a LANG-ot. @@ -174,6 +205,10 @@ void RaveWelcomeViewStep::onLanguageChanged(int index) } } + // Install new translator - this changes the entire Calamares UI language + Calamares::Locale::Translation::Id tid { localeId }; + Calamares::installTranslator(tid, brandingTranslationsPrefix()); + // Apply the matching live keyboard layout immediately, so the WiFi // password input follows the selected language (before the keyboard page). applyLiveKeyboardLayout(localeId); |