Functions | |
std::string | dgettext (const char *domain, const char *msgid) |
std::string | egettext (char const *msgid) |
std::string | dsgettext (const char *domainname, const char *msgid) |
std::string | dsngettext (const char *domainname, const char *singular, const char *plural, int n) |
void | bind_textdomain (const char *domain, const char *directory, const char *) |
void | set_default_textdomain (const char *domain) |
void | set_language (const std::string &language, const std::vector< std::string > *) |
int | compare (const std::string &s1, const std::string &s2) |
Case-sensitive lexicographical comparison. More... | |
int | icompare (const std::string &s1, const std::string &s2) |
Case-insensitive lexicographical comparison. More... | |
std::string | strftime (const std::string &format, const std::tm *time) |
bool | ci_search (const std::string &s1, const std::string &s2) |
const boost::locale::info & | get_effective_locale_info () |
A facet that holds general information about the effective locale. More... | |
static std::string | gettext (const char *str) |
static std::string | sgettext (const char *str) |
static std::string | sngettext (const char *str1, const char *str2, int n) |
auto | make_ci_matcher (std::string_view filter_text) |
Returns a function which performs locale-aware case-insensitive search. More... | |
void translation::bind_textdomain | ( | const char * | domain, |
const char * | directory, | ||
const char * | |||
) |
Definition at line 479 of file gettext.cpp.
References LOG_G.
Referenced by t_string::add_textdomain(), test_utils::game_config_manager::game_config_manager(), and init_locale().
bool translation::ci_search | ( | const std::string & | s1, |
const std::string & | s2 | ||
) |
Definition at line 565 of file gettext.cpp.
Referenced by events::menu_handler::do_search(), gui2::dialogs::preferences_dialog::hotkey_filter_callback(), make_ci_matcher(), and mp::game_info::match_string_filter().
int translation::compare | ( | const std::string & | s1, |
const std::string & | s2 | ||
) |
Case-sensitive lexicographical comparison.
Definition at line 502 of file gettext.cpp.
References ERR_G.
Referenced by ng::connect_engine::connect_engine(), icompare(), lua_common::impl_tstring_eq(), lua_common::impl_tstring_le(), lua_common::impl_tstring_lt(), help::is_valid_id(), help::section_less::operator()(), help::string_less::operator()(), help::title_less::operator()(), and about::credits_group::about_group::operator<().
std::string translation::dgettext | ( | const char * | domain, |
const char * | msgid | ||
) |
Definition at line 425 of file gettext.cpp.
References get_locale().
Referenced by dsgettext(), gui2::get_hp_tooltip(), and gettext().
std::string translation::dsgettext | ( | const char * | domainname, |
const char * | msgid | ||
) |
Definition at line 434 of file gettext.cpp.
References dgettext().
Referenced by _(), gui2::chatbox::find_or_create_window(), gui2::chatbox::room_window_open(), gui2::dialogs::screenshot_notification::save_screenshot(), sgettext(), t_string_base::str(), and vgettext_impl().
std::string translation::dsngettext | ( | const char * | domainname, |
const char * | singular, | ||
const char * | plural, | ||
int | n | ||
) |
Definition at line 464 of file gettext.cpp.
References get_locale(), and n.
Referenced by _n(), sngettext(), t_string_base::str(), and vngettext_impl().
std::string translation::egettext | ( | char const * | msgid | ) |
Definition at line 429 of file gettext.cpp.
References get_locale(), and gettext().
Referenced by attack_type::attack_type().
const boost::locale::info & translation::get_effective_locale_info | ( | ) |
A facet that holds general information about the effective locale.
This describes the actual translation target language, unlike language_def.localename in language.hpp, where the "System default language" is represented by an empty string.
Definition at line 576 of file gettext.cpp.
References get_locale().
Referenced by addon_info::translated_info(), and gui2::dialogs::title_screen::update_static_labels().
|
inlinestatic |
Definition at line 60 of file gettext.hpp.
References dgettext(), and GETTEXT_DOMAIN.
Referenced by add_status(), egettext(), help::unit_topic_generator::operator()(), game_launcher::play_multiplayer(), and unit_hp().
int translation::icompare | ( | const std::string & | s1, |
const std::string & | s2 | ||
) |
Case-insensitive lexicographical comparison.
Definition at line 519 of file gettext.cpp.
References compare(), e, and ERR_G.
Referenced by gui2::listbox::sort_helper::less(), gui2::listbox::sort_helper::more(), terrain_movement::operator<(), help::terrain_movement_info::operator<(), and mp::user_info::operator<().
|
inline |
Returns a function which performs locale-aware case-insensitive search.
Definition at line 24 of file ci_searcher.hpp.
References ci_search(), and utils::split().
Referenced by gui2::dialogs::game_load::apply_filter_text(), gui2::dialogs::log_settings::filter_text_changed(), gui2::dialogs::unit_create::filter_text_changed(), gui2::dialogs::unit_recall::filter_text_changed(), and gui2::dialogs::unit_recruit::filter_text_changed().
void translation::set_default_textdomain | ( | const char * | domain | ) |
Definition at line 487 of file gettext.cpp.
References LOG_G.
Referenced by test_utils::game_config_manager::game_config_manager(), and init_locale().
void translation::set_language | ( | const std::string & | language, |
const std::vector< std::string > * | |||
) |
Definition at line 494 of file gettext.cpp.
References LOG_G.
Referenced by test_utils::game_config_manager::game_config_manager(), get_locale(), game_launcher::init_language(), gui2::dialogs::language_selection::post_show(), set_language(), and config_cache_fixture::~config_cache_fixture().
|
inlinestatic |
Definition at line 62 of file gettext.hpp.
References dsgettext(), and GETTEXT_DOMAIN.
Referenced by events::menu_handler::ai_formula(), and events::menu_handler::user_command().
|
inlinestatic |
Definition at line 64 of file gettext.hpp.
References dsngettext(), GETTEXT_DOMAIN, and n.
std::string translation::strftime | ( | const std::string & | format, |
const std::tm * | time | ||
) |
Definition at line 555 of file gettext.cpp.
References dummy, and get_locale().
Referenced by gui2::dialogs::format_addon_time(), savegame::save_info::format_time_local(), and utils::format_time_summary().