Make ProductUrl/ProductUrlText optional.

main
Teo Mrnjavac 10 years ago
parent 00d3205ed3
commit a1e643044e

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <http://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2015, Anke Boersma <demm@kaosx.us>
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -120,20 +121,38 @@ GreetingPage::GreetingPage( QWidget* parent )
ui->mainText->setWordWrap( true ); ui->mainText->setWordWrap( true );
ui->mainText->setOpenExternalLinks( true ); ui->mainText->setOpenExternalLinks( true );
CALAMARES_RETRANSLATE( if ( Calamares::Branding::instance()->
ui->mainText->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>" string( Calamares::Branding::ProductUrl ).isEmpty() ||
"This program will ask you some questions and " Calamares::Branding::instance()->
"set up %2 on your computer." string( Calamares::Branding::ProductUrlText ).isEmpty() )
"<a href=\"%3\"> %4 </a>" ) {
.arg( Calamares::Branding::instance()-> CALAMARES_RETRANSLATE(
string( Calamares::Branding::VersionedName ) ) ui->mainText->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>"
.arg( Calamares::Branding::instance()-> "This program will ask you some questions and "
string( Calamares::Branding::ProductName ) ) "set up %2 on your computer." )
.arg( Calamares::Branding::instance()-> .arg( Calamares::Branding::instance()->
string( Calamares::Branding::ProductURL ) ) string( Calamares::Branding::VersionedName ) )
.arg( Calamares::Branding::instance()-> .arg( Calamares::Branding::instance()->
string( Calamares::Branding::UrlText ) ) ); string( Calamares::Branding::ProductName ) ) );
) )
}
else
{
CALAMARES_RETRANSLATE(
ui->mainText->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>"
"This program will ask you some questions and "
"set up %2 on your computer.<br/>"
"<a href=\"%3\"> %4 </a>" )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::ProductName ) )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::ProductUrl ) )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::ProductUrlText ) ) );
)
}
ui->aboutButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::Information, ui->aboutButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::Information,
CalamaresUtils::Original, CalamaresUtils::Original,

Loading…
Cancel
Save