From 18c41ad7f852905ddf59eede58d0697390d0b36a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 1 Oct 2018 14:36:45 +0100 Subject: i18n: dgit: mark some messages (10) Signed-off-by: Ian Jackson --- dgit | 167 +++++++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 93 insertions(+), 74 deletions(-) diff --git a/dgit b/dgit index 77c85e5..32b024e 100755 --- a/dgit +++ b/dgit @@ -6149,7 +6149,7 @@ sub quilt_fixup_editor () { sub maybe_apply_patches_dirtily () { return unless $quilt_mode =~ m/gbp|unapplied/; - print STDERR <[0] } @vsns; @vsns = sort { -version_compare($a, $b) } @vsns; $changes_since_version = $vsns[0]; - progress "changelog will contain changes since $vsns[0]"; + progress f_ "changelog will contain changes since %s", $vsns[0]; } else { $changes_since_version = '_'; - progress "package seems new, not specifying -v"; + progress __ "package seems new, not specifying -v"; } } if ($changes_since_version ne '_') { @@ -6322,14 +6325,14 @@ sub massage_dbp_args ($;$) { $r |= WANTSRC_SOURCE if grep { s/^full$/binary/ } @d; $r |= WANTSRC_SOURCE if grep { s/^source$// } @d; $r |= WANTSRC_BUILDER if grep { m/./ } @d; - fail "Wanted to build nothing!" unless $r; + fail __ "Wanted to build nothing!" unless $r; $dmode = '--build='. join ',', grep m/./, @d; } else { $r = $dmode =~ m/[S]/ ? WANTSRC_SOURCE : $dmode =~ y/gGF/ABb/ ? WANTSRC_SOURCE | WANTSRC_BUILDER : $dmode =~ m/[ABb]/ ? WANTSRC_BUILDER : - die "$dmode ?"; + confess "$dmode ?"; } printdebug "massage done $r $dmode.\n"; push @$cmd, $dmode; @@ -6359,32 +6362,35 @@ sub postbuild_mergechanges ($) { } @changesfiles; my $result; if (@changesfiles==1) { - fail <; }; - D->error and fail "read $dscfn: $!"; + D->error and fail f_ "read %s: %s", $dscfn, $!; close C; # we don't normally need this so import it here @@ -6754,13 +6769,13 @@ sub cmd_import_dsc { local $SIG{__WARN__} = sub { print STDERR $_[0]; return unless $needsig; - fail "import-dsc signature check failed"; + fail __ "import-dsc signature check failed"; }; if (!$dp->is_signed()) { - warn "$us: warning: importing unsigned .dsc\n"; + warn f_ "%s: warning: importing unsigned .dsc\n", $us; } else { my $r = $dp->check_signature(); - die "->check_signature => $r" if $needsig && $r; + confess "->check_signature => $r" if $needsig && $r; } } @@ -6768,7 +6783,7 @@ sub cmd_import_dsc { $package = getfield $dsc, 'Source'; - parse_dsc_field($dsc, "Dgit metadata in .dsc") + parse_dsc_field($dsc, __ "Dgit metadata in .dsc") unless forceing [qw(import-dsc-with-dgit-field)]; parse_dsc_field_def_dsc_distro(); @@ -6778,7 +6793,8 @@ sub cmd_import_dsc { notpushing(); if (defined $dsc_hash) { - progress "dgit: import-dsc of .dsc with Dgit field, using git hash"; + progress __ + "dgit: import-dsc of .dsc with Dgit field, using git hash"; resolve_dsc_field_commit undef, undef; } if (defined $dsc_hash) { @@ -6786,29 +6802,29 @@ sub cmd_import_dsc { "echo $dsc_hash | git cat-file --batch-check"); my $objgot = cmdoutput @cmd; if ($objgot =~ m#^\w+ missing\b#) { - fail < 0) { - progress "Not fast forward, forced update."; + progress __ "Not fast forward, forced update."; } else { - fail "Not fast forward to $dsc_hash"; + fail f_ "Not fast forward to %s", $dsc_hash; } } import_dsc_result $dstbranch, $dsc_hash, "dgit import-dsc (Dgit): $info", - "updated git ref $dstbranch"; + f_ "updated git ref %s", $dstbranch; return 0; } - fail <