Skip to content

Commit

Permalink
Fix musescore#7970: Help > About... Replace link to donate page, chan…
Browse files Browse the repository at this point in the history
…ge text, say GPL version, say build etc.

and keep HTML out of translatable text as far as possible
  • Loading branch information
Jojo-Schmitz committed Apr 28, 2021
1 parent 79e3fd3 commit 3d00e3a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/appshell/iappshellconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class IAppShellConfiguration : MODULE_EXPORT_INTERFACE
virtual std::string bugReportUrl() const = 0;
virtual std::string leaveFeedbackUrl() const = 0;
virtual std::string museScoreUrl() const = 0;
virtual std::string museScoreForumUrl() const = 0;
virtual std::string museScoreContributionUrl() const = 0;
virtual std::string musicXMLLicenseUrl() const = 0;
virtual std::string musicXMLLicenseDeedUrl() const = 0;
Expand Down
9 changes: 7 additions & 2 deletions src/appshell/internal/appshellconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static const std::string ONLINE_HANDBOOK_URL("https://musescore.org/redirect/hel
static const std::string ASK_FOR_HELP_URL("https://musescore.org/redirect/post/question?locale=");
static const std::string BUG_REPORT_URL("https://musescore.org/redirect/post/bug-report?locale=");
static const std::string LEAVE_FEEDBACK_URL("https://musescore.com/content/editor-feedback?");
static const std::string MUSESCORE_URL("http://www.musescore.org/");
static const std::string MUSESCORE_URL("https://www.musescore.org/");
static const std::string MUSICXML_LICENSE_URL("https://www.w3.org/community/about/process/final/");
static const std::string MUSICXML_LICENSE_DEED_URL("https://www.w3.org/community/about/process/fsa-deed/");

Expand Down Expand Up @@ -147,9 +147,14 @@ std::string AppShellConfiguration::museScoreUrl() const
return MUSESCORE_URL + languageCode;
}

std::string AppShellConfiguration::museScoreForumUrl() const
{
return MUSESCORE_URL + "forum";
}

std::string AppShellConfiguration::museScoreContributionUrl() const
{
return museScoreUrl() + "/donate";
return MUSESCORE_URL + "contribute";
}

std::string AppShellConfiguration::musicXMLLicenseUrl() const
Expand Down
1 change: 1 addition & 0 deletions src/appshell/internal/appshellconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class AppShellConfiguration : public IAppShellConfiguration
std::string bugReportUrl() const override;
std::string leaveFeedbackUrl() const override;
std::string museScoreUrl() const override;
std::string museScoreForumUrl() const override;
std::string museScoreContributionUrl() const override;
std::string musicXMLLicenseUrl() const override;
std::string musicXMLLicenseDeedUrl() const override;
Expand Down
13 changes: 7 additions & 6 deletions src/appshell/qml/AboutDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,23 @@ QmlDialog {
StyledTextLabel {
Layout.fillWidth: true
text: {
var message = qsTrc("appshell", "Visit <a href='%1'>%2</a> for new versions and more information.<br>Support MuseScore with your <a href='%3'>%4</a>.")
var message = qsTrc("appshell", "Visit %1 for new versions and more information.\nGet %2 with the program or %3 to its development.")
var museScoreUrl = aboutModel.museScoreUrl()
var museScoreForumUrl = aboutModel.museScoreForumUrl()
var museScoreContributionUrl = aboutModel.museScoreContributionUrl()
return message
.arg(museScoreUrl.url)
.arg(museScoreUrl.displayName)
.arg(museScoreContributionUrl.url)
.arg(museScoreContributionUrl.displayName)
.arg("<a href='" + museScoreUrl.url + "'>" + museScoreUrl.displayName + "</a>")
.arg("<a href='" + museScoreForumUrl.url + "'>" + museScoreForumUrl.displayName + "</a>")
.arg("<a href='" + museScoreContributionUrl.url + "'>" + museScoreContributionUrl.displayName + "</a>")
.replace("\n", "<br>")
}
wrapMode: Text.WordWrap
maximumLineCount: 3
}

StyledTextLabel {
Layout.fillWidth: true
text: qsTrc("appshell", "Copyright © 1999-2021 MuseScore BVBA and others.\nPublished under the GNU General Public License.")
text: qsTrc("appshell", "Copyright © 1999-2021 MuseScore BVBA and others.\nPublished under the GNU General Public License version 3.")
enabled: false
wrapMode: Text.WordWrap
maximumLineCount: 3
Expand Down
11 changes: 9 additions & 2 deletions src/appshell/view/aboutmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "aboutmodel.h"

#include "translation.h"
#include "version.h"

#include <QClipboard>
#include <QUrl>
Expand All @@ -36,7 +37,7 @@ AboutModel::AboutModel(QObject* parent)

QString AboutModel::museScoreVersion() const
{
return QString::fromStdString(configuration()->museScoreVersion());
return (mu::framework::Version::unstable() ? qtrc("appshell", "Unstable Prerelease for %1") : "%1").arg(QString::fromStdString(configuration()->museScoreVersion()));
}

QString AboutModel::museScoreRevision() const
Expand All @@ -50,10 +51,16 @@ QVariantMap AboutModel::museScoreUrl() const
return makeUrl(museScoreUrl.toString(), museScoreUrl.host());
}

QVariantMap AboutModel::museScoreForumUrl() const
{
QUrl museScoreUrl(QString::fromStdString(configuration()->museScoreForumUrl()));
return makeUrl(museScoreUrl.toString(), qtrc("appshell", "help"));
}

QVariantMap AboutModel::museScoreContributionUrl() const
{
QUrl museScoreUrl(QString::fromStdString(configuration()->museScoreContributionUrl()));
return makeUrl(museScoreUrl.toString(), qtrc("appshell", "contribution"));
return makeUrl(museScoreUrl.toString(), qtrc("appshell", "contribute"));
}

QVariantMap AboutModel::musicXMLLicenseUrl() const
Expand Down
1 change: 1 addition & 0 deletions src/appshell/view/aboutmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class AboutModel : public QObject
Q_INVOKABLE QString museScoreVersion() const;
Q_INVOKABLE QString museScoreRevision() const;
Q_INVOKABLE QVariantMap museScoreUrl() const;
Q_INVOKABLE QVariantMap museScoreForumUrl() const;
Q_INVOKABLE QVariantMap museScoreContributionUrl() const;

Q_INVOKABLE QVariantMap musicXMLLicenseUrl() const;
Expand Down

0 comments on commit 3d00e3a

Please sign in to comment.