diff options
| author | MarcoFalke <[email protected]> | 2019-07-24 14:06:59 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2019-07-24 14:07:05 -0400 |
| commit | d960d5ca99b7ba12f9c1e9042b5e9ac3fcf86473 (patch) | |
| tree | 9efb597566399ccb2bd3d44ad6add039e66a353a /src/httprpc.cpp | |
| parent | Merge #16445: test: Skip flaky p2p_invalid_messages test on macOS (diff) | |
| parent | scripted-diff: Make translation bilingual (diff) | |
| download | discoin-d960d5ca99b7ba12f9c1e9042b5e9ac3fcf86473.tar.xz discoin-d960d5ca99b7ba12f9c1e9042b5e9ac3fcf86473.zip | |
Merge #16362: Add bilingual_str type
753f7cccce83084f4b18cf4bdf3225183179508c scripted-diff: Make translation bilingual (Hennadii Stepanov)
7c45e14f2f682eddcc853c0f6051c7c8c6387289 Add bilingual message type (Hennadii Stepanov)
0b86e517ad733c8740c519332aa4c0e9035dbaab Refactor out translation.h (Hennadii Stepanov)
Pull request description:
This PR adds the `bilingual_str` struct and a `strprintf` overload:
https://github.com/bitcoin/bitcoin/blob/0626b8cbdf0aa971500eb5613c7ab4096c496966/src/tinyformat.h#L1066-L1067
Both new features allow bitcoin code to easily send dual translated and non-translated messages to the GUI and the logging framework.
This PR is only a refactoring (has been split off the #16224 (see: https://github.com/bitcoin/bitcoin/pull/16224/#issuecomment-509718579)) and does not change behavior.
ACKs for top commit:
MarcoFalke:
ACK 753f7cccce
ryanofsky:
utACK 753f7cccce83084f4b18cf4bdf3225183179508c. Only change since last review is fixing lint error (double includes)
Tree-SHA512: 52b0654421d558e4775c0484d78be26319fe3db5118af9b0a9bdfbdaad53a3704f527a5d5aba1013a64560b9b6a0c3c4cf0a6782e49aa731e18d99de95220385
Diffstat (limited to 'src/httprpc.cpp')
| -rw-r--r-- | src/httprpc.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp index c7a119440..306d71857 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -5,19 +5,20 @@ #include <httprpc.h> #include <chainparams.h> +#include <crypto/hmac_sha256.h> #include <httpserver.h> #include <key_io.h> #include <rpc/protocol.h> #include <rpc/server.h> #include <sync.h> -#include <util/system.h> -#include <util/strencodings.h> #include <ui_interface.h> +#include <util/strencodings.h> +#include <util/system.h> +#include <util/translation.h> #include <walletinitinterface.h> -#include <crypto/hmac_sha256.h> -#include <stdio.h> #include <memory> +#include <stdio.h> #include <boost/algorithm/string.hpp> // boost::trim @@ -218,7 +219,7 @@ static bool InitRPCAuthentication() LogPrintf("No rpcpassword set - using random cookie authentication.\n"); if (!GenerateAuthCookie(&strRPCUserColonPass)) { uiInterface.ThreadSafeMessageBox( - _("Error: A fatal internal error occurred, see debug.log for details"), // Same message as AbortNode + _("Error: A fatal internal error occurred, see debug.log for details").translated, // Same message as AbortNode "", CClientUIInterface::MSG_ERROR); return false; } |