]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Setup.pm
Merge branch 'master' of ssh://git.kitenet.net/srv/git/ikiwiki.info
[ikiwiki.git] / IkiWiki / Setup.pm
index 9f210dec896e136c8f9536348fa07626fdda2c9d..235e93eafa061219e96736787273106ee6a32225 100644 (file)
@@ -3,13 +3,16 @@
 use warnings;
 use strict;
 use IkiWiki;
+use open qw{:utf8 :std};
 
 package IkiWiki;
 
 sub setup () { # {{{
        my $setup=possibly_foolish_untaint($config{setup});
        delete $config{setup};
-       open (IN, $setup) || error("read $setup: $!\n");
+       #translators: The first parameter is a filename, and the second
+       #translators: is a (probably not translated) error message.
+       open (IN, $setup) || error(sprintf(gettext("cannot read %s: %s"), $setup, $!));
        my $code;
        {
                local $/=undef;
@@ -19,7 +22,7 @@ sub setup () { # {{{
        close IN;
 
        eval $code;
-       error($@) if $@;
+       error("$setup: ".$@) if $@;
 
        exit;
 } #}}}