From ba30b66cfd502a20bf9c16b307f08862c5051b7a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 1 Oct 2018 13:29:08 +0100 Subject: i18n: dgit: mark some messages (7) Signed-off-by: Ian Jackson --- dgit | 60 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/dgit b/dgit index 0046e9f..e230583 100755 --- a/dgit +++ b/dgit @@ -5065,8 +5065,9 @@ sub i_resp_want ($) { pushing(); rpush_handle_protovsn_bothends(); - fail "rpush negotiated protocol version $protovsn". - " which does not support quilt mode $quilt_mode" + fail f_ "rpush negotiated protocol version %s". + " which does not support quilt mode %s", + $protovsn, $quilt_mode if quiltmode_splitbrain; my @localpaths = i_method "i_want", $keyword; @@ -5109,10 +5110,10 @@ sub i_file_buildinfo { if (!forceing [qw(buildinfo-changes-mismatch)]) { files_compare_inputs($bd, $ch); (getfield $bd, $_) eq (getfield $ch, $_) or - fail "buildinfo mismatch in field $_" + fail f_ "buildinfo mismatch in field %s", $_ foreach qw(Source Version); !defined $bd->{$_} or - fail "buildinfo contains forbidden field $_" + fail f_ "buildinfo contains forbidden field %s", $_ foreach qw(Changes Changed-by Distribution); } push @i_buildinfos, $bi; @@ -5153,7 +5154,7 @@ sub i_want_signed_tag { return push_mktags $i_clogp, $i_dscfn, - $i_changesfn, 'remote changes file', + $i_changesfn, (__ 'remote changes file'), \@tagwants; } @@ -5179,7 +5180,7 @@ sub quiltify_dpkg_commit ($$$;$) { mkpath '.git/dgit'; # we are in playtree my $descfn = ".git/dgit/quilt-description.tmp"; - open O, '>', $descfn or die "$descfn: $!"; + open O, '>', $descfn or confess "$descfn: $!"; $msg =~ s/\n+/\n\n/; print O <{O2H} & 01)) { - my $msg = - "--quilt=$quilt_mode specified, implying patches-unapplied git tree\n". - " but git tree differs from orig in upstream files."; + my $msg = f_ + "--quilt=%s specified, implying patches-unapplied git tree\n". + " but git tree differs from orig in upstream files.", + $quilt_mode; $msg .= $fulldiffhint->($unapplied, 'HEAD'); if (!stat_exists "debian/patches") { - $msg .= + $msg .= __ "\n ... debian/patches is missing; perhaps this is a patch queue branch?"; } fail $msg; } if ($quilt_mode =~ m/dpm/ && ($diffbits->{H2A} & 01)) { - fail <($oldtiptree,'HEAD'); ---quilt=$quilt_mode specified, implying patches-applied git tree + fail +(f_ <($oldtiptree,'HEAD'); +--quilt=%s specified, implying patches-applied git tree but git tree differs from result of applying debian/patches to upstream END } if ($quilt_mode =~ m/gbp|unapplied/ && ($diffbits->{O2A} & 01)) { # some patches quiltify_splitbrain_needed(); - progress "dgit view: creating patches-applied version using gbp pq"; + progress __ "dgit view: creating patches-applied version using gbp pq"; runcmd shell_cmd 'exec >/dev/null', gbp_pq, qw(import); # gbp pq import creates a fresh branch; push back to dgit-view runcmd @git, qw(update-ref refs/heads/dgit-view HEAD); @@ -5334,8 +5337,8 @@ END } if ($quilt_mode =~ m/gbp|dpm/ && ($diffbits->{O2A} & 02)) { - fail <{O2H} & 02) && # user has modified .gitignore !($diffbits->{O2A} & 02)) { # patches do not change .gitignore quiltify_splitbrain_needed(); - progress "dgit view: creating patch to represent .gitignore changes"; + progress __ + "dgit view: creating patch to represent .gitignore changes"; ensuredir "debian/patches"; my $gipatch = "debian/patches/auto-gitignore"; - open GIPATCH, ">>", "$gipatch" or die "$gipatch: $!"; - stat GIPATCH or die "$gipatch: $!"; - fail "$gipatch already exists; but want to create it". - " to record .gitignore changes" if (stat _)[7]; + open GIPATCH, ">>", "$gipatch" or confess "$gipatch: $!"; + stat GIPATCH or confess "$gipatch: $!"; + fail f_ "%s already exists; but want to create it". + " to record .gitignore changes", + $gipatch + if (stat _)[7]; print GIPATCH <