From 0b86e517ad733c8740c519332aa4c0e9035dbaab Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 17 Jun 2019 10:56:52 +0300 Subject: Refactor out translation.h This is a prerequisite for introducing bilingual error messages. Note: #includes are arranged by clang-format-diff.py script. --- src/Makefile.am | 1 + src/banman.cpp | 1 + src/bitcoin-cli.cpp | 4 +++- src/bitcoin-tx.cpp | 6 ++++-- src/bitcoin-wallet.cpp | 4 +++- src/bitcoind.cpp | 3 +++ src/httprpc.cpp | 9 +++++---- src/index/txindex.cpp | 1 + src/init.cpp | 24 +++++++++++++----------- src/net.cpp | 3 ++- src/qt/main.cpp | 2 ++ src/qt/splashscreen.cpp | 1 + src/test/setup_common.cpp | 3 +++ src/timedata.cpp | 1 + src/txdb.cpp | 5 +++-- src/util/error.cpp | 2 ++ src/util/system.cpp | 1 + src/util/system.h | 12 ------------ src/util/translation.h | 20 ++++++++++++++++++++ src/validation.cpp | 1 + src/wallet/db.cpp | 1 + src/wallet/init.cpp | 5 +++-- src/wallet/load.cpp | 1 + src/wallet/rpcdump.cpp | 4 ++-- src/wallet/wallet.cpp | 1 + src/warnings.cpp | 4 +++- 26 files changed, 81 insertions(+), 39 deletions(-) create mode 100644 src/util/translation.h diff --git a/src/Makefile.am b/src/Makefile.am index 0ed412295f..0f05439227 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -212,6 +212,7 @@ BITCOIN_CORE_H = \ util/rbf.h \ util/threadnames.h \ util/time.h \ + util/translation.h \ util/url.h \ util/validation.h \ validation.h \ diff --git a/src/banman.cpp b/src/banman.cpp index 47d64a8f31..c1f7c6f00c 100644 --- a/src/banman.cpp +++ b/src/banman.cpp @@ -9,6 +9,7 @@ #include #include #include +#include BanMan::BanMan(fs::path ban_file, CClientUIInterface* client_interface, int64_t default_ban_time) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index d3419520a7..8ca985458d 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -13,9 +13,11 @@ #include #include #include -#include #include +#include +#include +#include #include #include #include diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 4d513deed8..89e2ab305b 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -18,11 +18,13 @@ #include