From c0197404a15a3937ef3cd21f48a09e691a96518f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 30 May 2014 21:03:20 +0300 Subject: fix code style. --- src/utils/gettexthelper.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/utils/gettexthelper.cpp') diff --git a/src/utils/gettexthelper.cpp b/src/utils/gettexthelper.cpp index 59f4933ad..3d10c6848 100644 --- a/src/utils/gettexthelper.cpp +++ b/src/utils/gettexthelper.cpp @@ -20,13 +20,22 @@ #include "utils/gettexthelper.h" +#include "client.h" +#include "configuration.h" + #include "debug.h" +#ifdef ENABLE_NLS +#include "logger.h" + +#include +#endif + #ifdef WIN32 +#include extern "C" char const *_nl_locale_name_default(void); #endif - void GettextHelper::initLang() { #ifdef ENABLE_NLS @@ -44,8 +53,8 @@ void GettextHelper::initLang() if (!lang.empty()) { - setEnv("LANG", lang.c_str()); - setEnv("LANGUAGE", lang.c_str()); + Client::setEnv("LANG", lang.c_str()); + Client::setEnv("LANGUAGE", lang.c_str()); } #ifdef ANDROID #ifdef USE_SDL2 @@ -87,16 +96,19 @@ void GettextHelper::initLang() bind_textdomain_codeset("manaplus", "UTF-8"); textdomain("manaplus"); #endif // ENABLE_NLS - } +#ifdef ENABLE_NLS void GettextHelper::bindTextDomain(const char *const path) { -#ifdef ENABLE_NLS const char *const dir = bindtextdomain("manaplus", path); if (dir) logger->log("bindtextdomain: %s", dir); else logger->log("bindtextdomain failed"); -#endif } +#else +void GettextHelper::bindTextDomain(const char *const path A_UNUSED) +{ +} +#endif -- cgit v1.2.3-70-g09d2