From 3b8ba9b6ada2143617a7ce5934010771e34fad7d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 2 Oct 2018 16:59:04 +0100 Subject: [PATCH] i18n: git-debrebase: mark some messages (4) Signed-off-by: Ian Jackson --- git-debrebase | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/git-debrebase b/git-debrebase index 3101ae7d..4484bea9 100755 --- a/git-debrebase +++ b/git-debrebase @@ -2698,10 +2698,10 @@ sub cmd_convert_to_gbp () { } snags_maybe_bail(); update_head_checkout $head, $out, "convert to gbp (v0)"; - print <1; + fail __ "takes 1 optional argument, the upstream commitish" if @ARGV>1; my @upstreams; @@ -2728,7 +2728,7 @@ sub cmd_convert_from_dgit_view () { my $spec = shift @ARGV; my $commit = git_rev_parse "$spec^{commit}"; push @upstreams, { Commit => $commit, - Source => "$ARGV[0], from command line", + Source => (f_ "%s, from command line", $ARGV[0]), Only => 1, }; } @@ -2741,12 +2741,13 @@ sub cmd_convert_from_dgit_view () { keycommits $head, sub{}, sub{}, $trouble, $trouble; printdebug "troubles=$troubles\n"; if (!$troubles) { - print STDERR <{Version}; - print STDERR "Considering possible commits corresponding to upstream:\n"; + print STDERR __ + "Considering possible commits corresponding to upstream:\n"; if (!@upstreams) { if ($do_tags) { my @tried; my $ups_tag = upstream_commitish_search $version, \@tried; if ($ups_tag) { - my $this = "git tag $tried[-1]"; + my $this = f_ "git tag %s", $tried[-1]; push @upstreams, { Commit => $ups_tag, Source => $this, }; } else { - printf STDERR + print STDERR f_ " git tag: no suitable tag found (tried %s)\n", "@tried"; } @@ -2778,11 +2780,12 @@ END # we do a quick check to see if there are plausible origs my $something=0; if (!opendir BPD, $bpd) { - die "opendir build-products-dir $bpd: $!" unless $!==ENOENT; + die f_ "opendir build-products-dir %s: %s", $bpd, $! + unless $!==ENOENT; } else { while ($!=0, my $f = readdir BPD) { next unless is_orig_file_of_p_v $f, $p, $version; - printf STDERR + print STDERR f_ " orig: found what looks like a .orig, %s\n", "$bpd/$f"; $something=1; @@ -2813,7 +2816,7 @@ END }; } } else { - printf STDERR + print STDERR f_ " orig: no suitable origs found (looked for %s in %s)\n", "${p}_".(stripeoch $version)."...", $bpd; } @@ -2822,7 +2825,8 @@ END my $some_patches = stat_exists 'debian/patches/series'; - print STDERR "Evaluating possible commits corresponding to upstream:\n"; + print STDERR __ + "Evaluating possible commits corresponding to upstream:\n"; my $result; foreach my $u (@upstreams) { @@ -2858,7 +2862,7 @@ END } my $r = system @gbp_cmd; if ($r) { - printf STDERR + print STDERR f_ " %s: couldn't apply patches: gbp pq %s", $u->{Source}, waitstatusmsg(); return; @@ -2867,8 +2871,9 @@ END my $work = git_rev_parse qw(HEAD); my $diffout = cmdoutput @git, qw(diff-tree --stat HEAD), $work; if (length $diffout) { - print STDERR - " $u->{Source}: applying patches gives different tree\n"; + print STDERR f_ + " %s: applying patches gives different tree\n", + $u->{Source}; print STDERR $diffout if $diagnose; return; } @@ -2880,7 +2885,7 @@ END } if (!$result) { - fail <