[welcome] Adjust welcome message to setup-mode

main
Adriaan de Groot 6 years ago
parent 57ccefa1e5
commit 8ee2375ee6

@ -28,6 +28,7 @@
#include "utils/Retranslator.h"
#include "modulesystem/ModuleManager.h"
#include "Settings.h"
#include "ViewManager.h"
#include <QApplication>
@ -62,8 +63,18 @@ WelcomePage::WelcomePage( QWidget* parent )
<< *Calamares::Branding::VersionedName;
CALAMARES_RETRANSLATE(
ui->mainText->setText( (Calamares::Branding::instance()->welcomeStyleCalamares() ? tr( "<h1>Welcome to the Calamares installer for %1.</h1>" ) : tr( "<h1>Welcome to the %1 installer.</h1>" ))
.arg( *Calamares::Branding::VersionedName ) );
QString message;
if ( Calamares::Settings::instance()->isSetupMode() )
message = Calamares::Branding::instance()->welcomeStyleCalamares()
? tr( "<h1>Welcome to the Calamares setup program for %1.</h1>" )
: tr( "<h1>Welcome to %1 setup.</h1>" );
else
message = Calamares::Branding::instance()->welcomeStyleCalamares()
? tr( "<h1>Welcome to the Calamares installer for %1.</h1>" )
: tr( "<h1>Welcome to the %1 installer.</h1>" );
ui->mainText->setText( message.arg( *Calamares::Branding::VersionedName ) );
ui->retranslateUi( this );
)
@ -74,9 +85,11 @@ WelcomePage::WelcomePage( QWidget* parent )
connect( ui->aboutButton, &QPushButton::clicked,
this, [ this ]
{
QString title = Calamares::Settings::instance()->isSetupMode()
? tr( "About %1 setup" )
: tr( "About %1 installer" );
QMessageBox mb( QMessageBox::Information,
tr( "About %1 installer" )
.arg( CALAMARES_APPLICATION_NAME ),
title.arg( CALAMARES_APPLICATION_NAME ),
tr(
"<h1>%1</h1><br/>"
"<strong>%2<br/>"

@ -22,6 +22,7 @@
#include "ResultWidget.h"
#include "Branding.h"
#include "Settings.h"
#include "utils/CalamaresUtilsGui.h"
#include "utils/Retranslator.h"
#include "widgets/FixedAspectRatioLabel.h"
@ -91,11 +92,16 @@ ResultsListWidget::init( const Calamares::RequirementsList& checkEntries )
if ( !requirementsSatisfied )
{
CALAMARES_RETRANSLATE(
textLabel->setText( tr( "This computer does not satisfy the minimum "
"requirements for installing %1.<br/>"
"Installation cannot continue. "
"<a href=\"#details\">Details...</a>" )
.arg( *Calamares::Branding::ShortVersionedName ) );
QString message = Calamares::Settings::instance()->isSetupMode()
? tr( "This computer does not satisfy the minimum "
"requirements for setting up %1.<br/>"
"Setup cannot continue. "
"<a href=\"#details\">Details...</a>" )
: tr( "This computer does not satisfy the minimum "
"requirements for installing %1.<br/>"
"Installation cannot continue. "
"<a href=\"#details\">Details...</a>" );
textLabel->setText( message.arg( *Calamares::Branding::ShortVersionedName ) );
)
textLabel->setOpenExternalLinks( false );
connect( textLabel, &QLabel::linkActivated,
@ -108,11 +114,16 @@ ResultsListWidget::init( const Calamares::RequirementsList& checkEntries )
else
{
CALAMARES_RETRANSLATE(
textLabel->setText( tr( "This computer does not satisfy some of the "
"recommended requirements for installing %1.<br/>"
"Installation can continue, but some features "
"might be disabled." )
.arg( *Calamares::Branding::ShortVersionedName ) );
QString message = Calamares::Settings::instance()->isSetupMode()
? tr( "This computer does not satisfy some of the "
"recommended requirements for setting up %1.<br/>"
"Setup can continue, but some features "
"might be disabled." )
: tr( "This computer does not satisfy some of the "
"recommended requirements for installing %1.<br/>"
"Installation can continue, but some features "
"might be disabled." );
textLabel->setText( message.arg( *Calamares::Branding::ShortVersionedName ) );
)
}
}

Loading…
Cancel
Save