From d1047ab76e0b073a375f61ad59a3ebd0a45a56a2 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 7 May 2015 16:07:36 +0200 Subject: [PATCH] Use new installTranslator in GreetingPage. --- src/modules/greeting/GreetingPage.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/modules/greeting/GreetingPage.cpp b/src/modules/greeting/GreetingPage.cpp index 42fec2a50..81271c29e 100644 --- a/src/modules/greeting/GreetingPage.cpp +++ b/src/modules/greeting/GreetingPage.cpp @@ -64,7 +64,9 @@ GreetingPage::GreetingPage( QWidget* parent ) isTranslationAvailable = true; ui->languageWidget->setCurrentRow( ui->languageWidget->count() - 1 ); cDebug() << "Initial locale " << thisLocale.name(); - CalamaresUtils::installTranslator( thisLocale.name(), qApp ); + CalamaresUtils::installTranslator( thisLocale, + Calamares::Branding::instance()->translationsPathPrefix(), + qApp ); } } ui->languageWidget->sortItems(); @@ -79,7 +81,9 @@ GreetingPage::GreetingPage( QWidget* parent ) isTranslationAvailable = true; ui->languageWidget->setCurrentRow( i ); cDebug() << "Initial locale " << thisLocale.name(); - CalamaresUtils::installTranslator( thisLocale.name(), qApp ); + CalamaresUtils::installTranslator( thisLocale, + Calamares::Branding::instance()->translationsPathPrefix(), + qApp ); break; } } @@ -95,7 +99,9 @@ GreetingPage::GreetingPage( QWidget* parent ) ui->languageWidget->setCurrentRow( i ); cDebug() << "Translation unavailable, so initial locale set to " << thisLocale.name(); QLocale::setDefault( thisLocale ); - CalamaresUtils::installTranslator( thisLocale.name(), qApp ); + CalamaresUtils::installTranslator( thisLocale, + Calamares::Branding::instance()->translationsPathPrefix(), + qApp ); break; } } @@ -108,7 +114,9 @@ GreetingPage::GreetingPage( QWidget* parent ) cDebug() << "Selected locale" << selectedLocale.name(); QLocale::setDefault( selectedLocale ); - CalamaresUtils::installTranslator( selectedLocale.name(), qApp ); + CalamaresUtils::installTranslator( selectedLocale, + Calamares::Branding::instance()->translationsPathPrefix(), + qApp ); } ); connect( ui->languageWidget, &QListWidget::itemDoubleClicked,