Use Retranslator in Prepare module (partial).
This commit is contained in:
parent
e5ac1a5c4f
commit
9b2dfdf1ec
@ -21,6 +21,7 @@
|
|||||||
#include "PrepareCheckWidget.h"
|
#include "PrepareCheckWidget.h"
|
||||||
|
|
||||||
#include "utils/CalamaresUtilsGui.h"
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
|
#include "utils/Retranslator.h"
|
||||||
#include "Branding.h"
|
#include "Branding.h"
|
||||||
|
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
@ -33,8 +34,10 @@ PreparePage::PreparePage( QWidget* parent )
|
|||||||
QBoxLayout *mainLayout = new QVBoxLayout;
|
QBoxLayout *mainLayout = new QVBoxLayout;
|
||||||
setLayout( mainLayout );
|
setLayout( mainLayout );
|
||||||
|
|
||||||
QLabel* text = new QLabel( tr( "For best results, please ensure that this "
|
QLabel* text = new QLabel( this );
|
||||||
"computer:" ), this );
|
CALAMARES_RETRANSLATE(
|
||||||
|
text->setText( tr( "For best results, please ensure that this computer:" ) );
|
||||||
|
)
|
||||||
|
|
||||||
mainLayout->addSpacing( CalamaresUtils::defaultFontHeight() );
|
mainLayout->addSpacing( CalamaresUtils::defaultFontHeight() );
|
||||||
mainLayout->addWidget( text );
|
mainLayout->addWidget( text );
|
||||||
@ -88,24 +91,27 @@ PreparePage::init( const QList< PrepareEntry >& checkEntries )
|
|||||||
iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::Fail,
|
iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::Fail,
|
||||||
CalamaresUtils::Original,
|
CalamaresUtils::Original,
|
||||||
iconLabel->size() ) );
|
iconLabel->size() ) );
|
||||||
textLabel->setText( tr( "This computer does not satisfy the minimum "
|
CALAMARES_RETRANSLATE(
|
||||||
"requirements for installing %1.\n"
|
textLabel->setText( tr( "This computer does not satisfy the minimum "
|
||||||
"Installation cannot continue." )
|
"requirements for installing %1.\n"
|
||||||
|
"Installation cannot continue." )
|
||||||
.arg( Calamares::Branding::instance()->
|
.arg( Calamares::Branding::instance()->
|
||||||
string( Calamares::Branding::ShortVersionedName ) ) );
|
string( Calamares::Branding::ShortVersionedName ) ) );
|
||||||
|
)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::Information,
|
iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::Information,
|
||||||
CalamaresUtils::Original,
|
CalamaresUtils::Original,
|
||||||
iconLabel->size() ) );
|
iconLabel->size() ) );
|
||||||
textLabel->setText( tr( "This computer does not satisfy some of the "
|
CALAMARES_RETRANSLATE(
|
||||||
"recommended requirements for installing %1.\n"
|
textLabel->setText( tr( "This computer does not satisfy some of the "
|
||||||
"Installation can continue, but some features "
|
"recommended requirements for installing %1.\n"
|
||||||
"might be disabled." )
|
"Installation can continue, but some features "
|
||||||
|
"might be disabled." )
|
||||||
.arg( Calamares::Branding::instance()->
|
.arg( Calamares::Branding::instance()->
|
||||||
string( Calamares::Branding::ShortVersionedName ) ) );
|
string( Calamares::Branding::ShortVersionedName ) ) );
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
mainLayout->insertLayout( mainLayout->count(), infoLayout );
|
mainLayout->insertLayout( mainLayout->count(), infoLayout );
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "widgets/WaitingWidget.h"
|
#include "widgets/WaitingWidget.h"
|
||||||
#include "utils/CalamaresUtilsGui.h"
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
#include "utils/Retranslator.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
|
|
||||||
@ -47,8 +48,9 @@ PrepareViewStep::PrepareViewStep( QObject* parent )
|
|||||||
m_widget->setLayout( mainLayout );
|
m_widget->setLayout( mainLayout );
|
||||||
CalamaresUtils::unmarginLayout( mainLayout );
|
CalamaresUtils::unmarginLayout( mainLayout );
|
||||||
|
|
||||||
QWidget* waitingWidget = new WaitingWidget( tr( "Gathering system information..." ) );
|
WaitingWidget* waitingWidget = new WaitingWidget( QString() );
|
||||||
mainLayout->addWidget( waitingWidget );
|
mainLayout->addWidget( waitingWidget );
|
||||||
|
CALAMARES_RETRANSLATE( waitingWidget->setText( tr( "Gathering system information..." ) ); )
|
||||||
|
|
||||||
QTimer* timer = new QTimer;
|
QTimer* timer = new QTimer;
|
||||||
timer->setSingleShot( true );
|
timer->setSingleShot( true );
|
||||||
|
Loading…
Reference in New Issue
Block a user