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:
+10947
File diff suppressed because it is too large
Load Diff
+1
-5
@@ -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
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user