Skip to content

Commit

Permalink
More readable
Browse files Browse the repository at this point in the history
  • Loading branch information
minduser00 authored and SmallJoker committed Apr 9, 2018
1 parent fd247d5 commit e1bbc7e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/gettext.h
Expand Up @@ -51,19 +51,11 @@ extern wchar_t *utf8_to_wide_c(const char *str);
// The returned string is allocated using new
inline const wchar_t *wgettext(const char *str)
{
#if USE_GETTEXT
// We must check here that is not an empty string to avoid trying to translate it
return str[0] ? utf8_to_wide_c(gettext(str)) : utf8_to_wide_c("");
#else
return utf8_to_wide_c(str);
#endif
}

inline std::string strgettext(const std::string &text)
{
#if USE_GETTEXT
return text.empty() ? text.c_str() : gettext(text.c_str());
#else
return text.c_str();
#endif
}

0 comments on commit e1bbc7e

Please sign in to comment.