fix comilation

move LC_MESSAGES out of wesnoth.cpp and game_config_manager.cpp
This commit is contained in:
gfgtdf 2014-10-25 03:58:47 +02:00
parent 9c799b9a47
commit 588c008890
5 changed files with 15 additions and 2 deletions

View file

@ -172,4 +172,11 @@ void set_language(const std::string& slocale, const std::vector<std::string>* al
#endif //win32
}
void init()
{
#ifndef _WIN32
std::setlocale(LC_MESSAGES, "");
#endif
}
}

View file

@ -73,6 +73,8 @@ namespace translation
void set_default_textdomain(const char* domain);
void set_language(const std::string& language, const std::vector<std::string>* alternates);
void init();
}
//#define _(String) translation::dsgettext(GETTEXT_DOMAIN,String)

View file

@ -113,4 +113,8 @@ void set_language(const std::string& language, const std::vector<std::string>* /
get_manager().update_locale();
}
void init()
{
}
}

View file

@ -66,7 +66,7 @@ namespace test_utils {
setlocale(LC_ALL, "English");
#else
std::setlocale(LC_ALL, "C");
std::setlocale(LC_MESSAGES, "");
translation::init();
#endif
const std::string& intl_dir = filesystem::get_intl_dir();
translation::bind_textdomain("wesnoth", intl_dir.c_str(), "UTF-8");

View file

@ -479,7 +479,7 @@ static void init_locale() {
setlocale(LC_ALL, "English");
#else
std::setlocale(LC_ALL, "C");
std::setlocale(LC_MESSAGES, "");
translation::init();
#endif
const std::string& intl_dir = filesystem::get_intl_dir();
translation::bind_textdomain(PACKAGE, intl_dir.c_str(), "UTF-8");