mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-07 22:28:02 +02:00
refactor: Move license info into new module
This commit is contained in:
@@ -6,10 +6,8 @@
|
||||
|
||||
#include <clientversion.h>
|
||||
|
||||
#include <util/string.h>
|
||||
#include <util/translation.h>
|
||||
|
||||
#include <tinyformat.h>
|
||||
#include <util/string.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -70,34 +68,3 @@ std::string FormatSubVersion(const std::string& name, int nClientVersion, const
|
||||
if (!comments.empty()) comments_str = strprintf("(%s)", Join(comments, "; "));
|
||||
return strprintf("/%s:%s%s/", name, FormatVersion(nClientVersion), comments_str);
|
||||
}
|
||||
|
||||
std::string CopyrightHolders(const std::string& strPrefix)
|
||||
{
|
||||
const auto copyright_devs = strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION).translated;
|
||||
std::string strCopyrightHolders = strPrefix + copyright_devs;
|
||||
|
||||
// Make sure Bitcoin Core copyright is not removed by accident
|
||||
if (copyright_devs.find("Bitcoin Core") == std::string::npos) {
|
||||
strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
|
||||
}
|
||||
return strCopyrightHolders;
|
||||
}
|
||||
|
||||
std::string LicenseInfo()
|
||||
{
|
||||
const std::string URL_SOURCE_CODE = "<https://github.com/bitcoin/bitcoin>";
|
||||
|
||||
return CopyrightHolders(strprintf(_("Copyright (C) %i-%i"), 2009, COPYRIGHT_YEAR).translated + " ") + "\n" +
|
||||
"\n" +
|
||||
strprintf(_("Please contribute if you find %s useful. "
|
||||
"Visit %s for further information about the software."),
|
||||
CLIENT_NAME, "<" CLIENT_URL ">")
|
||||
.translated +
|
||||
"\n" +
|
||||
strprintf(_("The source code is available from %s."), URL_SOURCE_CODE).translated +
|
||||
"\n" +
|
||||
"\n" +
|
||||
_("This is experimental software.") + "\n" +
|
||||
strprintf(_("Distributed under the MIT software license, see the accompanying file %s or %s"), "COPYING", "<https://opensource.org/license/MIT>").translated +
|
||||
"\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user