From fa70d199d0c2182d76b2a1cfa21f9ada4bb12913 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 20 Aug 2019 11:00:43 -0400 Subject: util: Make util/error bilingual_str (refactor) Translated strings should not end up in the debug log, stderr, or returned by an RPC. Changing the util methods in util/error to return a bilingual_str paves the way to achieve this goal in the long term. --- src/util/error.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/util/error.cpp') diff --git a/src/util/error.cpp b/src/util/error.cpp index 287476c0d..aa44ed3e3 100644 --- a/src/util/error.cpp +++ b/src/util/error.cpp @@ -41,12 +41,12 @@ std::string ResolveErrMsg(const std::string& optname, const std::string& strBind return strprintf(_("Cannot resolve -%s address: '%s'").translated, optname, strBind); } -std::string AmountHighWarn(const std::string& optname) +bilingual_str AmountHighWarn(const std::string& optname) { - return strprintf(_("%s is set very high!").translated, optname); + return strprintf(_("%s is set very high!"), optname); } -std::string AmountErrMsg(const std::string& optname, const std::string& strValue) +bilingual_str AmountErrMsg(const std::string& optname, const std::string& strValue) { - return strprintf(_("Invalid amount for -%s=: '%s'").translated, optname, strValue); + return strprintf(_("Invalid amount for -%s=: '%s'"), optname, strValue); } -- cgit v1.2.3