summaryrefslogtreecommitdiff
path: root/git-add--interactive.perl
diff options
context:
space:
mode:
authorVasco Almeida <vascomalmeida@sapo.pt>2016-12-14 12:54:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-14 19:00:05 (GMT)
commit186b52c52a46f843207839ad1bc78b6a8716c929 (patch)
tree897847cb9a27aa480cb7de25035f48651206c577 /git-add--interactive.perl
parent0539d5e6d535760a99694ff5d5592e46ed929d15 (diff)
downloadgit-186b52c52a46f843207839ad1bc78b6a8716c929.zip
git-186b52c52a46f843207839ad1bc78b6a8716c929.tar.gz
git-186b52c52a46f843207839ad1bc78b6a8716c929.tar.bz2
i18n: add--interactive: i18n of help_patch_cmd
Mark help message of help_patch_cmd for translation. The message must be unfolded to be free of variables so we can have high quality translations. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-add--interactive.perl')
-rwxr-xr-xgit-add--interactive.perl54
1 files changed, 46 insertions, 8 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 745462d..1d26716 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1186,15 +1186,53 @@ sub edit_hunk_loop {
}
}
+my %help_patch_modes = (
+ stage => N__(
+"y - stage this hunk
+n - do not stage this hunk
+q - quit; do not stage this hunk or any of the remaining ones
+a - stage this hunk and all later hunks in the file
+d - do not stage this hunk or any of the later hunks in the file"),
+ stash => N__(
+"y - stash this hunk
+n - do not stash this hunk
+q - quit; do not stash this hunk or any of the remaining ones
+a - stash this hunk and all later hunks in the file
+d - do not stash this hunk or any of the later hunks in the file"),
+ reset_head => N__(
+"y - unstage this hunk
+n - do not unstage this hunk
+q - quit; do not unstage this hunk or any of the remaining ones
+a - unstage this hunk and all later hunks in the file
+d - do not unstage this hunk or any of the later hunks in the file"),
+ reset_nothead => N__(
+"y - apply this hunk to index
+n - do not apply this hunk to index
+q - quit; do not apply this hunk or any of the remaining ones
+a - apply this hunk and all later hunks in the file
+d - do not apply this hunk or any of the later hunks in the file"),
+ checkout_index => N__(
+"y - discard this hunk from worktree
+n - do not discard this hunk from worktree
+q - quit; do not discard this hunk or any of the remaining ones
+a - discard this hunk and all later hunks in the file
+d - do not discard this hunk or any of the later hunks in the file"),
+ checkout_head => N__(
+"y - discard this hunk from index and worktree
+n - do not discard this hunk from index and worktree
+q - quit; do not discard this hunk or any of the remaining ones
+a - discard this hunk and all later hunks in the file
+d - do not discard this hunk or any of the later hunks in the file"),
+ checkout_nothead => N__(
+"y - apply this hunk to index and worktree
+n - do not apply this hunk to index and worktree
+q - quit; do not apply this hunk or any of the remaining ones
+a - apply this hunk and all later hunks in the file
+d - do not apply this hunk or any of the later hunks in the file"),
+);
+
sub help_patch_cmd {
- my $verb = lc $patch_mode_flavour{VERB};
- my $target = $patch_mode_flavour{TARGET};
- print colored $help_color, <<EOF ;
-y - $verb this hunk$target
-n - do not $verb this hunk$target
-q - quit; do not $verb this hunk or any of the remaining ones
-a - $verb this hunk and all later hunks in the file
-d - do not $verb this hunk or any of the later hunks in the file
+ print colored $help_color, __($help_patch_modes{$patch_mode}), "\n", __ <<EOF ;
g - select a hunk to go to
/ - search for a hunk matching the given regex
j - leave this hunk undecided, see next undecided hunk