1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 19:03:13 +02:00

Add English language file which users can edit to modify language strings

This commit is contained in:
Adam
2014-05-20 11:41:05 -04:00
parent e581158645
commit 4034b3054a
5 changed files with 10951 additions and 14 deletions
File diff suppressed because it is too large Load Diff
+1 -5
View File
@@ -5,11 +5,7 @@ touch anope.pot
cd ..
FILES=`find ./ -name *.cpp -o -name *.h -o -name *.conf | grep -v /modules/third/`
for f in $FILES
do
xgettext -E -C -s -d Anope -j -o language/anope.pot --from-code=utf-8 --keyword --keyword=_ $f
done
xgettext -E -C -s -d Anope -j -o language/anope.pot --from-code=utf-8 --keyword --keyword=_ $FILES
cd -
for f in *.po
+2 -2
View File
@@ -794,7 +794,7 @@ class CommandNSSetLanguage : public Command
if (MOD_RESULT == EVENT_STOP)
return;
if (param != "en")
if (param != "en_US")
for (unsigned j = 0; j < Language::Languages.size(); ++j)
{
if (Language::Languages[j] == param)
@@ -826,7 +826,7 @@ class CommandNSSetLanguage : public Command
"\037language\037 should be chosen from the following list of\n"
"supported languages:"));
source.Reply(" en (English)");
source.Reply(" en_US (English)");
for (unsigned j = 0; j < Language::Languages.size(); ++j)
{
const Anope::string &langname = Language::Translate(Language::Languages[j].c_str(), _("English"));
-7
View File
@@ -76,19 +76,12 @@ const char *Language::Translate(const NickCore *nc, const char *string)
#if GETTEXT_FOUND
/* Used by gettext to make it always dynamically load language strings (so we can drop them in while Anope is running) */
extern "C" int _nl_msg_cat_cntr;
const char *Language::Translate(const char *lang, const char *string)
{
if (!string || !*string)
return "";
if (!lang || !*lang)
lang = Config->DefLanguage.c_str();
if (Anope::string(lang) == "en")
return string;
++_nl_msg_cat_cntr;
#ifdef _WIN32
+1
View File
@@ -26,6 +26,7 @@ static struct WindowsLanguage
{"ca_ES", LANG_CATALAN},
{"de_DE", LANG_GERMAN},
{"el_GR", LANG_GREEK},
{"en_US", LANG_ENGLISH},
{"es_ES", LANG_SPANISH},
{"fr_FR", LANG_FRENCH},
{"hu_HU", LANG_HUNGARIAN},