From 782b4699742309c9b4de89c718255331a593cbab Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 7 Sep 2019 12:38:49 +0200 Subject: [PATCH] [locale] Move all the translation work to a single slot --- src/modules/locale/LocalePage.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index f6cdba436..4a48ecde8 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -215,15 +215,7 @@ LocalePage::LocalePage( QWidget* parent ) } ); - CALAMARES_RETRANSLATE( - m_regionLabel->setText( tr( "Region:" ) ); - m_zoneLabel->setText( tr( "Zone:" ) ); - - updateLocaleLabels(); - - m_localeChangeButton->setText( tr( "&Change..." ) ); - m_formatsChangeButton->setText( tr( "&Change..." ) ); - ) + CALAMARES_RETRANSLATE_SLOT( &LocalePage::updateLocaleLabels ) } @@ -234,6 +226,11 @@ LocalePage::~LocalePage() void LocalePage::updateLocaleLabels() { + m_regionLabel->setText( tr( "Region:" ) ); + m_zoneLabel->setText( tr( "Zone:" ) ); + m_localeChangeButton->setText( tr( "&Change..." ) ); + m_formatsChangeButton->setText( tr( "&Change..." ) ); + LocaleConfiguration lc = m_selectedLocaleConfiguration.isEmpty() ? guessLocaleConfiguration() : m_selectedLocaleConfiguration;