Merge bitcoin/bitcoin#31987: wallet: Replace "non-0" with "non-zero" in translatable error message

18e83534ac wallet: Replace "non-0" with "non-zero" in translatable error message (Hennadii Stepanov)

Pull request description:

  Transifex interprets the "-0" substring as a number in translatable strings. Since not all translations preserve "-0," this triggers a corresponding warning. While this warning could be disabled globally, it is more reasonable to adjust the original string instead.

ACKs for top commit:
  davidgumberg:
    ACK 18e83534ac
  l0rinc:
    ACK 18e83534ac
  1440000bytes:
    ACK 18e83534ac
  BrandonOdiwuor:
    Code Review ACK 18e83534ac
  laanwj:
    Code review ACK 18e83534ac

Tree-SHA512: 5c38cfc4b352dbbcc8de5fb907cf988a77a7ecded7a90fe0517bfb9e4cd5097bdeb1aa6edf5d9ca37de54d1d7939d5e49533ec93c403db90d9169ad7732e5124
This commit is contained in:
Hennadii Stepanov 2025-03-12 19:32:00 +00:00
commit eb9730ab65
No known key found for this signature in database
GPG key ID: 410108112E7EA81F
2 changed files with 2 additions and 2 deletions

View file

@ -1138,7 +1138,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
// This can only happen if feerate is 0, and requested destinations are value of 0 (e.g. OP_RETURN)
// and no pre-selected inputs. This will result in 0-input transaction, which is consensus-invalid anyways
if (selection_target == 0 && !coin_control.HasSelected()) {
return util::Error{_("Transaction requires one destination of non-0 value, a non-0 feerate, or a pre-selected input")};
return util::Error{_("Transaction requires one destination of non-zero value, a non-zero feerate, or a pre-selected input")};
}
// Fetch manually selected coins

View file

@ -999,7 +999,7 @@ class PSBTTest(BitcoinTestFramework):
{'hex': '0200000001dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd0000000000000000000100000000000000000000000000', 'complete': True})
self.log.info("Test we don't crash when making a 0-value funded transaction at 0 fee without forcing an input selection")
assert_raises_rpc_error(-4, "Transaction requires one destination of non-0 value, a non-0 feerate, or a pre-selected input", self.nodes[0].walletcreatefundedpsbt, [], [{"data": "deadbeef"}], 0, {"fee_rate": "0"})
assert_raises_rpc_error(-4, "Transaction requires one destination of non-zero value, a non-zero feerate, or a pre-selected input", self.nodes[0].walletcreatefundedpsbt, [], [{"data": "deadbeef"}], 0, {"fee_rate": "0"})
self.log.info("Test descriptorprocesspsbt updates and signs a psbt with descriptors")