mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
Use Retranslator in GreetingPage.
This commit is contained in:
parent
e5c3888be2
commit
1d9535053a
2 changed files with 10 additions and 32 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "CalamaresVersion.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/CalamaresUtils.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "ViewManager.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
@ -86,23 +87,15 @@ GreetingPage::GreetingPage( QWidget* parent )
|
|||
mainLayout->addWidget( m_text );
|
||||
mainLayout->addStretch();
|
||||
|
||||
retranslate();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GreetingPage::changeEvent( QEvent* e )
|
||||
{
|
||||
QWidget::changeEvent( e );
|
||||
switch ( e->type() )
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
retranslate();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
CALAMARES_RETRANSLATE(
|
||||
m_text->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>"
|
||||
"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 ) ) );
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
@ -114,15 +107,3 @@ GreetingPage::focusInEvent( QFocusEvent* e )
|
|||
e->accept();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GreetingPage::retranslate()
|
||||
{
|
||||
m_text->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>"
|
||||
"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 ) ) );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue