From 0ea97311cfdf6951ed31138fc1899ebde45d7223 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 1 Oct 2018 15:28:52 +0100 Subject: [PATCH] i18n: Dgit.pm: mark final batch of messages (2) Signed-off-by: Ian Jackson --- Debian/Dgit.pm | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 5a13e0a1..004daeb9 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -541,8 +541,8 @@ sub git_check_unmodified () { if ($?==256) { fail $cached - ? "git index contains changes (does not match HEAD)" - : "working tree is dirty (does not match HEAD)"; + ? __ "git index contains changes (does not match HEAD)" + : __ "working tree is dirty (does not match HEAD)"; } else { failedcmd @cmd; } @@ -613,8 +613,8 @@ sub gdr_ffq_prev_branchinfo ($) { # branch message is undef # weird-symref } no $symref, # notbranch } no $ffq_prev - return ('detached', 'detached HEAD') unless defined $symref; - return ('weird-symref', 'HEAD symref is not to refs/') + return ('detached', __ 'detached HEAD') unless defined $symref; + return ('weird-symref', __ 'HEAD symref is not to refs/') unless $symref =~ m{^refs/}; my $ffq_prev = "refs/$ffq_refprefix/$'"; my $gdrlast = "refs/$gdrlast_refprefix/$'"; @@ -630,7 +630,7 @@ sub parsecontrolfh ($$;$) { my %opts = ('name' => $desc); $opts{allow_pgp}= $allowsigned || !$dpkgcontrolhash_noissigned; $c = Dpkg::Control::Hash->new(%opts); - $c->parse($fh,$desc) or fail "parsing of $desc failed"; + $c->parse($fh,$desc) or fail f_ "parsing of %s failed", $desc; last if $allowsigned; last if $dpkgcontrolhash_noissigned; my $issigned= $c->get_option('is_pgp_signed'); @@ -638,9 +638,11 @@ sub parsecontrolfh ($$;$) { $dpkgcontrolhash_noissigned= 1; seek $fh, 0,0 or confess "seek $desc: $!"; } elsif ($issigned) { - fail "control file $desc is (already) PGP-signed. ". + fail f_ + "control file %s is (already) PGP-signed. ". " Note that dgit push needs to modify the .dsc and then". - " do the signature itself"; + " do the signature itself", + $desc; } else { last; } @@ -651,7 +653,7 @@ sub parsecontrolfh ($$;$) { sub parsecontrol { my ($file, $desc, $allowsigned) = @_; my $fh = new IO::Handle; - open $fh, '<', $file or fail "open $file ($desc): $!"; + open $fh, '<', $file or fail f_ "open %s (%s): %s", $file, $desc, $!; my $c = parsecontrolfh($fh,$desc,$allowsigned); $fh->error and confess $!; close $fh; @@ -737,7 +739,7 @@ sub reflog_cache_insert ($$$) { # git update-ref doesn't always update, in this case. *sigh* my $authline = (ucfirst _us()). ' <'._us().'@example.com> 1000000000 +0000'; - my $dummy = make_commit_text <