Merge #8291: [util] CopyrightHolders: Check for untranslated substitution

33336e1 [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke)
This commit is contained in:
Wladimir J. van der Laan 2016-08-31 16:14:43 +02:00
commit 5cac8b123e
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 4 additions and 5 deletions

View File

@ -801,11 +801,10 @@ int GetNumCores()
std::string CopyrightHolders(const std::string& strPrefix)
{
std::string strCopyrightHolders = strPrefix + _(COPYRIGHT_HOLDERS);
if (strCopyrightHolders.find("%s") != strCopyrightHolders.npos) {
strCopyrightHolders = strprintf(strCopyrightHolders, _(COPYRIGHT_HOLDERS_SUBSTITUTION));
}
if (strCopyrightHolders.find("Bitcoin Core developers") == strCopyrightHolders.npos) {
std::string strCopyrightHolders = strPrefix + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION));
// Check for untranslated substitution to make sure Bitcoin Core copyright is not removed by accident
if (strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION).find("Bitcoin Core") == std::string::npos) {
strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
}
return strCopyrightHolders;