From c0e0d4d5f55d87233a2984770d9d322cde27777c Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sun, 10 Jul 2016 10:58:22 -0400 Subject: [PATCH] Suppress "language missing" errors for en_US --- src/gettext_boost.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gettext_boost.cpp b/src/gettext_boost.cpp index 439ead7971bd..23d432d907d7 100644 --- a/src/gettext_boost.cpp +++ b/src/gettext_boost.cpp @@ -122,6 +122,9 @@ namespace void load_catalog(const std::string& domain, const fs::path& base_path) { + if(current_language_.full_name() == "c") { + return; // Nothing to do, just use en_US strings + } std::ifstream po_file; fs::path po_path = base_path/domain; po_path /= current_language_.full_name() + ".po"; @@ -137,7 +140,7 @@ namespace auto beg = data.begin(), end = data.end(); DBG_G << "Successfully loaded language file from " << po_path << "\n"; msg_catalog.insert({domain, po_catalog::from_iterators(beg, end)}); - } else if(current_language_.full_name() != "c") { + } else if(current_language_.full_name() != "en_US") { WRN_G << "Error opening language file for " << current_language_.full_name() << ", textdomain " << domain << "\n"; WRN_G << " (Most likely this means the file does not exist or lacks read permission.)\n"; }