X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/055be361f5abfc989e32215f5dd6976af4a49bcd..c84b4cefccf5c3d0a642429c5d9972c4ff39a47a:/IkiWiki/Plugin/po.pm diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index f25beba72..5756f8f55 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -32,7 +32,7 @@ sub import { hook(type => "getsetup", id => "po", call => \&getsetup); hook(type => "checkconfig", id => "po", call => \&checkconfig); hook(type => "needsbuild", id => "po", call => \&needsbuild); - hook(type => "scan", id => "po", call => \&scan, last =>1); + hook(type => "scan", id => "po", call => \&scan, last => 1); hook(type => "filter", id => "po", call => \&filter); hook(type => "htmlize", id => "po", call => \&htmlize); hook(type => "pagetemplate", id => "po", call => \&pagetemplate, last => 1); @@ -141,9 +141,7 @@ sub checkconfig () { ! defined $config{po_link_to}) { $config{po_link_to}='default'; } - elsif (! grep { - $config{po_link_to} eq $_ - } ('default', 'current', 'negotiated')) { + elsif ($config{po_link_to} !~ /^(default|current|negotiated)$/) { warn(sprintf(gettext('%s is not a valid value for po_link_to, falling back to po_link_to=default'), $config{po_link_to})); $config{po_link_to}='default';