diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 822f857..259cfc5 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -4,6 +4,7 @@ use 5.008; use strict; use warnings; use Git; +use Git::I18N; binmode(STDOUT, ":raw"); @@ -60,7 +61,7 @@ if ($repo->config_bool("interactive.singlekey")) { $use_readkey = 1; }; if (!$use_readkey) { - print STDERR "missing Term::ReadKey, disabling interactive.singlekey\n"; + print STDERR __("missing Term::ReadKey, disabling interactive.singlekey\n"); } eval { require Term::Cap; @@ -1547,9 +1548,11 @@ sub patch_update_file { print "\n"; return $quit; + print __("My test 1.\n"); } sub diff_cmd { + print __("My test 2.\n"); my @mods = list_modified('index-only'); @mods = grep { !($_->{BINARY}) } @mods; return if (address@hidden); @@ -1557,14 +1560,18 @@ sub diff_cmd { IMMEDIATE => 1, HEADER => $status_head, }, @mods); + print __("My test 2a.\n"); return if (address@hidden); + print __("My test 2a.1.\n"); my $reference = is_initial_commit() ? get_empty_tree() : 'HEAD'; + print __("My test 2b.\n"); system(qw(git diff -p --cached), $reference, '--', map { $_->{VALUE} } @them); + print __("My test 3.\n"); } sub quit_cmd { - print "Bye.\n"; + print __("Bye.\n"); exit(0); } @@ -1620,6 +1627,7 @@ sub process_args { } elsif ($arg ne "--") { die "invalid argument $arg, expecting --"; + print __("My test 4."); } } @@ -1634,7 +1642,7 @@ sub main_loop { [ 'help', \&help_cmd, ], ); while (1) { - my ($it) = list_and_choose({ PROMPT => 'What now', + my ($it) = list_and_choose({ PROMPT => __('What now'), SINGLETON => 1, LIST_FLAT => 4, HEADER => '*** Commands ***',