]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/fortune.pm
* Search in default location for templates as a fallback when templatedir is
[ikiwiki.git] / IkiWiki / Plugin / fortune.pm
index 43f4526af3a99812ccfad101526b3242aabed088..3bab134bed8e8d4bf152dee04bbff1bdb42a9727 100644 (file)
@@ -12,10 +12,10 @@ sub import { #{{{
 
 sub preprocess (@) { #{{{
        $ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
-       my $f = `fortune`;
+       my $f = `fortune 2>/dev/null`;
 
        if ($?) {
-               return "[[fortune failed]]";
+               return "[[".gettext("fortune failed")."]]";
        }
        else {
                return "<pre>$f</pre>\n";