1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 17:56:38 +02:00

Partial fix for finding gettext with CMake, still doesn't fix the lack of finding non-standard paths though.

This commit is contained in:
Naram Qashat
2010-09-26 15:35:24 -04:00
parent f3840ed110
commit 7db5e19f74
7 changed files with 12 additions and 14 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
#include "services.h"
#if HAVE_GETTEXT
#if GETTEXT_FOUND
# include <libintl.h>
# define _(x) gettext(x)
#else
@@ -11,7 +11,7 @@ std::vector<Anope::string> languages;
void InitLanguages()
{
#if HAVE_GETTEXT
#if GETTEXT_FOUND
languages.clear();
spacesepstream sep(Config->Languages);
Anope::string language;
@@ -40,7 +40,7 @@ void InitLanguages()
const Anope::string GetString(Anope::string language, LanguageString string)
{
#if HAVE_GETTEXT
#if GETTEXT_FOUND
/* For older databases */
if (language == "en")
language.clear();
@@ -53,7 +53,7 @@ const Anope::string GetString(Anope::string language, LanguageString string)
#endif
return language_strings[string];
#if HAVE_GETTEXT
#if GETTEXT_FOUND
setlocale(LC_ALL, language.c_str());
const char *ret = dgettext("anope", language_strings[string].c_str());
setlocale(LC_ALL, "");