aboutsummaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorVasco Almeida <vascomalmeida@sapo.pt>2016-06-17 20:21:04 +0000
committerJunio C Hamano <gitster@pobox.com>2016-06-17 15:45:48 -0700
commitb8fc9e43a7da5c8cb1e90eb569b5e821883c2e06 (patch)
tree1119fa4fb9e44b42a6475bf79a577838b9e885e5 /git-rebase--interactive.sh
parent9588c52b75c6ec9cc75b045cdec4fe237038615b (diff)
downloadgit-b8fc9e43a7da5c8cb1e90eb569b5e821883c2e06.tar.gz
git-b8fc9e43a7da5c8cb1e90eb569b5e821883c2e06.tar.xz
i18n: rebase-interactive: mark here-doc strings for translation
Use pipe to send gettext output to git stripspace instead of the original method of using shell here-document, because command substitution '$(...)' would not take place inside the here-documents. The exception is the case of the last here-document redirecting to cat, in which commands substitution works and, thus, is preserved in this commit. t3404: adapt test to the strings newly marked for translation Test t3404-rebase-interactive.sh would fail under GETTEXT_POISON unless using test_i18ngrep. Add eval_ngettext fallback functions to be called when running, for instance, under GETTEXT_POISON. Otherwise, tests would fail under GETTEXT_POISON, or other build that doesn't support the GNU gettext, because that function could not be found. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh30
1 files changed, 15 insertions, 15 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 078ca5b2d..e132f0706 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -144,29 +144,28 @@ reschedule_last_action () {
}
append_todo_help () {
- git stripspace --comment-lines >>"$todo" <<\EOF
-
+ gettext "
Commands:
p, pick = use commit
r, reword = use commit, but edit the commit message
e, edit = use commit, but stop for amending
s, squash = use commit, but meld into previous commit
- f, fixup = like "squash", but discard this commit's log message
+ f, fixup = like \"squash\", but discard this commit's log message
x, exec = run command (the rest of the line) using shell
d, drop = remove commit
These lines can be re-ordered; they are executed from top to bottom.
+" | git stripspace --comment-lines >>"$todo"
-EOF
if test $(get_missing_commit_check_level) = error
then
- git stripspace --comment-lines >>"$todo" <<\EOF
+ gettext "
Do not remove any line. Use 'drop' explicitly to remove a commit.
-EOF
+" | git stripspace --comment-lines >>"$todo"
else
- git stripspace --comment-lines >>"$todo" <<\EOF
+ gettext "
If you remove a line here THAT COMMIT WILL BE LOST.
-EOF
+" | git stripspace --comment-lines >>"$todo"
fi
}
@@ -1123,13 +1122,12 @@ edit-todo)
mv -f "$todo".new "$todo"
collapse_todo_ids
append_todo_help
- git stripspace --comment-lines >>"$todo" <<\EOF
-
+ gettext "
You are editing the todo file of an ongoing interactive rebase.
To continue rebase after editing, run:
git rebase --continue
-EOF
+" | git stripspace --comment-lines >>"$todo"
git_sequence_editor "$todo" ||
die "$(gettext "Could not execute editor")"
@@ -1270,14 +1268,16 @@ todocount=${todocount##* }
cat >>"$todo" <<EOF
-$comment_char Rebase $shortrevisions onto $shortonto ($todocount command(s))
+$comment_char $(eval_ngettext \
+ "Rebase \$shortrevisions onto \$shortonto (\$todocount command)" \
+ "Rebase \$shortrevisions onto \$shortonto (\$todocount commands)" \
+ "$todocount")
EOF
append_todo_help
-git stripspace --comment-lines >>"$todo" <<\EOF
-
+gettext "
However, if you remove everything, the rebase will be aborted.
-EOF
+" | git stripspace --comment-lines >>"$todo"
if test -z "$keep_empty"
then