Skip to content

Commit fa64b94

Browse files
author
MarcoFalke
committed
util: No translation of Bitcoin Core in the copyright
1 parent fab8520 commit fa64b94

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/util/system.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,10 +1188,11 @@ int GetNumCores()
11881188

11891189
std::string CopyrightHolders(const std::string& strPrefix)
11901190
{
1191-
std::string strCopyrightHolders = strPrefix + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION));
1191+
const auto copyright_devs = strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION);
1192+
std::string strCopyrightHolders = strPrefix + copyright_devs;
11921193

1193-
// Check for untranslated substitution to make sure Bitcoin Core copyright is not removed by accident
1194-
if (strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION).find("Bitcoin Core") == std::string::npos) {
1194+
// Make sure Bitcoin Core copyright is not removed by accident
1195+
if (copyright_devs.find("Bitcoin Core") == std::string::npos) {
11951196
strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
11961197
}
11971198
return strCopyrightHolders;

test/lint/lint-format-strings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
("src/dbwrapper.cpp", "vsnprintf(p, limit - p, format, backup_ap)"),
1717
("src/index/base.cpp", "FatalError(const char* fmt, const Args&... args)"),
1818
("src/netbase.cpp", "LogConnectFailure(bool manual_connection, const char* fmt, const Args&... args)"),
19-
("src/util/system.cpp", "strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION))"),
20-
("src/util/system.cpp", "strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION)"),
19+
("src/util/system.cpp", "strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION)"),
2120
("src/wallet/wallet.h", "WalletLogPrintf(std::string fmt, Params... parameters)"),
2221
("src/wallet/wallet.h", "LogPrintf((\"%s \" + fmt).c_str(), GetDisplayName(), parameters...)"),
2322
("src/logging.h", "LogPrintf(const char* fmt, const Args&... args)"),

0 commit comments

Comments
 (0)