i18n: difftool: mark warnings for translation
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
70aedfb3ec
commit
a948ebacbf
@ -22,6 +22,7 @@ use File::Path qw(mkpath rmtree);
|
||||
use File::Temp qw(tempdir);
|
||||
use Getopt::Long qw(:config pass_through);
|
||||
use Git;
|
||||
use Git::I18N;
|
||||
|
||||
sub usage
|
||||
{
|
||||
@ -122,7 +123,7 @@ sub setup_dir_diff
|
||||
my $i = 0;
|
||||
while ($i < $#rawdiff) {
|
||||
if ($rawdiff[$i] =~ /^::/) {
|
||||
warn << 'EOF';
|
||||
warn __ <<'EOF';
|
||||
Combined diff formats ('-c' and '--cc') are not supported in
|
||||
directory diff mode ('-d' and '--dir-diff').
|
||||
EOF
|
||||
@ -338,7 +339,7 @@ sub main
|
||||
if (length($opts{difftool_cmd}) > 0) {
|
||||
$ENV{GIT_DIFF_TOOL} = $opts{difftool_cmd};
|
||||
} else {
|
||||
print "No <tool> given for --tool=<tool>\n";
|
||||
print __("No <tool> given for --tool=<tool>\n");
|
||||
usage(1);
|
||||
}
|
||||
}
|
||||
@ -346,7 +347,7 @@ sub main
|
||||
if (length($opts{extcmd}) > 0) {
|
||||
$ENV{GIT_DIFFTOOL_EXTCMD} = $opts{extcmd};
|
||||
} else {
|
||||
print "No <cmd> given for --extcmd=<cmd>\n";
|
||||
print __("No <cmd> given for --extcmd=<cmd>\n");
|
||||
usage(1);
|
||||
}
|
||||
}
|
||||
@ -419,11 +420,11 @@ sub dir_diff
|
||||
}
|
||||
|
||||
if (exists $wt_modified{$file} and exists $tmp_modified{$file}) {
|
||||
my $errmsg = "warning: Both files modified: ";
|
||||
$errmsg .= "'$workdir/$file' and '$b/$file'.\n";
|
||||
$errmsg .= "warning: Working tree file has been left.\n";
|
||||
$errmsg .= "warning:\n";
|
||||
warn $errmsg;
|
||||
warn sprintf(__(
|
||||
"warning: Both files modified:\n" .
|
||||
"'%s/%s' and '%s/%s'.\n" .
|
||||
"warning: Working tree file has been left.\n" .
|
||||
"warning:\n"), $workdir, $file, $b, $file);
|
||||
$error = 1;
|
||||
} elsif (exists $tmp_modified{$file}) {
|
||||
my $mode = stat("$b/$file")->mode;
|
||||
@ -435,8 +436,9 @@ sub dir_diff
|
||||
}
|
||||
}
|
||||
if ($error) {
|
||||
warn "warning: Temporary files exist in '$tmpdir'.\n";
|
||||
warn "warning: You may want to cleanup or recover these.\n";
|
||||
warn sprintf(__(
|
||||
"warning: Temporary files exist in '%s'.\n" .
|
||||
"warning: You may want to cleanup or recover these.\n"), $tmpdir);
|
||||
exit(1);
|
||||
} else {
|
||||
exit_cleanup($tmpdir, $rc);
|
||||
|
Loading…
Reference in New Issue
Block a user