diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-08-31 16:14:43 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-08-31 16:17:00 +0200 |
commit | 5cac8b123e7e76ab0bf41d23a46816345c9926f0 (patch) | |
tree | c992ed911c77dc75ed860c8c4968252302631462 /src | |
parent | 0c8875d23b37bca9e37e0c387ab5365d4e8758c5 (diff) | |
parent | 33336e1aacb36607d0950d681d8e24821e64f8df (diff) | |
download | bitcoin-5cac8b123e7e76ab0bf41d23a46816345c9926f0.tar.xz |
Merge #8291: [util] CopyrightHolders: Check for untranslated substitution
33336e1 [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke)
Diffstat (limited to 'src')
-rw-r--r-- | src/util.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/util.cpp b/src/util.cpp index 9a9209c621..ee12f2b443 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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; |