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

Allow the config parser to skip over gettext's _() to allow translating config values

This commit is contained in:
Adam
2013-01-13 05:37:40 -05:00
parent 402e42fd15
commit d3a6bdc68b
3 changed files with 13 additions and 11 deletions
+10 -10
View File
@@ -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")
}
+1 -1
View File
@@ -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
+2
View File
@@ -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