fix comilation
move LC_MESSAGES out of wesnoth.cpp and game_config_manager.cpp
This commit is contained in:
parent
9c799b9a47
commit
588c008890
5 changed files with 15 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -113,4 +113,8 @@ void set_language(const std::string& language, const std::vector<std::string>* /
|
|||
get_manager().update_locale();
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue