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>
Vasco Almeida committed
Dec 14, 2016 at 11:54 UTC
186b52c52a46f843207839ad1bc78b6a8716c929
1 file changed
+46
-8
git-add--interactive.perl
+46
-8
@@ -1186,15 +1186,53 @@ sub edit_hunk_loop {
1186
}
1187
}
1188
1189
+my %help_patch_modes = (
1190
+ stage => N__(
1191
+"y - stage this hunk
1192
+n - do not stage this hunk
1193
+q - quit; do not stage this hunk or any of the remaining ones
1194
+a - stage this hunk and all later hunks in the file
1195
+d - do not stage this hunk or any of the later hunks in the file"),
1196
+ stash => N__(
1197
+"y - stash this hunk
1198
+n - do not stash this hunk
1199
+q - quit; do not stash this hunk or any of the remaining ones
1200
+a - stash this hunk and all later hunks in the file
1201
+d - do not stash this hunk or any of the later hunks in the file"),
1202
+ reset_head => N__(
1203
+"y - unstage this hunk
1204
+n - do not unstage this hunk
1205
+q - quit; do not unstage this hunk or any of the remaining ones
1206
+a - unstage this hunk and all later hunks in the file
1207
+d - do not unstage this hunk or any of the later hunks in the file"),
1208
+ reset_nothead => N__(
1209
+"y - apply this hunk to index
1210
+n - do not apply this hunk to index
1211
+q - quit; do not apply this hunk or any of the remaining ones
1212
+a - apply this hunk and all later hunks in the file
1213
+d - do not apply this hunk or any of the later hunks in the file"),
1214
+ checkout_index => N__(
1215
+"y - discard this hunk from worktree
1216
+n - do not discard this hunk from worktree
1217
+q - quit; do not discard this hunk or any of the remaining ones
1218
+a - discard this hunk and all later hunks in the file
1219
+d - do not discard this hunk or any of the later hunks in the file"),
1220
+ checkout_head => N__(
1221
+"y - discard this hunk from index and worktree
1222
+n - do not discard this hunk from index and worktree
1223
+q - quit; do not discard this hunk or any of the remaining ones
1224
+a - discard this hunk and all later hunks in the file
1225
+d - do not discard this hunk or any of the later hunks in the file"),
1226
+ checkout_nothead => N__(
1227
+"y - apply this hunk to index and worktree
1228
+n - do not apply this hunk to index and worktree
1229
+q - quit; do not apply this hunk or any of the remaining ones
1230
+a - apply this hunk and all later hunks in the file
1231
+d - do not apply this hunk or any of the later hunks in the file"),
1232
+);
1233
+
1234
sub help_patch_cmd {
1190
- my $verb = lc $patch_mode_flavour{VERB};
1191
- my $target = $patch_mode_flavour{TARGET};
1192
- print colored $help_color, <<EOF ;
1193
-y - $verb this hunk$target
1194
-n - do not $verb this hunk$target
1195
-q - quit; do not $verb this hunk or any of the remaining ones
1196
-a - $verb this hunk and all later hunks in the file
1197
-d - do not $verb this hunk or any of the later hunks in the file
1235
+ print colored $help_color, __($help_patch_modes{$patch_mode}), "\n", __ <<EOF ;
1236
g - select a hunk to go to
1237
/ - search for a hunk matching the given regex
1238
j - leave this hunk undecided, see next undecided hunk