Skip to content

Commit b2ce2c1

Browse files
committed
Merge pull request #6870
040c0ea Init: Cleanup error and warning strings (MarcoFalke) 6782f58 [trivial] Latest config.guess (MarcoFalke) bf68191 [trivial] rpcnet: fix typo (MarcoFalke) 95f4291 [trivial] Rewrite help text for feature enabled by default (MarcoFalke)
2 parents 2675276 + 040c0ea commit b2ce2c1

File tree

5 files changed

+18
-19
lines changed

5 files changed

+18
-19
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ AC_ARG_ENABLE(tests,
9393
[use_tests=yes])
9494

9595
AC_ARG_ENABLE(bench,
96-
AS_HELP_STRING([--enable-bench],[compile benchmarks (default is yes)]),
96+
AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]),
9797
[use_bench=$enableval],
9898
[use_bench=yes])
9999

depends/config.guess

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Attempt to guess a canonical system name.
33
# Copyright 1992-2015 Free Software Foundation, Inc.
44

5-
timestamp='2015-09-14'
5+
timestamp='2015-10-21'
66

77
# This file is free software; you can redistribute it and/or modify it
88
# under the terms of the GNU General Public License as published by
@@ -1123,7 +1123,7 @@ EOF
11231123
# uname -m prints for DJGPP always 'pc', but it prints nothing about
11241124
# the processor, so we play safe by assuming i586.
11251125
# Note: whatever this is, it MUST be the same as what config.sub
1126-
# prints for the "djgpp" host, or else GDB configury will decide that
1126+
# prints for the "djgpp" host, or else GDB configure will decide that
11271127
# this is a cross-build.
11281128
echo i586-pc-msdosdjgpp
11291129
exit ;;

doc/translation_strings_policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Try to write translation strings in an understandable way, for both the user and
5252
### Do not translate internal errors
5353

5454
Do not translate internal errors, or log messages, or messages that appear on the RPC interface. If an error is to be shown to the user,
55-
use a generic message, then log the detailed message to the log. E.g. "Error: A fatal internal error occurred, see debug.log for details".
55+
use a translatable generic message, then log the detailed message to the log. E.g. "A fatal internal error occurred, see debug.log for details".
5656
This helps troubleshooting; if the error is the same for everyone, the likelihood is increased that it can be found using a search engine.
5757

5858
### Avoid fragments

src/init.cpp

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -692,13 +692,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
692692
#endif
693693

694694
if (!SetupNetworking())
695-
return InitError("Error: Initializing networking failed");
695+
return InitError("Initializing networking failed");
696696

697697
#ifndef WIN32
698698
if (GetBoolArg("-sysperms", false)) {
699699
#ifdef ENABLE_WALLET
700700
if (!GetBoolArg("-disablewallet", false))
701-
return InitError("Error: -sysperms is not allowed in combination with enabled wallet functionality");
701+
return InitError("-sysperms is not allowed in combination with enabled wallet functionality");
702702
#endif
703703
} else {
704704
umask(077);
@@ -829,16 +829,16 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
829829

830830
// Check for -debugnet
831831
if (GetBoolArg("-debugnet", false))
832-
InitWarning(_("Warning: Unsupported argument -debugnet ignored, use -debug=net."));
832+
InitWarning(_("Unsupported argument -debugnet ignored, use -debug=net."));
833833
// Check for -socks - as this is a privacy risk to continue, exit here
834834
if (mapArgs.count("-socks"))
835-
return InitError(_("Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported."));
835+
return InitError(_("Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported."));
836836
// Check for -tor - as this is a privacy risk to continue, exit here
837837
if (GetBoolArg("-tor", false))
838-
return InitError(_("Error: Unsupported argument -tor found, use -onion."));
838+
return InitError(_("Unsupported argument -tor found, use -onion."));
839839

840840
if (GetBoolArg("-benchmark", false))
841-
InitWarning(_("Warning: Unsupported argument -benchmark ignored, use -debug=bench."));
841+
InitWarning(_("Unsupported argument -benchmark ignored, use -debug=bench."));
842842

843843
// Checkmempool and checkblockindex default to true in regtest mode
844844
int ratio = std::min<int>(std::max<int>(GetArg("-checkmempool", chainparams.DefaultConsistencyChecks() ? 1 : 0), 0), 1000000);
@@ -852,7 +852,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
852852
int64_t nMempoolSizeLimit = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
853853
int64_t nMempoolDescendantSizeLimit = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000;
854854
if (nMempoolSizeLimit < 0 || nMempoolSizeLimit < nMempoolDescendantSizeLimit * 40)
855-
return InitError(strprintf(_("Error: -maxmempool must be at least %d MB"), GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) / 25));
855+
return InitError(strprintf(_("-maxmempool must be at least %d MB"), GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) / 25));
856856

857857
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
858858
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
@@ -921,7 +921,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
921921
if (!ParseMoney(mapArgs["-paytxfee"], nFeePerK))
922922
return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s'"), mapArgs["-paytxfee"]));
923923
if (nFeePerK > nHighTransactionFeeWarning)
924-
InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction."));
924+
InitWarning(_("-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction."));
925925
payTxFee = CFeeRate(nFeePerK, 1000);
926926
if (payTxFee < ::minRelayTxFee)
927927
{
@@ -935,7 +935,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
935935
if (!ParseMoney(mapArgs["-maxtxfee"], nMaxFee))
936936
return InitError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s'"), mapArgs["-maptxfee"]));
937937
if (nMaxFee > nHighTransactionMaxFeeWarning)
938-
InitWarning(_("Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction."));
938+
InitWarning(_("-maxtxfee is set very high! Fees this large could be paid on a single transaction."));
939939
maxTxFee = nMaxFee;
940940
if (CFeeRate(maxTxFee, 1000) < ::minRelayTxFee)
941941
{
@@ -1062,12 +1062,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
10621062
BOOST_FOREACH(string cmt, mapMultiArgs["-uacomment"])
10631063
{
10641064
if (cmt != SanitizeString(cmt, SAFE_CHARS_UA_COMMENT))
1065-
return InitError(strprintf("User Agent comment (%s) contains unsafe characters.", cmt));
1065+
return InitError(strprintf(_("User Agent comment (%s) contains unsafe characters."), cmt));
10661066
uacomments.push_back(SanitizeString(cmt, SAFE_CHARS_UA_COMMENT));
10671067
}
10681068
strSubVersion = FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, uacomments);
10691069
if (strSubVersion.size() > MAX_SUBVERSION_LENGTH) {
1070-
return InitError(strprintf("Total length of network version string %i exceeds maximum of %i characters. Reduce the number and/or size of uacomments.",
1070+
return InitError(strprintf(_("Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments."),
10711071
strSubVersion.size(), MAX_SUBVERSION_LENGTH));
10721072
}
10731073

@@ -1391,9 +1391,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
13911391
strErrors << _("Error loading wallet.dat: Wallet corrupted") << "\n";
13921392
else if (nLoadWalletRet == DB_NONCRITICAL_ERROR)
13931393
{
1394-
string msg(_("Warning: error reading wallet.dat! All keys read correctly, but transaction data"
1394+
InitWarning(_("Error reading wallet.dat! All keys read correctly, but transaction data"
13951395
" or address book entries might be missing or incorrect."));
1396-
InitWarning(msg);
13971396
}
13981397
else if (nLoadWalletRet == DB_TOO_NEW)
13991398
strErrors << _("Error loading wallet.dat: Wallet requires newer version of Bitcoin Core") << "\n";

src/rpcnet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ UniValue getconnectioncount(const UniValue& params, bool fHelp)
2929
throw runtime_error(
3030
"getconnectioncount\n"
3131
"\nReturns the number of connections to other nodes.\n"
32-
"\nbResult:\n"
32+
"\nResult:\n"
3333
"n (numeric) The connection count\n"
3434
"\nExamples:\n"
3535
+ HelpExampleCli("getconnectioncount", "")
@@ -83,7 +83,7 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp)
8383
throw runtime_error(
8484
"getpeerinfo\n"
8585
"\nReturns data about each connected network node as a json array of objects.\n"
86-
"\nbResult:\n"
86+
"\nResult:\n"
8787
"[\n"
8888
" {\n"
8989
" \"id\": n, (numeric) Peer index\n"

0 commit comments

Comments
 (0)