git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Vasco Almeida <vascomalmeida@sapo.pt>
To: git@vger.kernel.org
Cc: "Vasco Almeida" <vascomalmeida@sapo.pt>,
	"Jiang Xin" <worldhello.net@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"David Aguilar" <davvid@gmail.com>
Subject: [PATCH v2 06/11] i18n: add--interactive: i18n of help_patch_cmd
Date: Wed, 29 Jun 2016 15:09:40 +0000	[thread overview]
Message-ID: <20160629150945.15015-7-vascomalmeida@sapo.pt> (raw)
In-Reply-To: <20160629150945.15015-1-vascomalmeida@sapo.pt>

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>
---
 git-add--interactive.perl | 65 +++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 54 insertions(+), 11 deletions(-)

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 5b89b97..acbfa4e 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1179,15 +1179,58 @@ sub edit_hunk_loop {
 }
 
 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
-g - select a hunk to go to
+	if ($patch_mode eq 'stage') {
+		print colored $help_color, __(
+"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");
+	} elsif ($patch_mode eq 'stash') {
+		print colored $help_color, __(
+"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");
+	} elsif ($patch_mode eq 'reset_head') {
+		print colored $help_color, __(
+"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");
+	} elsif ($patch_mode eq 'reset_nothead') {
+		print colored $help_color, __(
+"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");
+	} elsif ($patch_mode eq 'checkout_index') {
+		print colored $help_color, __(
+"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");
+	} elsif ($patch_mode eq 'checkout_head') {
+		print colored $help_color, __(
+"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");
+	} elsif ($patch_mode eq 'checkout_nothead') {
+		print colored $help_color, __(
+"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");
+	}
+	print colored $help_color, "\n", __(
+"g - select a hunk to go to
 / - search for a hunk matching the given regex
 j - leave this hunk undecided, see next undecided hunk
 J - leave this hunk undecided, see next hunk
@@ -1195,8 +1238,8 @@ k - leave this hunk undecided, see previous undecided hunk
 K - leave this hunk undecided, see previous hunk
 s - split the current hunk into smaller hunks
 e - manually edit the current hunk
-? - print help
-EOF
+? - print help"),
+"\n";
 }
 
 sub apply_patch {
-- 
2.7.4


  parent reply	other threads:[~2016-06-29 15:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 15:09 [PATCH v2 00/11] Mark strings in perl script for translation Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 01/11] i18n: add--interactive: mark strings " Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 02/11] i18n: add--interactive: mark simple here documents " Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 03/11] i18n: add--interactive: mark strings with interpolation " Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 04/11] i18n: add--interactive: mark plural strings Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 05/11] i18n: add--interactive: mark message for translation Vasco Almeida
2016-06-29 15:09 ` Vasco Almeida [this message]
2016-06-29 15:09 ` [PATCH v2 07/11] i18n: add--interactive: mark edit_hunk_manually " Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 08/11] i18n: send-email: mark strings " Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 09/11] i18n: send-email: mark warnings and errors " Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 10/11] i18n: send-email: mark string with interpolation " Vasco Almeida
2016-06-29 15:09 ` [PATCH v2 11/11] i18n: difftool: mark warnings " Vasco Almeida
  -- strict thread matches above, loose matches on Subject: below --
2016-08-31 12:31 [PATCH v2 00/11] Mark strings in perl script " Vasco Almeida
2016-08-31 12:31 ` [PATCH v2 06/11] i18n: add--interactive: i18n of help_patch_cmd Vasco Almeida
2016-09-25 23:11   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160629150945.15015-7-vascomalmeida@sapo.pt \
    --to=vascomalmeida@sapo.pt \
    --cc=avarab@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=worldhello.net@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).