git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v5 08/16] i18n: add--interactive: i18n of help_patch_cmd

From
Vasco Almeida <vascomalmeida@sapo.pt>
Date
Nov 8, 2016, 12:08 UTC
Message-ID
<20161108120823.11204-9-vascomalmeida@sapo.pt>
In-Reply-To
<20161108120823.11204-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 | 54 ++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 46 insertions(+), 8 deletions(-)
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index b7d382b10..045b847cf 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1189,15 +1189,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
-- 
2.11.0.rc0.23.g8236252
Previous: Junio C HamanoNext: Vasco Almeida
Message 52 of 63 in “Mark strings in Perl scripts for translation”
  1. 00/14 Mark strings in Perl scripts for translationVasco Almeida, Oct 5, 2016
  2. 02/14 i18n: add--interactive: mark simple here-documents for translationVasco Almeida, Oct 5, 2016
  3. 04/14 i18n: clean.c: match string with git-add--interactive.perlVasco Almeida, Oct 5, 2016
  4. 05/14 i18n: add--interactive: mark plural stringsVasco Almeida, Oct 5, 2016
  5. Junio C HamanoOct 5, 2016
  6. 03/14 i18n: add--interactive: mark strings with interpolation for translationVasco Almeida, Oct 5, 2016
  7. Junio C HamanoOct 5, 2016
  8. 01/14 i18n: add--interactive: mark strings for translationVasco Almeida, Oct 5, 2016
  9. 06/14 i18n: add--interactive: mark patch prompt for translationVasco Almeida, Oct 5, 2016
  10. 07/14 i18n: add--interactive: i18n of help_patch_cmdVasco Almeida, Oct 5, 2016
  11. 08/14 i18n: add--interactive: mark edit_hunk_manually message for translationVasco Almeida, Oct 5, 2016
  12. 09/14 i18n: add--interactive: remove %patch_modes entriesVasco Almeida, Oct 5, 2016
  13. 10/14 i18n: add--interactive: mark status words for translationVasco Almeida, Oct 5, 2016
  14. 11/14 i18n: send-email: mark strings for translationVasco Almeida, Oct 5, 2016
  15. 12/14 i18n: send-email: mark warnings and errors for translationVasco Almeida, Oct 5, 2016
  16. 13/14 i18n: send-email: mark string with interpolation for translationVasco Almeida, Oct 5, 2016
  17. 14/14 i18n: difftool: mark warnings for translationVasco Almeida, Oct 5, 2016
  18. Jakub NarębskiOct 5, 2016
  19. 00/14 Mark strings in Perl scripts for translationVasco Almeida, Oct 10, 2016
  20. 01/14 i18n: add--interactive: mark strings for translationVasco Almeida, Oct 10, 2016
  21. Junio C HamanoOct 19, 2016
  22. Vasco AlmeidaOct 20, 2016
  23. Junio C HamanoOct 20, 2016
  24. 02/14 i18n: add--interactive: mark simple here-documents for translationVasco Almeida, Oct 10, 2016
  25. 03/14 i18n: add--interactive: mark strings with interpolation for translationVasco Almeida, Oct 10, 2016
  26. 04/14 i18n: clean.c: match string with git-add--interactive.perlVasco Almeida, Oct 10, 2016
  27. 05/14 i18n: add--interactive: mark plural stringsVasco Almeida, Oct 10, 2016
  28. Junio C HamanoOct 19, 2016
  29. Vasco AlmeidaOct 20, 2016
  30. Vasco AlmeidaOct 20, 2016
  31. Junio C HamanoOct 20, 2016
  32. 06/14 i18n: add--interactive: mark patch prompt for translationVasco Almeida, Oct 10, 2016
  33. 07/14 i18n: add--interactive: i18n of help_patch_cmdVasco Almeida, Oct 10, 2016
  34. 08/14 i18n: add--interactive: mark edit_hunk_manually message for translationVasco Almeida, Oct 10, 2016
  35. Vasco AlmeidaNov 7, 2016
  36. 09/14 i18n: add--interactive: remove %patch_modes entriesVasco Almeida, Oct 10, 2016
  37. 10/14 i18n: add--interactive: mark status words for translationVasco Almeida, Oct 10, 2016
  38. 11/14 i18n: send-email: mark strings for translationVasco Almeida, Oct 10, 2016
  39. 12/14 i18n: send-email: mark warnings and errors for translationVasco Almeida, Oct 10, 2016
  40. 13/14 i18n: send-email: mark string with interpolation for translationVasco Almeida, Oct 10, 2016
  41. 14/14 i18n: difftool: mark warnings for translationVasco Almeida, Oct 10, 2016
  42. Junio C HamanoOct 27, 2016
  43. 00/16 Mark strings in Perl scripts for translationVasco Almeida, Nov 8, 2016
  44. 02/16 i18n: add--interactive: mark strings for translationVasco Almeida, Nov 8, 2016
  45. 09/16 i18n: add--interactive: mark edit_hunk_manually message for translationVasco Almeida, Nov 8, 2016
  46. 10/16 i18n: add--interactive: remove %patch_modes entriesVasco Almeida, Nov 8, 2016
  47. 01/16 Git.pm: add subroutines for commenting linesVasco Almeida, Nov 8, 2016
  48. Junio C HamanoNov 9, 2016
  49. Vasco AlmeidaNov 9, 2016
  50. Jakub NarębskiNov 9, 2016
  51. Junio C HamanoNov 9, 2016
  52. 08/16 i18n: add--interactive: i18n of help_patch_cmdVasco Almeida, Nov 8, 2016
  53. 16/16 i18n: difftool: mark warnings for translationVasco Almeida, Nov 8, 2016
  54. 15/16 i18n: send-email: mark composing message for translationVasco Almeida, Nov 8, 2016
  55. 14/16 i18n: send-email: mark string with interpolation for translationVasco Almeida, Nov 8, 2016
  56. 13/16 i18n: send-email: mark warnings and errors for translationVasco Almeida, Nov 8, 2016
  57. 12/16 i18n: send-email: mark strings for translationVasco Almeida, Nov 8, 2016
  58. 07/16 i18n: add--interactive: mark patch prompt for translationVasco Almeida, Nov 8, 2016
  59. 11/16 i18n: add--interactive: mark status words for translationVasco Almeida, Nov 8, 2016
  60. 06/16 i18n: add--interactive: mark plural stringsVasco Almeida, Nov 8, 2016
  61. 05/16 i18n: clean.c: match string with git-add--interactive.perlVasco Almeida, Nov 8, 2016
  62. 04/16 i18n: add--interactive: mark strings with interpolation for translationVasco Almeida, Nov 8, 2016
  63. 03/16 i18n: add--interactive: mark simple here-documents for translationVasco Almeida, Nov 8, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.