Skip to content

Commit

Permalink
Suppress "language missing" errors for en_US
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Jul 10, 2016
1 parent 80bcd4d commit c0e0d4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gettext_boost.cpp
Expand Up @@ -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";
Expand All @@ -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";
}
Expand Down

0 comments on commit c0e0d4d

Please sign in to comment.