aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/error.cpp2
-rw-r--r--src/util/system.cpp1
-rw-r--r--src/util/system.h12
-rw-r--r--src/util/translation.h20
4 files changed, 23 insertions, 12 deletions
diff --git a/src/util/error.cpp b/src/util/error.cpp
index 9331a92ad7..1b662d3700 100644
--- a/src/util/error.cpp
+++ b/src/util/error.cpp
@@ -4,7 +4,9 @@
#include <util/error.h>
+#include <tinyformat.h>
#include <util/system.h>
+#include <util/translation.h>
std::string TransactionErrorString(const TransactionError err)
{
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 72b37b9187..2a069c554f 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -7,6 +7,7 @@
#include <chainparamsbase.h>
#include <util/strencodings.h>
+#include <util/translation.h>
#include <stdarg.h>
diff --git a/src/util/system.h b/src/util/system.h
index dda9156488..66a9eb4612 100644
--- a/src/util/system.h
+++ b/src/util/system.h
@@ -40,18 +40,6 @@ int64_t GetStartupTime();
extern const char * const BITCOIN_CONF_FILENAME;
-/** Translate a message to the native language of the user. */
-const extern std::function<std::string(const char*)> G_TRANSLATION_FUN;
-
-/**
- * Translation function.
- * If no translation function is set, simply return the input.
- */
-inline std::string _(const char* psz)
-{
- return G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz;
-}
-
void SetupEnvironment();
bool SetupNetworking();
diff --git a/src/util/translation.h b/src/util/translation.h
new file mode 100644
index 0000000000..d709b26890
--- /dev/null
+++ b/src/util/translation.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2019 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_UTIL_TRANSLATION_H
+#define BITCOIN_UTIL_TRANSLATION_H
+
+/** Translate a message to the native language of the user. */
+const extern std::function<std::string(const char*)> G_TRANSLATION_FUN;
+
+/**
+ * Translation function.
+ * If no translation function is set, simply return the input.
+ */
+inline std::string _(const char* psz)
+{
+ return G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz;
+}
+
+#endif // BITCOIN_UTIL_TRANSLATION_H