mirror of
https://github.com/anope/anope.git
synced 2026-06-27 16:26:39 +02:00
Changed the language system to use gettext
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user