1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 15:36:38 +02:00

Changed the language system to use gettext

This commit is contained in:
Adam
2010-09-26 02:33:01 -04:00
parent 05e6815d91
commit d646d455e2
239 changed files with 168730 additions and 90259 deletions
+2 -13
View File
@@ -101,9 +101,6 @@ ServerConfig::ServerConfig() : errstr(""), config_data()
}
}
if ((this->NSDefLanguage = langlist[this->NSDefLanguage]) < 0)
this->NSDefLanguage = DEF_LANGUAGE;
if (this->CSDefBantype < 0 || this->CSDefBantype > 3)
{
throw ConfigException("Value of CSDefBantype must be between 0 and 3 included");
@@ -530,15 +527,6 @@ bool ValidatePort(ServerConfig *, const Anope::string &tag, const Anope::string
return true;
}
bool ValidateLanguage(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &data)
{
int language = data.GetInteger();
if (language < 1 || language > USED_LANGS)
throw ConfigException("The value for <nickserv:defaultlanguage> must be between 1 and " + stringify(USED_LANGS) + "!");
data.Set(--language);
return true;
}
bool ValidateGuestPrefix(ServerConfig *conf, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
ValidateNotEmpty(conf, tag, value, data);
@@ -1059,7 +1047,8 @@ void ServerConfig::Read()
{"nickserv", "modules", "", new ValueContainerString(&NickCoreModules), DT_STRING, NoValidation},
{"nickserv", "forceemail", "no", new ValueContainerBool(&this->NSForceEmail), DT_BOOLEAN, ValidateEmailReg},
{"nickserv", "defaults", "secure memosignon memoreceive", new ValueContainerString(&NSDefaults), DT_STRING, NoValidation},
{"nickserv", "defaultlanguage", "0", new ValueContainerUInt(&this->NSDefLanguage), DT_UINTEGER, ValidateLanguage},
{"nickserv", "languages", "", new ValueContainerString(&this->Languages), DT_STRING, NoValidation},
{"nickserv", "defaultlanguage", "0", new ValueContainerString(&this->NSDefLanguage), DT_STRING, NoValidation},
{"nickserv", "regdelay", "0", new ValueContainerTime(&this->NSRegDelay), DT_TIME, NoValidation},
{"nickserv", "resenddelay", "0", new ValueContainerTime(&this->NSResendDelay), DT_TIME, NoValidation},
{"nickserv", "expire", "21d", new ValueContainerTime(&this->NSExpire), DT_TIME, NoValidation},