diff --git a/src/modules/greeting/GreetingPage.cpp b/src/modules/greeting/GreetingPage.cpp
index 42a920b56..f24d9b212 100644
--- a/src/modules/greeting/GreetingPage.cpp
+++ b/src/modules/greeting/GreetingPage.cpp
@@ -77,20 +77,16 @@ GreetingPage::GreetingPage( QWidget* parent )
} );
}
- QLabel* text = new QLabel( tr( "
Welcome to the %1 installer.
"
- "This program will ask you some questions and "
- "set up %2 on your computer." )
- .arg( Calamares::Branding::instance()->
- string( Calamares::Branding::VersionedName ) )
- .arg( Calamares::Branding::instance()->
- string( Calamares::Branding::ProductName ) ), this );
- text->setAlignment( Qt::AlignCenter );
- text->setWordWrap( true );
- text->setOpenExternalLinks( true );
+ m_text = new QLabel( this );
+ m_text->setAlignment( Qt::AlignCenter );
+ m_text->setWordWrap( true );
+ m_text->setOpenExternalLinks( true );
mainLayout->addStretch();
- mainLayout->addWidget( text );
+ mainLayout->addWidget( m_text );
mainLayout->addStretch();
+
+ retranslate();
}
@@ -101,7 +97,7 @@ GreetingPage::changeEvent( QEvent* e )
switch ( e->type() )
{
case QEvent::LanguageChange:
- //TODO: retranslate all widgets
+ retranslate();
break;
default:
@@ -117,3 +113,16 @@ GreetingPage::focusInEvent( QFocusEvent* e )
m_languageWidget->setFocus();
e->accept();
}
+
+
+void
+GreetingPage::retranslate()
+{
+ m_text->setText( tr( "Welcome to the %1 installer.
"
+ "This program will ask you some questions and "
+ "set up %2 on your computer." )
+ .arg( Calamares::Branding::instance()->
+ string( Calamares::Branding::VersionedName ) )
+ .arg( Calamares::Branding::instance()->
+ string( Calamares::Branding::ProductName ) ) );
+}
diff --git a/src/modules/greeting/GreetingPage.h b/src/modules/greeting/GreetingPage.h
index b23bd271a..8c508e6ef 100644
--- a/src/modules/greeting/GreetingPage.h
+++ b/src/modules/greeting/GreetingPage.h
@@ -21,6 +21,7 @@
#include
+class QLabel;
class QListWidget;
class GreetingPage : public QWidget
@@ -34,7 +35,10 @@ protected:
void focusInEvent( QFocusEvent* e ) override; //choose the child widget to focus
private:
+ void retranslate();
+
QListWidget* m_languageWidget;
+ QLabel* m_text;
};
#endif // GREETINGPAGE_H