std::string
. In order for these errors to be translated, change them to use bilingual_str
.
std::string
. In order for these errors to be translated, change them to use bilingual_str
.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
6@@ -7,6 +7,7 @@
7 #include <key_io.h>
8 #include <outputtype.h>
9 #include <script/standard.h>
10+#include <util/translation.h>
#ifdef ENABLE_WALLET
?
617@@ -618,9 +618,9 @@ bool CWallet::CreateTransactionInternal(
618 // Reserve a new key pair from key pool. If it fails, provide a dummy
619 // destination in case we don't need change.
620 CTxDestination dest;
621- std::string dest_err;
622+ bilingual_str dest_err;
623 if (!reservedest.GetReservedDestination(dest, true, dest_err)) {
624- error = strprintf(_("Transaction needs a change address, but we can't generate it. %s"), dest_err);
625+ error = _("Transaction needs a change address, but we can't generate it. ") + dest_err;
687- input_errors[i] = "Unable to sign input, invalid stack size (possibly missing key)";
688+ input_errors[i] = _("Unable to sign input, invalid stack size (possibly missing key)");
689 } else if (serror == SCRIPT_ERR_SIG_NULLFAIL) {
690 // Verification failed (possibly due to insufficient signatures).
691- input_errors[i] = "CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)";
692+ input_errors[i] = _("CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)");
CHECK(MULTI)SIG
should be a part of the translatable string.
Untranslated(...)
to avoid dealing with translations
15@@ -16,6 +16,7 @@
16 #include <script/signingprovider.h>
17 #include <tinyformat.h>
18 #include <univalue.h>
19+#include <util/translation.h>
20 #include <util/rbf.h>
21 #include <util/strencodings.h>
nit, sorting:
0#include <util/rbf.h>
1#include <util/strencodings.h>
2#include <util/translation.h>
11@@ -12,6 +12,7 @@
12 #include <script/standard.h>
13 #include <uint256.h>
14 #include <util/vector.h>
15+#include <util/translation.h>
nit, sorting:
0#include <util/translation.h>
1#include <util/vector.h>
Approach ACK b1eeae2458f533712c78d4aef4ea4f9587f10633.
While touching this code, could string duplication be eliminated in wallet/scriptpubkeyman.cpp
?
For GetNewDestination, GetNewChangeDestination, and
GetReservedDestination, use bilingual_str for
errors