diff options
author | Adam <Adam@anope.org> | 2010-09-26 02:33:01 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-09-26 02:33:01 -0400 |
commit | d646d455e2655be59f6d5bcc56710ac70548ca37 (patch) | |
tree | d236b9d4991d62538a0318f213416396734e72e0 /modules/extra/cs_appendtopic.cpp | |
parent | 05e6815d912f0418f6da25a2106dd718796f02fa (diff) |
Changed the language system to use gettext
Diffstat (limited to 'modules/extra/cs_appendtopic.cpp')
-rw-r--r-- | modules/extra/cs_appendtopic.cpp | 102 |
1 files changed, 8 insertions, 94 deletions
diff --git a/modules/extra/cs_appendtopic.cpp b/modules/extra/cs_appendtopic.cpp index 09ab3b481..e8ccde22b 100644 --- a/modules/extra/cs_appendtopic.cpp +++ b/modules/extra/cs_appendtopic.cpp @@ -41,14 +41,6 @@ /* DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING */ /* ---------------------------------------------------------------------- */ -enum -{ - LNG_CHAN_HELP, - LNG_CHAN_HELP_APPENDTOPIC, - LNG_APPENDTOPIC_SYNTAX, - LNG_NUM_STRINGS -}; - static Module *me; class CommandCSAppendTopic : public Command @@ -66,9 +58,9 @@ class CommandCSAppendTopic : public Command Channel *c = ci ? ci->c : NULL; if (!c) - notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str()); + u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str()); else if (!check_access(u, ci, CA_TOPIC)) - notice_lang(Config->s_ChanServ, u, ACCESS_DENIED); + u->SendMessage(ChanServ, ACCESS_DENIED); else { Anope::string topic; @@ -94,21 +86,23 @@ class CommandCSAppendTopic : public Command bool OnHelp(User *u, const Anope::string &subcommand) { - me->NoticeLang(Config->s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX); + me->SendMessage(ChanServ, u, _("Syntax: APPENDTOPIC channel text")); u->SendMessage(Config->s_ChanServ, " "); - me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_HELP_APPENDTOPIC); + me->SendMessage(ChanServ, u, _("This command allows users to append text to a currently set\n" + "channel topic. When TOPICLOCK is on, the topic is updated and\n" + "the new, updated topic is locked.")); return true; } void OnSyntaxError(User *u, const Anope::string &subcommand) { - me->NoticeLang(Config->s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX); + me->SendMessage(ChanServ, u, _("Syntax: APPENDTOPIC channel text")); } void OnServHelp(User *u) { - me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_HELP); + me->SendMessage(ChanServ, u, _(" APPENDTOPIC Add text to a channels topic")); } }; @@ -125,86 +119,6 @@ class CSAppendTopic : public Module this->SetType(SUPPORTED); this->AddCommand(ChanServ, &commandcsappendtopic); - - /* English (US) */ - const char *langtable_en_us[] = { - /* LNG_CHAN_HELP */ - " APPENDTOPIC Add text to a channels topic", - /* LNG_CHAN_HELP_APPENDTOPIC */ - "This command allows users to append text to a currently set\n" - "channel topic. When TOPICLOCK is on, the topic is updated and\n" - "the new, updated topic is locked.", - /* LNG_APPENDTOPIC_SYNTAX */ - "Syntax: APPENDTOPIC channel text\n" - }; - - /* Dutch (NL) */ - const char *langtable_nl[] = { - /* LNG_CHAN_HELP */ - " APPENDTOPIC Voeg tekst aan een kanaal onderwerp toe", - /* LNG_CHAN_HELP_APPENDTOPIC */ - "Dit command stelt gebruikers in staat om text toe te voegen\n" - "achter het huidige onderwerp van een kanaal. Als TOPICLOCK aan\n" - "staat, zal het onderwerp worden bijgewerkt en zal het nieuwe,\n" - "bijgewerkte topic worden geforceerd.", - /* LNG_APPENDTOPIC_SYNTAX */ - "Gebruik: APPENDTOPIC kanaal tekst\n" - }; - - /* German (DE) */ - const char *langtable_de[] = { - /* LNG_CHAN_HELP */ - " APPENDTOPIC Fьgt einen Text zu einem Channel-Topic hinzu.", - /* LNG_CHAN_HELP_APPENDTOPIC */ - "Dieser Befehl erlaubt Benutzern, einen Text zu dem vorhandenen Channel-Topic\n" - "hinzuzufьgen. Wenn TOPICLOCK gesetzt ist, wird das Topic aktualisiert\n" - "und das neue, aktualisierte Topic wird gesperrt.", - /* LNG_APPENDTOPIC_SYNTAX */ - "Syntax: APPENDTOPIC Channel Text\n" - }; - - /* Portuguese (PT) */ - const char *langtable_pt[] = { - /* LNG_CHAN_HELP */ - " APPENDTOPIC Adiciona texto ao tуpico de um canal", - /* LNG_CHAN_HELP_APPENDTOPIC */ - "Este comando permite aos usuбrios anexar texto a um tуpico de canal\n" - "jб definido. Quando TOPICLOCK estб ativado, o tуpico й atualizado e\n" - "o novo tуpico й travado.", - /* LNG_APPENDTOPIC_SYNTAX */ - "Sintaxe: APPENDTOPIC canal texto\n" - }; - - /* Russian (RU) */ - const char *langtable_ru[] = { - /* LNG_CHAN_HELP */ - " APPENDTOPIC Добавляет текст к топику канала", - /* LNG_CHAN_HELP_APPENDTOPIC */ - "Данная команда позволяет добавить текст к топику, который установлен на указанном\n" - "канале. Если активирован режим TOPICLOCK, топик будет обновлен и заблокирован.\n" - "Примечание: текст будет ДОБАВЛЕН к топику, то есть старый топик удален НЕ БУДЕТ.\n", - /* LNG_APPENDTOPIC_SYNTAX */ - "Синтаксис: APPENDTOPIC #канал текст\n" - }; - - /* Italian (IT) */ - const char *langtable_it[] = { - /* LNG_CHAN_HELP */ - " APPENDTOPIC Aggiunge del testo al topic di un canale", - /* LNG_CHAN_HELP_APPENDTOPIC */ - "Questo comando permette agli utenti di aggiungere del testo ad un topic di un canale\n" - "giа impostato. Se TOPICLOCK и attivato, il topic viene aggiornato e il nuovo topic\n" - "viene bloccato.", - /* LNG_APPENDTOPIC_SYNTAX */ - "Sintassi: APPENDTOPIC canale testo\n" - }; - - this->InsertLanguage(LANG_EN_US, LNG_NUM_STRINGS, langtable_en_us); - this->InsertLanguage(LANG_NL, LNG_NUM_STRINGS, langtable_nl); - this->InsertLanguage(LANG_DE, LNG_NUM_STRINGS, langtable_de); - this->InsertLanguage(LANG_PT, LNG_NUM_STRINGS, langtable_pt); - this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru); - this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it); } }; |