X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3b0fce93e40e5457b63ceda9692901539eb4fc82..e9a40c8716afd6076c630a140186ee7b2ec9cfb4:/IkiWiki/Setup.pm

diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm
index 9f210dec8..235e93eaf 100644
--- a/IkiWiki/Setup.pm
+++ b/IkiWiki/Setup.pm
@@ -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;
 } #}}}