Use Retranslator in LocalePage.
This commit is contained in:
parent
08b90e975b
commit
6f3898a73d
@ -20,6 +20,7 @@
|
||||
|
||||
#include "timezonewidget/timezonewidget.h"
|
||||
#include "SetTimezoneJob.h"
|
||||
#include "utils/Retranslator.h"
|
||||
|
||||
#include <QBoxLayout>
|
||||
#include <QComboBox>
|
||||
@ -119,6 +120,12 @@ LocalePage::LocalePage( QWidget* parent )
|
||||
|
||||
m_blockTzWidgetSet = false;
|
||||
});
|
||||
|
||||
new CalamaresUtils::Retranslator( this, [this]
|
||||
{
|
||||
m_cityLabel->setText( tr( "Region:" ) );
|
||||
m_timezoneLabel->setText( tr( "Zone:" ) );
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
@ -193,26 +200,3 @@ LocalePage::createJobs()
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LocalePage::changeEvent( QEvent* e )
|
||||
{
|
||||
QWidget::changeEvent( e );
|
||||
switch ( e->type() )
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
retranslate();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LocalePage::retranslate()
|
||||
{
|
||||
m_cityLabel->setText( tr( "Region:" ) );
|
||||
m_timezoneLabel->setText( tr( "Zone:" ) );
|
||||
}
|
||||
|
@ -39,12 +39,7 @@ public:
|
||||
|
||||
QList< Calamares::job_ptr > createJobs();
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* e ) override;
|
||||
|
||||
private:
|
||||
void retranslate();
|
||||
|
||||
TimeZoneWidget* m_tzWidget;
|
||||
QComboBox* m_regionCombo;
|
||||
QComboBox* m_timezoneCombo;
|
||||
|
Loading…
Reference in New Issue
Block a user