From f126679fc166b5e1b9880c032942dd011aa0ebb6 Mon Sep 17 00:00:00 2001 From: laanwj <126646+laanwj@users.noreply.github.com> Date: Tue, 22 Feb 2022 12:38:12 +0100 Subject: [PATCH] (partial) Merge bitcoin/bitcoin#24367: User-facing content and codebase doc fixups from transifex translator feedback 48742693acc9de837735674057c9aae2fe90bd1d Replace "can not" with "cannot" in docs, user messages, and tests (Jon Atack) e670edd43441ecb6e5978d65348501c57d856030 User-facing content fixups from transifex translator feedback (Jon Atack) Pull request description: Closes #24366. ACKs for top commit: laanwj: Code review re-ACK 48742693acc9de837735674057c9aae2fe90bd1d hebasto: re-ACK 48742693acc9de837735674057c9aae2fe90bd1d, only suggested change since my previous [review](https://github.com/bitcoin/bitcoin/pull/24367#pullrequestreview-885938219). Tree-SHA512: 4dcdcb417251a413e65fab6070515e13a1267c8e0dbcf521386b842511391f24c84a0c2168fe13458c977682034466509bf2a3453719d4d94d3c568fd9f4adb4 --- contrib/guix/guix-build | 2 +- doc/developer-notes.md | 4 ++-- src/net.cpp | 2 +- src/qt/bitcoin.cpp | 2 +- src/qt/intro.cpp | 2 +- src/rpc/misc.cpp | 2 +- src/rpc/txoutproof.cpp | 2 +- src/test/util_tests.cpp | 2 +- src/txdb.cpp | 2 +- src/wallet/rpcwallet.cpp | 6 +++--- src/wallet/test/wallet_tests.cpp | 2 +- src/wallet/wallet.cpp | 2 +- test/functional/feature_txindex_compatibility.py | 2 +- test/functional/rpc_decodescript.py | 2 +- test/functional/rpc_uptime.py | 2 +- test/functional/wallet_encryption.py | 6 +++--- test/util/test_runner.py | 2 +- 17 files changed, 22 insertions(+), 22 deletions(-) diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 1fef7400f50420..122c8dc22df1e7 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -194,7 +194,7 @@ fi if ! getent services http https ftp > /dev/null 2>&1; then cat << EOF -ERR: Your system's C library can not find service database entries for at least +ERR: Your system's C library cannot find service database entries for at least one of the following services: http, https, ftp. Hint: Most likely, /etc/services does not exist yet (common for docker images diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 1f3aef04a68395..04013dfcb690ed 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -445,7 +445,7 @@ other input. failure, it will throw an exception, which can be caught to recover from the error. - For example, a nullptr dereference or any other logic bug in RPC code - means that the RPC code is faulty and can not be executed. However, the + means that the RPC code is faulty and cannot be executed. However, the logic bug can be shown to the user and the program can continue to run. * `Assume` should be used to document assumptions when program execution can safely continue even if the assumption is violated. In debug builds it @@ -1352,7 +1352,7 @@ A few guidelines for introducing and reviewing new RPC interfaces: - Don't forget to fill in the argument names correctly in the RPC command table. - - *Rationale*: If not, the call can not be used with name-based arguments. + - *Rationale*: If not, the call cannot be used with name-based arguments. - Add every non-string RPC argument `(method, idx, name)` to the table `vRPCConvertParams` in `rpc/client.cpp`. diff --git a/src/net.cpp b/src/net.cpp index 5b07e5f9bfb1f4..de9a5f74cca470 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -5189,7 +5189,7 @@ void CaptureMessageToFile(const CAddress& addr, // layer (processing) perspective. auto now = GetTime(); - // Windows folder names can not include a colon + // Windows folder names cannot include a colon std::string clean_addr = addr.ToStringAddrPort(); std::replace(clean_addr.begin(), clean_addr.end(), ':', '_'); diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 41f0fbe804e770..e6e75ae37f19cd 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -510,7 +510,7 @@ int GuiMain(int argc, char* argv[]) InitError(strprintf(Untranslated("Error parsing command line arguments: %s\n"), error)); // Create a message box, because the gui has neither been created nor has subscribed to core signals QMessageBox::critical(nullptr, PACKAGE_NAME, - // message can not be translated because translations have not been initialized + // message cannot be translated because translations have not been initialized QString::fromStdString("Error parsing command line arguments: %1.").arg(QString::fromStdString(error))); return EXIT_FAILURE; } diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index a90535acbc4c08..581ede260433ce 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -304,7 +304,7 @@ void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable void Intro::UpdateFreeSpaceLabel() { - QString freeString = tr("%1 GB of free space available").arg(m_bytes_available / GB_BYTES); + QString freeString = tr("%1 GB of space available").arg(m_bytes_available / GB_BYTES); if (m_bytes_available < m_required_space_gb * GB_BYTES) { freeString += " " + tr("(of %1 GB needed)").arg(m_required_space_gb); ui->freeSpace->setStyleSheet(GUIUtil::getThemedStyleQString(GUIUtil::ThemedStyle::TS_ERROR)); diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index a26fa7c5f42656..38f3398d66f3b1 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -499,7 +499,7 @@ static RPCHelpMan setmocktime() RPCTypeCheck(request.params, {UniValue::VNUM}); const int64_t time{request.params[0].get_int64()}; if (time < 0) { - throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Mocktime can not be negative: %s.", time)); + throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Mocktime cannot be negative: %s.", time)); } SetMockTime(time); if (auto* node_context = GetContext(request.context)) { diff --git a/src/rpc/txoutproof.cpp b/src/rpc/txoutproof.cpp index 5173e162fd996a..a8469485b3857d 100644 --- a/src/rpc/txoutproof.cpp +++ b/src/rpc/txoutproof.cpp @@ -133,7 +133,7 @@ static RPCHelpMan verifytxoutproof() RPCResult{ RPCResult::Type::ARR, "", "", { - {RPCResult::Type::STR_HEX, "txid", "The txid(s) which the proof commits to, or empty array if the proof can not be validated."}, + {RPCResult::Type::STR_HEX, "txid", "The txid(s) which the proof commits to, or empty array if the proof cannot be validated."}, } }, RPCExamples{ diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index fbdb851ae19d8b..1b9ea354093f5c 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -1375,7 +1375,7 @@ BOOST_AUTO_TEST_CASE(util_ParseMoney) BOOST_CHECK_EQUAL(ParseMoney("0.00000001 ").value(), COIN/100000000); BOOST_CHECK_EQUAL(ParseMoney(" 0.00000001").value(), COIN/100000000); - // Parsing amount that can not be represented should fail + // Parsing amount that cannot be represented should fail BOOST_CHECK(!ParseMoney("100000000.00")); BOOST_CHECK(!ParseMoney("0.000000001")); diff --git a/src/txdb.cpp b/src/txdb.cpp index f780b56b44088b..90a5a20bba1299 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -40,7 +40,7 @@ std::optional CheckLegacyTxindex(CBlockTreeDB& block_tree_db) { CBlockLocator ignored{}; if (block_tree_db.Read(DB_TXINDEX_BLOCK, ignored)) { - return _("The -txindex upgrade started by a previous version can not be completed. Restart with the previous version or run a full -reindex."); + return _("The -txindex upgrade started by a previous version cannot be completed. Restart with the previous version or run a full -reindex."); } bool txindex_legacy_flag{false}; block_tree_db.ReadFlag("txindex", txindex_legacy_flag); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b4ca6de160730b..c79507214d7b9c 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2015,7 +2015,7 @@ static RPCHelpMan walletpassphrase() } if (strWalletPass.empty()) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "passphrase can not be empty"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "passphrase cannot be empty"); } if (!pwallet->Unlock(strWalletPass, fForMixingOnly)) { @@ -2087,7 +2087,7 @@ static RPCHelpMan walletpassphrasechange() strNewWalletPass = request.params[1].get_str().c_str(); if (strOldWalletPass.empty() || strNewWalletPass.empty()) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "passphrase can not be empty"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "passphrase cannot be empty"); } if (!pwallet->ChangeWalletPassphrase(strOldWalletPass, strNewWalletPass)) { @@ -2184,7 +2184,7 @@ static RPCHelpMan encryptwallet() strWalletPass = request.params[0].get_str().c_str(); if (strWalletPass.empty()) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "passphrase can not be empty"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "passphrase cannot be empty"); } if (!pwallet->EncryptWallet(strWalletPass)) { diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index f8b74ee920e574..7fa30ec727d520 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -715,7 +715,7 @@ class CreateTransactionTestSetup : public TestChain100Setup const std::string strUnableToLocateCoinJoin1 = "Unable to locate enough non-denominated funds for this transaction."; const std::string strUnableToLocateCoinJoin2 = "Unable to locate enough mixed funds for this transaction. CoinJoin uses exact denominated amounts to send funds, you might simply need to mix some more coins."; const std::string strTransactionTooLarge = "Transaction too large"; - const std::string strChangeIndexOutOfRange = "Change index out of range"; + const std::string strChangeIndexOutOfRange = "Transaction change output index out of range"; const std::string strExceededMaxTries = "Exceeded max tries."; const std::string strMaxFeeExceeded = "Fee exceeds maximum configured by user (e.g. -maxtxfee, maxfeerate)"; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 869af8d63b53a9..0d15f415b4c014 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3783,7 +3783,7 @@ bool CWallet::CreateTransactionInternal( } else if ((unsigned int)nChangePosRequest > txNew.vout.size()) { - error = _("Change index out of range"); + error = _("Transaction change output index out of range"); return false; } else { nChangePosInOut = nChangePosRequest; diff --git a/test/functional/feature_txindex_compatibility.py b/test/functional/feature_txindex_compatibility.py index f4a8e7cf553729..ed913f51372ff8 100755 --- a/test/functional/feature_txindex_compatibility.py +++ b/test/functional/feature_txindex_compatibility.py @@ -83,7 +83,7 @@ def run_test(self): self.stop_nodes() - self.log.info("Check migrated txindex can not be read by legacy node") + self.log.info("Check migrated txindex cannot be read by legacy node") err_msg = f": You need to rebuild the database using -reindex to change -txindex.{os.linesep}Please restart with -reindex or -reindex-chainstate to recover." shutil.rmtree(legacy_chain_dir) shutil.copytree(migrate_chain_dir, legacy_chain_dir) diff --git a/test/functional/rpc_decodescript.py b/test/functional/rpc_decodescript.py index 438f246af51c54..6df7d1b63ba518 100755 --- a/test/functional/rpc_decodescript.py +++ b/test/functional/rpc_decodescript.py @@ -48,7 +48,7 @@ def decodescript_script_sig(self): rpc_result = self.nodes[0].decodescript('5100') assert_equal('1 0', rpc_result['asm']) - # 5) null data scriptSig - no such thing because null data scripts can not be spent. + # 5) null data scriptSig - no such thing because null data scripts cannot be spent. # thus, no test case for that standard transaction type is here. def decodescript_script_pub_key(self): diff --git a/test/functional/rpc_uptime.py b/test/functional/rpc_uptime.py index 645d76cdfaa907..853c13f13504a4 100755 --- a/test/functional/rpc_uptime.py +++ b/test/functional/rpc_uptime.py @@ -23,7 +23,7 @@ def run_test(self): self._test_uptime() def _test_negative_time(self): - assert_raises_rpc_error(-8, "Mocktime can not be negative: -1.", self.nodes[0].setmocktime, -1) + assert_raises_rpc_error(-8, "Mocktime cannot be negative: -1.", self.nodes[0].setmocktime, -1) def _test_uptime(self): wait_time = 10 diff --git a/test/functional/wallet_encryption.py b/test/functional/wallet_encryption.py index 25f19baf8e3c8a..126cb9c4f98693 100755 --- a/test/functional/wallet_encryption.py +++ b/test/functional/wallet_encryption.py @@ -35,14 +35,14 @@ def run_test(self): assert_raises_rpc_error(-15, "Error: running with an unencrypted wallet, but walletpassphrasechange was called.", self.nodes[0].walletpassphrasechange, 'ff', 'ff') # Encrypt the wallet - assert_raises_rpc_error(-8, "passphrase can not be empty", self.nodes[0].encryptwallet, '') + assert_raises_rpc_error(-8, "passphrase cannot be empty", self.nodes[0].encryptwallet, '') self.nodes[0].encryptwallet(passphrase) # Test that the wallet is encrypted assert_raises_rpc_error(-13, "Please enter the wallet passphrase with walletpassphrase first", self.nodes[0].signmessage, address, msg) assert_raises_rpc_error(-15, "Error: running with an encrypted wallet, but encryptwallet was called.", self.nodes[0].encryptwallet, 'ff') - assert_raises_rpc_error(-8, "passphrase can not be empty", self.nodes[0].walletpassphrase, '', 1) - assert_raises_rpc_error(-8, "passphrase can not be empty", self.nodes[0].walletpassphrasechange, '', 'ff') + assert_raises_rpc_error(-8, "passphrase cannot be empty", self.nodes[0].walletpassphrase, '', 1) + assert_raises_rpc_error(-8, "passphrase cannot be empty", self.nodes[0].walletpassphrasechange, '', 'ff') # Check that walletpassphrase works self.nodes[0].walletpassphrase(passphrase, 2) diff --git a/test/util/test_runner.py b/test/util/test_runner.py index 1f7c09439dafb1..576c2d3de06c2b 100755 --- a/test/util/test_runner.py +++ b/test/util/test_runner.py @@ -93,7 +93,7 @@ def bctest(testDir, testObj, buildenv): try: outputData = open(os.path.join(testDir, outputFn), encoding="utf8").read() except: - logging.error("Output file " + outputFn + " can not be opened") + logging.error("Output file " + outputFn + " cannot be opened") raise if not outputData: logging.error("Output data missing for " + outputFn)