[welcome] Adjust welcome message to setup-mode
This commit is contained in:
parent
57ccefa1e5
commit
8ee2375ee6
@ -28,6 +28,7 @@
|
|||||||
#include "utils/Retranslator.h"
|
#include "utils/Retranslator.h"
|
||||||
|
|
||||||
#include "modulesystem/ModuleManager.h"
|
#include "modulesystem/ModuleManager.h"
|
||||||
|
#include "Settings.h"
|
||||||
#include "ViewManager.h"
|
#include "ViewManager.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@ -62,8 +63,18 @@ WelcomePage::WelcomePage( QWidget* parent )
|
|||||||
<< *Calamares::Branding::VersionedName;
|
<< *Calamares::Branding::VersionedName;
|
||||||
|
|
||||||
CALAMARES_RETRANSLATE(
|
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>" ))
|
QString message;
|
||||||
.arg( *Calamares::Branding::VersionedName ) );
|
|
||||||
|
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 );
|
ui->retranslateUi( this );
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -74,9 +85,11 @@ WelcomePage::WelcomePage( QWidget* parent )
|
|||||||
connect( ui->aboutButton, &QPushButton::clicked,
|
connect( ui->aboutButton, &QPushButton::clicked,
|
||||||
this, [ this ]
|
this, [ this ]
|
||||||
{
|
{
|
||||||
|
QString title = Calamares::Settings::instance()->isSetupMode()
|
||||||
|
? tr( "About %1 setup" )
|
||||||
|
: tr( "About %1 installer" );
|
||||||
QMessageBox mb( QMessageBox::Information,
|
QMessageBox mb( QMessageBox::Information,
|
||||||
tr( "About %1 installer" )
|
title.arg( CALAMARES_APPLICATION_NAME ),
|
||||||
.arg( CALAMARES_APPLICATION_NAME ),
|
|
||||||
tr(
|
tr(
|
||||||
"<h1>%1</h1><br/>"
|
"<h1>%1</h1><br/>"
|
||||||
"<strong>%2<br/>"
|
"<strong>%2<br/>"
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "ResultWidget.h"
|
#include "ResultWidget.h"
|
||||||
|
|
||||||
#include "Branding.h"
|
#include "Branding.h"
|
||||||
|
#include "Settings.h"
|
||||||
#include "utils/CalamaresUtilsGui.h"
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
#include "utils/Retranslator.h"
|
#include "utils/Retranslator.h"
|
||||||
#include "widgets/FixedAspectRatioLabel.h"
|
#include "widgets/FixedAspectRatioLabel.h"
|
||||||
@ -91,11 +92,16 @@ ResultsListWidget::init( const Calamares::RequirementsList& checkEntries )
|
|||||||
if ( !requirementsSatisfied )
|
if ( !requirementsSatisfied )
|
||||||
{
|
{
|
||||||
CALAMARES_RETRANSLATE(
|
CALAMARES_RETRANSLATE(
|
||||||
textLabel->setText( tr( "This computer does not satisfy the minimum "
|
QString message = Calamares::Settings::instance()->isSetupMode()
|
||||||
"requirements for installing %1.<br/>"
|
? tr( "This computer does not satisfy the minimum "
|
||||||
"Installation cannot continue. "
|
"requirements for setting up %1.<br/>"
|
||||||
"<a href=\"#details\">Details...</a>" )
|
"Setup cannot continue. "
|
||||||
.arg( *Calamares::Branding::ShortVersionedName ) );
|
"<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 );
|
textLabel->setOpenExternalLinks( false );
|
||||||
connect( textLabel, &QLabel::linkActivated,
|
connect( textLabel, &QLabel::linkActivated,
|
||||||
@ -108,11 +114,16 @@ ResultsListWidget::init( const Calamares::RequirementsList& checkEntries )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CALAMARES_RETRANSLATE(
|
CALAMARES_RETRANSLATE(
|
||||||
textLabel->setText( tr( "This computer does not satisfy some of the "
|
QString message = Calamares::Settings::instance()->isSetupMode()
|
||||||
"recommended requirements for installing %1.<br/>"
|
? tr( "This computer does not satisfy some of the "
|
||||||
"Installation can continue, but some features "
|
"recommended requirements for setting up %1.<br/>"
|
||||||
"might be disabled." )
|
"Setup can continue, but some features "
|
||||||
.arg( *Calamares::Branding::ShortVersionedName ) );
|
"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…
Reference in New Issue
Block a user