summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-01-13 05:37:40 -0500
committerAdam <Adam@anope.org>2013-01-13 22:07:27 -0500
commitd3a6bdc68bfc99b6e0926fda18544b58b2c2ca59 (patch)
treef98ef2426d969c1b2b83e66db782716a922e0bc8
parent402e42fd15bd9be4b721118bbbae03e22d9f433e (diff)
Allow the config parser to skip over gettext's _() to allow translating config values
-rw-r--r--data/chanserv.example.conf20
-rwxr-xr-xlanguage/update.sh2
-rw-r--r--src/config.cpp2
3 files changed, 13 insertions, 11 deletions
diff --git a/data/chanserv.example.conf b/data/chanserv.example.conf
index 0d83e6a3c..5b7afd43e 100644
--- a/data/chanserv.example.conf
+++ b/data/chanserv.example.conf
@@ -1209,7 +1209,7 @@ command
rewrite_souce = "OWNER $"
rewrite_target = "MODE $1 SET +q $2"
- rewrite_description = "Gives you owner status on channel"
+ rewrite_description = _("Gives you owner status on channel")
}
command
{
@@ -1219,7 +1219,7 @@ command
rewrite_source = "DEOWNER $"
rewrite_target = "MODE $1 SET -q $2"
- rewrite_description = "Removes your owner status on a channel"
+ rewrite_description = _("Removes your owner status on a channel")
}
command
@@ -1230,7 +1230,7 @@ command
rewrite_source = "PROTECT $"
rewrite_target = "MODE $1 SET +a $2"
- rewrite_description = "Protects a selected nick on a channel"
+ rewrite_description = _("Protects a selected nick on a channel")
}
command
{
@@ -1240,7 +1240,7 @@ command
rewrite_source = "DEPROTECT $"
rewrite_target = "MODE $1 SET -a $2"
- rewrite_description = "Deprotects a selected nick on a channel"
+ rewrite_description = _("Deprotects a selected nick on a channel")
}
command
@@ -1251,7 +1251,7 @@ command
rewrite_source = "OP $"
rewrite_target = "MODE $1 SET +o $2"
- rewrite_description = "Gives Op status to a selected nick on a channel"
+ rewrite_description = _("Gives Op status to a selected nick on a channel")
}
command
@@ -1262,7 +1262,7 @@ command
rewrite_source = "DEOP $"
rewrite_target = "MODE $1 SET -o $2";
- rewrite_description = "Deops a selected nick on a channel"
+ rewrite_description = _("Deops a selected nick on a channel")
}
/* HALFOP and DEHALFOP commands */
@@ -1274,7 +1274,7 @@ command
rewrite_source = "HALFOP $"
rewrite_target = "MODE $1 SET +h $2"
- rewrite_description = "Halfops a selected nick on a channel"
+ rewrite_description = _("Halfops a selected nick on a channel")
}
command
@@ -1285,7 +1285,7 @@ command
rewrite_source = "DEHALFOP $"
rewrite_target = "MODE $1 SET -h $2"
- rewrite_description = "Dehalfops a selected nick on a channel"
+ rewrite_description = _("Dehalfops a selected nick on a channel")
}
/* VOICE and DEVOICE commands */
@@ -1297,7 +1297,7 @@ command
rewrite_source = "VOICE $"
rewrite_target = "MODE $1 SET +v $2"
- rewrite_description = "Voices a selected nick on a channel"
+ rewrite_description = _("Voices a selected nick on a channel")
}
command
@@ -1308,7 +1308,7 @@ command
rewrite_source = "DEVOICE $"
rewrite_target = "MODE $1 SET -v $2"
- rewrite_description = "Devoices a selected nick on a channel"
+ rewrite_description = _("Devoices a selected nick on a channel")
}
diff --git a/language/update.sh b/language/update.sh
index 9a14b2bc2..65186ecfe 100755
--- a/language/update.sh
+++ b/language/update.sh
@@ -4,7 +4,7 @@ rm -f anope.pot
touch anope.pot
cd ..
-FILES=`find ./ -name *.cpp -o -name *.h | grep -v /modules/third/`
+FILES=`find ./ -name *.cpp -o -name *.h -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
diff --git a/src/config.cpp b/src/config.cpp
index f287d72ce..6c99e9c6e 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -1645,6 +1645,8 @@ void ServerConfig::LoadConf(ConfigurationFile &file)
++c;
continue;
}
+ else if (!in_word && (ch == '(' || ch == '_' || ch == ')'))
+ ;
else if (ch == '"')
{
// Quotes are valid only in the value position