summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-01 15:19:19 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-01 15:20:30 +0100
commit503bed85ebdc51f2c6fc20ab13a44633e7b93355 (patch)
tree020294e87dff0ac1b34fa67d6fc453fa5682bff8
parentd947ba40da3e61e61829d3b2c744d07d609407d2 (diff)
i18n: Dgit.pm: mark some of messages (1)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r--Debian/Dgit.pm22
1 files changed, 11 insertions, 11 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
index 2e9fa64..8260e9f 100644
--- a/Debian/Dgit.pm
+++ b/Debian/Dgit.pm
@@ -198,7 +198,7 @@ sub messagequote ($) {
sub shellquote {
my @out;
local $_;
- defined or confess 'internal error' foreach @_;
+ defined or confess __ 'internal error' foreach @_;
foreach my $a (@_) {
$_ = $a;
if (!length || m{[^-=_./:0-9a-z]}i) {
@@ -292,7 +292,7 @@ sub _us () {
}
sub failmsg {
- my $s = "error: @_\n";
+ my $s = f_ "error: %s\n", "@_";
$s =~ s/\n\n$/\n/g;
my $prefix = _us().": ";
$s =~ s/^/$prefix/gm;
@@ -312,7 +312,7 @@ sub ensuredir ($) {
sub must_getcwd () {
my $d = getcwd();
- defined $d or fail "getcwd failed: $!\n";
+ defined $d or fail f_ "getcwd failed: %s\n", $!;
return $d;
}
@@ -331,32 +331,32 @@ our @signames = split / /, $Config{sig_name};
sub waitstatusmsg () {
if (!$?) {
- return "terminated, reporting successful completion";
+ return __ "terminated, reporting successful completion";
} elsif (!($? & 255)) {
- return "failed with error exit status ".WEXITSTATUS($?);
+ return f_ "failed with error exit status %s", WEXITSTATUS($?);
} elsif (WIFSIGNALED($?)) {
my $signum=WTERMSIG($?);
- return "died due to fatal signal ".
+ return f_ "died due to fatal signal %s",
($signames[$signum] // "number $signum").
($? & 128 ? " (core dumped)" : ""); # POSIX(3pm) has no WCOREDUMP
} else {
- return "failed with unknown wait status ".$?;
+ return f_ "failed with unknown wait status %s", $?;
}
}
sub failedcmd_report_cmd {
my $intro = shift @_;
- $intro //= "failed command";
+ $intro //= __ "failed command";
{ local ($!); printcmd \*STDERR, _us().": $intro:", @_ or die $!; };
}
sub failedcmd_waitstatus {
if ($? < 0) {
- return "failed to fork/exec: $!";
+ return f_ "failed to fork/exec: %s", $!;
} elsif ($?) {
- return "subprocess ".waitstatusmsg();
+ return f_ "subprocess %s", waitstatusmsg();
} else {
- return "subprocess produced invalid output";
+ return __ "subprocess produced invalid output";
}
}