From b30764495d682a756d2b3bd13935c3be46a0d339 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 29 Sep 2018 01:24:24 +0100 Subject: i18n: Flag a handful of messages for translation This is just useful for testing the forthcoming machinery, so far. Signed-off-by: Ian Jackson --- Debian/Dgit.pm | 2 +- dgit | 11 ++++++----- git-debrebase | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 6642917..b1aa620 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -672,7 +672,7 @@ sub getfield ($$) { my ($dctrl,$field) = @_; my $v = $dctrl->{$field}; return $v if defined $v; - fail "missing field $field in ".$dctrl->get_option('name'); + fail ___ "missing field %s in %s", $field, $dctrl->get_option('name'); } sub parsechangelog_loop ($$$) { diff --git a/dgit b/dgit index 6a3c4da..238d324 100755 --- a/dgit +++ b/dgit @@ -1474,10 +1474,11 @@ sub madison_get_parse { sub canonicalise_suite_madison { # madison canonicalises for us my @r = madison_get_parse(@_); - @r or fail - "unable to canonicalise suite using package $package". - " which does not appear to exist in suite $isuite;". - " --existing-package may help"; + @r or fail ___ + "unable to canonicalise suite using package %s". + " which does not appear to exist in suite %s;". + " --existing-package may help", + $package, $isuite; return $r[0][2]; } @@ -7192,7 +7193,7 @@ sub parseopts_late_defaults () { $$vr = $v; } - fail "dgit: --include-dirty is not supported in split view quilt mode" + fail __ "dgit: --include-dirty is not supported in split view quilt mode" if $split_brain && $includedirty; if (!defined $cleanmode) { diff --git a/git-debrebase b/git-debrebase index 0ef1077..4a3ed25 100755 --- a/git-debrebase +++ b/git-debrebase @@ -2066,7 +2066,7 @@ sub cmd_new_upstream () { my $old_upstream; if (!$old_anchor_cl->{OrigParents}) { snag 'anchor-treated', - 'old anchor is recognised due to --anchor, cannot check upstream'; + __ 'old anchor is recognised due to --anchor, cannot check upstream'; } else { $old_upstream = parsecommit $old_anchor_cl->{OrigParents}[0]{CommitId}; @@ -2977,7 +2977,7 @@ getoptions_main 'experimental-merge-resolution!', \$opt_merges, '-i:s' => sub { my ($opt,$val) = @_; - badusage "git-debrebase: no cuddling to -i for git-rebase" + badusage __ "git-debrebase: no cuddling to -i for git-rebase" if length $val; die if $opt_defaultcmd_interactive; # should not happen $opt_defaultcmd_interactive = [ qw(-i) ]; @@ -3008,7 +3008,7 @@ if (!@ARGV || $opt_defaultcmd_interactive || $ARGV[0] =~ m{^-}) { $cmdfn =~ y/-/_/; $cmdfn = ${*::}{"cmd_$cmdfn"}; - $cmdfn or badusage "unknown git-debrebase sub-operation $cmd"; + $cmdfn or badusage ___ "unknown git-debrebase sub-operation %s", $cmd; $cmdfn->(); } -- cgit v1.2.3