void init_textdomains(const config& cfg) { foreach (const config &t, cfg.child_range("textdomain")) { const std::string &name = t["name"]; const std::string &path = t["path"]; if(path.empty()) { t_string::add_textdomain(name, get_intl_dir()); } else { std::string location = get_binary_dir_location("", path); if (location.empty()) { //if location is empty, this causes a crash on Windows, so we //disallow adding empty domains ERR_G << "no location found for '" << path << "', skipping textdomain\n"; } else { t_string::add_textdomain(name, location); } } } }
void init_textdomains(const config& cfg) { config::const_child_itors t = cfg.child_range("textdomain"); for(;t.first != t.second; ++t.first) { const std::string name = (**t.first)["name"]; const std::string path = (**t.first)["path"]; if(path.empty()) { // t_string::add_textdomain(name, get_intl_dir()); } else { std::string location = get_binary_dir_location("", path); if (location.empty()) { //if location is empty, this causes a crash on Windows, so we //disallow adding empty domains LOG_STREAM(err, general) << "no location found for '" << path << "', not adding textdomain\n"; } else { // t_string::add_textdomain(name, location); } } } }