From 4f3f353e9879e6ad4be635681c6292773232c677 Mon Sep 17 00:00:00 2001 From: furszy Date: Fri, 13 Mar 2020 12:56:45 -0300 Subject: [PATCH] Merge #1376: [Init] Combine common error strings so translations can be shared 77998ed5cd067302801ce9b863d59722df9fedca Combine common error strings so translations can be shared and reused (Luke Dashjr) Pull request description: Backport of https://github.com/bitcoin/bitcoin/pull/7257 Adds helper methods for common translatable string outputs during init, end result is that the number of strings sent to Transifex is reduced/standardized. Based on top of #1375 Conflicts with #1373 (this to be rebased after both #1373 and #1375 are merged) ACKs for top commit: random-zebra: utACK 77998ed5cd067302801ce9b863d59722df9fedca furszy: utACK 77998ed and merging.. Tree-SHA512: 9805b931829f76cbc34b43b7e6141b236d162bd0267342714222612b8e51cdc9d8b35e68971775bd7a489e95a3c4f9b533bbf1ecaa0e56b19a443ed308141c87 --- src/init.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index fb396bacca4da..8cdd367338062 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -906,6 +906,16 @@ void InitParameterInteraction() } } +static std::string ResolveErrMsg(const char * const optname, const std::string& strBind) +{ + return strprintf(_("Cannot resolve -%s address: '%s'"), optname, strBind); +} + +static std::string AmountErrMsg(const char * const optname, const std::string& strValue) +{ + return strprintf(_("Invalid amount for -%s=: '%s'"), optname, strValue); +} + void InitLogging() { fPrintToConsole = GetBoolArg("-printtoconsole", false);