[welcome] Use generated about string
This commit is contained in:
parent
09255a1d9c
commit
4a852facb3
@ -9,6 +9,8 @@
|
||||
|
||||
#include "CalamaresAbout.h"
|
||||
|
||||
#include "CalamaresVersion.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
static const char s_header[]
|
||||
@ -59,15 +61,21 @@ aboutMaintainers()
|
||||
} );
|
||||
}
|
||||
|
||||
static QString
|
||||
substituteVersions( const QString& s )
|
||||
{
|
||||
return s.arg( CALAMARES_APPLICATION_NAME ).arg( CALAMARES_VERSION );
|
||||
}
|
||||
|
||||
const QString
|
||||
Calamares::aboutString()
|
||||
{
|
||||
return QCoreApplication::translate( "AboutData", s_header ) + aboutMaintainers()
|
||||
return substituteVersions( QCoreApplication::translate( "AboutData", s_header ) ) + aboutMaintainers()
|
||||
+ QCoreApplication::translate( "AboutData", s_footer );
|
||||
}
|
||||
|
||||
const QString
|
||||
Calamares::aboutStringUntranslated()
|
||||
{
|
||||
return QString( s_header ) + aboutMaintainers() + QString( s_footer );
|
||||
return substituteVersions( QString( s_header ) ) + aboutMaintainers() + QString( s_footer );
|
||||
}
|
||||
|
@ -16,7 +16,15 @@
|
||||
|
||||
namespace Calamares
|
||||
{
|
||||
/** @brief Returns an about string for the application
|
||||
*
|
||||
* The about string includes a header-statement, a list of maintainer
|
||||
* addresses, and a thank-you to Blue Systems. There is on %-substitution
|
||||
* left, where you can fill in the name of the product (e.g. to say
|
||||
* "Calamares for Netrunner" or ".. for Manjaro").
|
||||
*/
|
||||
DLLEXPORT const QString aboutStringUntranslated();
|
||||
/// @brief As above, but translated in the current Calamares language
|
||||
DLLEXPORT const QString aboutString();
|
||||
} // namespace Calamares
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "ui_WelcomePage.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "CalamaresAbout.h"
|
||||
#include "CalamaresVersion.h"
|
||||
#include "Config.h"
|
||||
#include "Settings.h"
|
||||
@ -235,21 +236,7 @@ WelcomePage::showAboutBox()
|
||||
= Calamares::Settings::instance()->isSetupMode() ? tr( "About %1 setup" ) : tr( "About %1 installer" );
|
||||
QMessageBox mb( QMessageBox::Information,
|
||||
title.arg( CALAMARES_APPLICATION_NAME ),
|
||||
tr( "<h1>%1</h1><br/>"
|
||||
"<strong>%2<br/>"
|
||||
"for %3</strong><br/><br/>"
|
||||
"Copyright 2014-2017 Teo Mrnjavac <teo@kde.org><br/>"
|
||||
"Copyright 2017-2020 Adriaan de Groot <groot@kde.org><br/>"
|
||||
"Thanks to <a href=\"https://calamares.io/team/\">the Calamares team</a> "
|
||||
"and the <a href=\"https://www.transifex.com/calamares/calamares/\">Calamares "
|
||||
"translators team</a>.<br/><br/>"
|
||||
"<a href=\"https://calamares.io/\">Calamares</a> "
|
||||
"development is sponsored by <br/>"
|
||||
"<a href=\"http://www.blue-systems.com/\">Blue Systems</a> - "
|
||||
"Liberating Software." )
|
||||
.arg( CALAMARES_APPLICATION_NAME )
|
||||
.arg( CALAMARES_VERSION )
|
||||
.arg( Calamares::Branding::instance()->versionedName() ),
|
||||
Calamares::aboutString().arg( Calamares::Branding::instance()->versionedName() ),
|
||||
QMessageBox::Ok,
|
||||
this );
|
||||
Calamares::fixButtonLabels( &mb );
|
||||
|
Loading…
Reference in New Issue
Block a user