aboutsummaryrefslogtreecommitdiff
path: root/src/noui.cpp
diff options
context:
space:
mode:
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;