summaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-01-03 12:52:47 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-01-03 12:52:47 -0500
commitb0a03fef656989ccf2552262ab8230f980821861 (patch)
tree6729d0bb9bd3b6bf72c85a5a1dacd166bdf7ff5f /IkiWiki.pm
parent66ff63c296b5be28a95b32d849926714470049af (diff)
yesno: Always accept English even when localised.
It seems to be a failing of i18n in unix that the translation stops at the commands and the parameters to them, and ikiwiki is no exception with its currently untranslated directives. So the little bit that's translated sticks out like a sore thumb. It also breaks building of wikis if a different locale happens to be set. I suppose the best thing to do is either give up on the localisation of this part completly, or make it recognise English in addition to the locale. I've tenatively chosen the latter. (Also accept 1 and 0 as input.)
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index e509a7c2f..7eef4c320 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1658,7 +1658,7 @@ sub gettext {
sub yesno ($) {
my $val=shift;
- return (defined $val && lc($val) eq gettext("yes"));
+ return (defined $val && (lc($val) eq gettext("yes") || lc($val) eq "yes" || $val eq "1"));
}
sub inject {