Skip to content

Commit 5cac8b1

Browse files
committed
Merge #8291: [util] CopyrightHolders: Check for untranslated substitution
33336e1 [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke)
2 parents 0c8875d + 33336e1 commit 5cac8b1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/util.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -801,11 +801,10 @@ int GetNumCores()
801801

802802
std::string CopyrightHolders(const std::string& strPrefix)
803803
{
804-
std::string strCopyrightHolders = strPrefix + _(COPYRIGHT_HOLDERS);
805-
if (strCopyrightHolders.find("%s") != strCopyrightHolders.npos) {
806-
strCopyrightHolders = strprintf(strCopyrightHolders, _(COPYRIGHT_HOLDERS_SUBSTITUTION));
807-
}
808-
if (strCopyrightHolders.find("Bitcoin Core developers") == strCopyrightHolders.npos) {
804+
std::string strCopyrightHolders = strPrefix + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION));
805+
806+
// Check for untranslated substitution to make sure Bitcoin Core copyright is not removed by accident
807+
if (strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION).find("Bitcoin Core") == std::string::npos) {
809808
strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
810809
}
811810
return strCopyrightHolders;

0 commit comments

Comments
 (0)