Finish up retranslation in PreparePage.

main
Teo Mrnjavac 10 years ago
parent 280baf7326
commit 0f9496babe

@ -60,7 +60,7 @@ PreparePage::init( const QList< PrepareEntry >& checkEntries )
for ( const PrepareEntry& entry : checkEntries )
{
PrepareCheckWidget* pcw = new PrepareCheckWidget( entry.checked );
pcw->setText( entry.text );
CALAMARES_RETRANSLATE( pcw->setText( entry.text() ); )
m_entriesLayout->addWidget( pcw );
pcw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );

@ -87,30 +87,30 @@ PrepareViewStep::PrepareViewStep( QObject* parent )
if ( entry == "storage" )
checkEntries.append( {
entry,
tr( "has at least %1 GB available drive space" )
.arg( m_requiredStorageGB ),
[this]{ return tr( "has at least %1 GB available drive space" )
.arg( m_requiredStorageGB ); },
enoughStorage,
m_entriesToRequire.contains( entry )
} );
else if ( entry == "ram" )
checkEntries.append( {
entry,
tr( "has at least %1 GB working memory" )
.arg( m_requiredRamGB ),
[this]{ return tr( "has at least %1 GB working memory" )
.arg( m_requiredRamGB ); },
enoughRam,
m_entriesToRequire.contains( entry )
} );
else if ( entry == "power" )
checkEntries.append( {
entry,
tr( "is plugged in to a power source" ),
[this]{ return tr( "is plugged in to a power source" ); },
hasPower,
m_entriesToRequire.contains( entry )
} );
else if ( entry == "internet" )
checkEntries.append( {
entry,
tr( "is connected to the Internet" ),
[this]{ return tr( "is connected to the Internet" ); },
hasInternet,
m_entriesToRequire.contains( entry )
} );

@ -19,18 +19,20 @@
#ifndef PREPAREPAGEPLUGIN_H
#define PREPAREPAGEPLUGIN_H
#include "viewpages/ViewStep.h"
#include "PluginDllMacro.h"
#include <QObject>
#include <QStringList>
#include "viewpages/ViewStep.h"
#include "PluginDllMacro.h"
#include <functional>
class PreparePage;
struct PrepareEntry
{
QString name;
QString text;
std::function< QString() > text;
bool checked;
bool required;
};

Loading…
Cancel
Save