aboutsummaryrefslogtreecommitdiff
path: root/src/noui.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-04-11 18:47:17 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-05-05 04:45:59 +0300
commit917ca93553917251e0fd59717a347c63cdfd8a14 (patch)
tree6dd3c84f09109c1da19d1a23e798a32efdafa9a9 /src/noui.cpp
parent23b9fa2e5ec0425980301d2eebad81e660a5ea39 (diff)
downloadbitcoin-917ca93553917251e0fd59717a347c63cdfd8a14.tar.xz
Make ThreadSafe{MessageBox|Question} bilingual
Diffstat (limited to 'src/noui.cpp')
-rw-r--r--src/noui.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/noui.cpp b/src/noui.cpp
index 11cfe7f94d..ddb3a50ff7 100644
--- a/src/noui.cpp
+++ b/src/noui.cpp
@@ -5,8 +5,9 @@
#include <noui.h>
+#include <logging.h>
#include <ui_interface.h>
-#include <util/system.h>
+#include <util/translation.h>
#include <string>
@@ -18,7 +19,7 @@ boost::signals2::connection noui_ThreadSafeMessageBoxConn;
boost::signals2::connection noui_ThreadSafeQuestionConn;
boost::signals2::connection noui_InitMessageConn;
-bool noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
+bool noui_ThreadSafeMessageBox(const bilingual_str& message, const std::string& caption, unsigned int style)
{
bool fSecure = style & CClientUIInterface::SECURE;
style &= ~CClientUIInterface::SECURE;
@@ -43,15 +44,15 @@ bool noui_ThreadSafeMessageBox(const std::string& message, const std::string& ca
}
if (!fSecure) {
- LogPrintf("%s%s\n", strCaption, message);
+ LogPrintf("%s%s\n", strCaption, message.original);
}
- tfm::format(std::cerr, "%s%s\n", strCaption, message);
+ tfm::format(std::cerr, "%s%s\n", strCaption, message.original);
return false;
}
-bool noui_ThreadSafeQuestion(const std::string& /* ignored interactive message */, const std::string& message, const std::string& caption, unsigned int style)
+bool noui_ThreadSafeQuestion(const bilingual_str& /* ignored interactive message */, const std::string& message, const std::string& caption, unsigned int style)
{
- return noui_ThreadSafeMessageBox(message, caption, style);
+ return noui_ThreadSafeMessageBox(Untranslated(message), caption, style);
}
void noui_InitMessage(const std::string& message)
@@ -66,13 +67,13 @@ void noui_connect()
noui_InitMessageConn = uiInterface.InitMessage_connect(noui_InitMessage);
}
-bool noui_ThreadSafeMessageBoxRedirect(const std::string& message, const std::string& caption, unsigned int style)
+bool noui_ThreadSafeMessageBoxRedirect(const bilingual_str& message, const std::string& caption, unsigned int style)
{
- LogPrintf("%s: %s\n", caption, message);
+ LogPrintf("%s: %s\n", caption, message.original);
return false;
}
-bool noui_ThreadSafeQuestionRedirect(const std::string& /* ignored interactive message */, const std::string& message, const std::string& caption, unsigned int style)
+bool noui_ThreadSafeQuestionRedirect(const bilingual_str& /* ignored interactive message */, const std::string& message, const std::string& caption, unsigned int style)
{
LogPrintf("%s: %s\n", caption, message);
return false;