aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2020-05-13 20:30:31 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2020-05-13 20:30:39 +0200
commit51825aea7fa068877ea77e3121def58005df3510 (patch)
tree519eb17faccf13808ebc87fc8ffde546cf9d457f /src/wallet
parentfc895d7700f9092d519b43000f412c1283e44d25 (diff)
parent78be8d97d3d750fcfbbe509a72639b7b30b7bd18 (diff)
Merge #18922: gui: Do not translate InitWarning messages in debug.log
78be8d97d3d750fcfbbe509a72639b7b30b7bd18 util: Drop OpOriginal() and OpTranslated() (Hennadii Stepanov) da16f95c3fecf4ee1e9a1dc4333b0b92cd981afd gui: Do not translate InitWarning messages in debug.log (Hennadii Stepanov) 4c9b9a4882e68835f16a52f1f0657efe47e589b5 util: Enhance Join() (Hennadii Stepanov) fe05dd0611cfc2929a7fdec04ca5948bccf0233b util: Enhance bilingual_str (Hennadii Stepanov) Pull request description: This PR forces the `bitcoin-qt` to write `InitWarning()` messages to the `debug.log` file in untranslated form, i.e., in English. On master (376294cde6b1588cb17055d8fde567eaf5848c3c): ``` $ ./src/qt/bitcoin-qt -lang=nl -debug=vladidation -printtoconsole | grep 'vladi' Warning: Niet-ondersteunde logcategorie -debug=vladidation. 2020-05-09T12:39:59Z Warning: Niet-ondersteunde logcategorie -debug=vladidation. 2020-05-09T12:40:02Z Command-line arg: debug="vladidation" ``` With this PR: ``` $ ./src/qt/bitcoin-qt -lang=nl -debug=vladidation -printtoconsole | grep 'vladi' Warning: Unsupported logging category -debug=vladidation. 2020-05-09T12:42:04Z Warning: Unsupported logging category -debug=vladidation. 2020-05-09T12:42:35Z Command-line arg: debug="vladidation" ``` ![Screenshot from 2020-05-09 15-42-31](https://user-images.githubusercontent.com/32963518/81474073-c7a50e00-920b-11ea-8775-c41122dacafe.png) Related to #16218. ACKs for top commit: laanwj: ACK 78be8d97d3d750fcfbbe509a72639b7b30b7bd18 jonasschnelli: utACK 78be8d97d3d750fcfbbe509a72639b7b30b7bd18 MarcoFalke: ACK 78be8d97d3d750fcfbbe509a72639b7b30b7bd18 📢 Tree-SHA512: 48e9ecd23c4dd8ec262e3eb94f8e30944bcc9c6c163245fb837b2e0c484d4d0b4f47f7abc638c14edc27d635d340ba3ee4ba4506b062399e9cf59a1564c98755
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/load.cpp4
-rw-r--r--src/wallet/rpcwallet.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/load.cpp b/src/wallet/load.cpp
index 45841b2ae1..16f3699d37 100644
--- a/src/wallet/load.cpp
+++ b/src/wallet/load.cpp
@@ -56,7 +56,7 @@ bool VerifyWallets(interfaces::Chain& chain, const std::vector<std::string>& wal
bilingual_str error_string;
std::vector<bilingual_str> warnings;
bool verify_success = CWallet::Verify(chain, location, salvage_wallet, error_string, warnings);
- if (!warnings.empty()) chain.initWarning(Join(warnings, "\n", OpTranslated));
+ if (!warnings.empty()) chain.initWarning(Join(warnings, Untranslated("\n")));
if (!verify_success) {
chain.initError(error_string);
return false;
@@ -73,7 +73,7 @@ bool LoadWallets(interfaces::Chain& chain, const std::vector<std::string>& walle
bilingual_str error;
std::vector<bilingual_str> warnings;
std::shared_ptr<CWallet> pwallet = CWallet::CreateWalletFromFile(chain, WalletLocation(walletFile), error, warnings);
- if (!warnings.empty()) chain.initWarning(Join(warnings, "\n", OpTranslated));
+ if (!warnings.empty()) chain.initWarning(Join(warnings, Untranslated("\n")));
if (!pwallet) {
chain.initError(error);
return false;
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index c2d314140c..250a4503f5 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2603,7 +2603,7 @@ static UniValue loadwallet(const JSONRPCRequest& request)
UniValue obj(UniValue::VOBJ);
obj.pushKV("name", wallet->GetName());
- obj.pushKV("warning", Join(warnings, "\n", OpOriginal));
+ obj.pushKV("warning", Join(warnings, Untranslated("\n")).original);
return obj;
}
@@ -2743,7 +2743,7 @@ static UniValue createwallet(const JSONRPCRequest& request)
UniValue obj(UniValue::VOBJ);
obj.pushKV("name", wallet->GetName());
- obj.pushKV("warning", Join(warnings, "\n", OpOriginal));
+ obj.pushKV("warning", Join(warnings, Untranslated("\n")).original);
return obj;
}