From d646d455e2655be59f6d5bcc56710ac70548ca37 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 26 Sep 2010 02:33:01 -0400 Subject: Changed the language system to use gettext --- include/services.h | 54 ++++++++++-------------------------------------------- 1 file changed, 10 insertions(+), 44 deletions(-) (limited to 'include/services.h') diff --git a/include/services.h b/include/services.h index 947a8cc30..8748bd290 100644 --- a/include/services.h +++ b/include/services.h @@ -708,19 +708,11 @@ enum /*************************************************************************/ -struct LevelInfo -{ - int what; - Anope::string name; - int desc; -}; - -/*************************************************************************/ - /* This structure stocks ban data since it must not be removed when * user is kicked. */ +#include "language.h" #include "users.h" #include "account.h" #include "bots.h" @@ -732,6 +724,13 @@ struct BanData int16 ttb[TTB_SIZE]; }; +struct LevelInfo +{ + int what; + Anope::string name; + LanguageString desc; +}; + #include "channels.h" /** Channelban type flags @@ -777,8 +776,6 @@ struct IgnoreData /* News stuff */ -#define MSG_MAX 11 - enum NewsType { NEWS_LOGON, @@ -786,11 +783,11 @@ enum NewsType NEWS_OPER }; -struct newsmsgs +struct NewsMessages { NewsType type; Anope::string name; - int msgs[MSG_MAX + 1]; + LanguageString msgs[10]; }; struct NewsItem @@ -857,37 +854,6 @@ enum DefconLevel /*************************************************************************/ -/* Languages. Never insert anything in the middle of this list, or - * everybody will start getting the wrong language! If you want to change - * the order the languages are displayed in for NickServ HELP SET LANGUAGE, - * do it in language.c. - */ -enum Languages -{ - LANG_EN_US, /* United States English */ - LANG_JA_JIS, /* Japanese (JIS encoding) */ - LANG_JA_EUC, /* Japanese (EUC encoding) */ - LANG_JA_SJIS, /* Japanese (SJIS encoding) */ - LANG_ES, /* Spanish */ - LANG_PT, /* Portugese */ - LANG_FR, /* French */ - LANG_TR, /* Turkish */ - LANG_IT, /* Italian */ - LANG_DE, /* German */ - LANG_CAT, /* Catalan */ - LANG_GR, /* Greek */ - LANG_NL, /* Dutch */ - LANG_RU, /* Russian */ - LANG_HUN, /* Hungarian */ - LANG_PL, /* Polish */ - NUM_LANGS /* Number of languages */ -}; -static const int USED_LANGS = 13; /* Number of languages provided */ - -static const int DEF_LANGUAGE = LANG_EN_US; - -/*************************************************************************/ - /** * RFC: defination of a valid nick * nickname = ( letter / special ) *8( letter / digit / special / "-" ) -- cgit