message: refactor: Make GetWarnings() bilingual_str aware internally
diff: #include <warnings.h>
  #include <sync.h>
  +#include <util/string.h>
  #include <util/system.h>
  #include <util/translation.h>
  +#include <vector>
  +
  static Mutex g_warnings_mutex;
  static std::string strMiscWarning GUARDED_BY(g_warnings_mutex);
  static bool fLargeWorkForkFound GUARDED_BY(g_warnings_mutex) = false;
  @@ -42,16 +45,15 @@ void SetfLargeWorkInvalidChainFound(bool flag)
  std::string GetWarnings(bool verbose)
  {
  int nPriority = 0;
  - std::string warnings_concise;
  - std::string warnings_verbose;
  - const std::string warning_separator = "<hr />";
  + bilingual_str warnings_concise;
  + std::vector<bilingual_str> warnings_verbose;
  LOCK(g_warnings_mutex);
  // Pre-release build warning
  if (!CLIENT_VERSION_IS_RELEASE) {
  - warnings_concise = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications";
  - warnings_verbose = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications").translated;
  + warnings_concise = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications");
  + warnings_verbose.emplace_back(warnings_concise);
  }
  // peercoin: wallet lock warning for minting
  @@ -63,22 +65,25 @@ std::string GetWarnings(bool verbose)
  }
  // Misc warnings like out of disk space and clock is wrong
  - if (strMiscWarning != "") {
  + if (!strMiscWarning.empty()) {
  nPriority = 1000;
  - warnings_concise = strMiscWarning;
  - warnings_verbose += (warnings_verbose.empty() ? "" : warning_separator) + strMiscWarning;
  + warnings_concise = Untranslated(strMiscWarning);
  + warnings_verbose.emplace_back(warnings_concise);
  }
  if (fLargeWorkForkFound) {
  nPriority = 2000;
  - warnings_concise = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.";
  - warnings_verbose += (warnings_verbose.empty() ? "" : warning_separator) + _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.").translated;
  + warnings_concise = _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.");
  + warnings_verbose.emplace_back(warnings_concise);
  } else if (fLargeWorkInvalidChainFound) {
  nPriority = 2000;
  - warnings_concise = "Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.";
  - warnings_verbose += (warnings_verbose.empty() ? "" : warning_separator) + _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.").translated;
  + warnings_concise = _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.");
  + warnings_verbose.emplace_back(warnings_concise);
  + }
  +
  + if (verbose) {
  + return Join(warnings_verbose, Untranslated("<hr />")).translated;
  }
  - if (verbose) return warnings_verbose;
  - else return warnings_concise;
  + return warnings_concise.original;
  }
  