@@ -65,6 +65,7 @@ abort! abort and check out the original branch
6565skip! skip current patch and continue
6666"
6767. git-sh-setup
68+ . git-sh-i18n
6869set_reflog_action rebase
6970require_work_tree_exists
7071cd_to_toplevel
7374'
7475ok_to_skip_pre_rebase=
7576resolvemsg="
76- When you have resolved this problem run \ " git rebase --continue\ " .
77- If you would prefer to skip this patch, instead run \ " git rebase --skip\" .
78- To check out the original branch and stop rebasing run \ " git rebase --abort\" .
77+ $( gettext ' When you have resolved this problem, run "git rebase --continue".
78+ If you prefer to skip this patch, run "git rebase --skip" instead .
79+ To check out the original branch and stop rebasing, run "git rebase --abort". ' )
7980"
8081unset onto
8182cmd=
@@ -161,7 +162,7 @@ move_to_original_branch () {
161162 git symbolic-ref \
162163 -m " rebase finished: returning to $head_name " \
163164 HEAD $head_name ||
164- die " Could not move back to $head_name "
165+ die " $( gettext " Could not move back to $head_name " ) "
165166 ;;
166167 esac
167168}
@@ -180,12 +181,12 @@ run_pre_rebase_hook () {
180181 test -x " $GIT_DIR /hooks/pre-rebase"
181182 then
182183 " $GIT_DIR /hooks/pre-rebase" ${1+" $@ " } ||
183- die " The pre-rebase hook refused to rebase."
184+ die " $( gettext " The pre-rebase hook refused to rebase." ) "
184185 fi
185186}
186187
187188test -f " $apply_dir " /applying &&
188- die ' It looks like git-am is in progress. Cannot rebase.'
189+ die " $( gettext " It looks like git-am is in progress. Cannot rebase." ) "
189190
190191if test -d " $apply_dir "
191192then
@@ -316,12 +317,12 @@ test $# -gt 2 && usage
316317if test -n " $cmd " &&
317318 test " $interactive_rebase " ! = explicit
318319then
319- die " -- exec option must be used with --interactive option"
320+ die " $( gettext -- " -- exec option must be used with --interactive option" ) "
320321fi
321322
322323if test -n " $action "
323324then
324- test -z " $in_progress " && die " No rebase in progress?"
325+ test -z " $in_progress " && die " $( gettext " No rebase in progress?" ) "
325326 # Only interactive rebase uses detailed reflog messages
326327 if test " $type " = interactive && test " $GIT_REFLOG_ACTION " = rebase
327328 then
@@ -334,11 +335,11 @@ case "$action" in
334335continue)
335336 # Sanity check
336337 git rev-parse --verify HEAD > /dev/null ||
337- die " Cannot read HEAD"
338+ die " $( gettext " Cannot read HEAD" ) "
338339 git update-index --ignore-submodules --refresh &&
339340 git diff-files --quiet --ignore-submodules || {
340- echo " You must edit all merge conflicts and then"
341- echo " mark them as resolved using git add"
341+ echo " $( gettext " You must edit all merge conflicts and then
342+ mark them as resolved using git add" ) "
342343 exit 1
343344 }
344345 read_basic_state
@@ -355,7 +356,7 @@ abort)
355356 case " $head_name " in
356357 refs/* )
357358 git symbolic-ref -m " rebase: aborting" HEAD $head_name ||
358- die " Could not move back to $head_name "
359+ die " $( eval_gettext " Could not move back to \ $ head_name" ) "
359360 ;;
360361 esac
361362 output git reset --hard $orig_head
@@ -367,15 +368,18 @@ esac
367368# Make sure no rebase is in progress
368369if test -n " $in_progress "
369370then
370- die '
371- It seems that there is already a ' " ${state_dir##*/ } " ' directory, and
372- I wonder if you are in the middle of another rebase. If that is the
371+ state_dir_base=${state_dir##*/ }
372+ cmd_live_rebase=" git rebase (--continue | --abort | --skip)"
373+ cmd_clear_stale_rebase=" rm -fr \" $state_dir \" "
374+ die "
375+ $( eval_gettext ' It seems that there is already a $state_dir_base directory, and
376+ I wonder if you ware in the middle of another rebase. If that is the
373377case, please try
374- git rebase (--continue | --abort | --skip)
378+ $cmd_live_rebase
375379If that is not the case, please
376- rm -fr ' " $state_dir " '
380+ $cmd_clear_stale_rebase
377381and run me again. I am stopping in case you still have something
378- valuable there.'
382+ valuable there.' ) "
379383fi
380384
381385if test -n " $rebase_root " && test -z " $onto "
413417 ;;
414418 esac
415419 upstream=` git rev-parse --verify " ${upstream_name} ^0" ` ||
416- die " invalid upstream $upstream_name "
420+ die " $( eval_gettext " invalid upstream \ $ upstream_name" ) "
417421 upstream_arg=" $upstream_name "
418422else
419423 if test -z " $onto "
@@ -437,19 +441,19 @@ case "$onto_name" in
437441 then
438442 case " $onto " in
439443 ?* " $LF " ?* )
440- die " $onto_name : there are more than one merge bases"
444+ die " $( eval_gettext " \$ onto_name: there are more than one merge bases" ) "
441445 ;;
442446 ' ' )
443- die " $onto_name : there is no merge base"
447+ die " $( eval_gettext " \$ onto_name: there is no merge base" ) "
444448 ;;
445449 esac
446450 else
447- die " $onto_name : there is no merge base"
451+ die " $( eval_gettext " \$ onto_name: there is no merge base" ) "
448452 fi
449453 ;;
450454* )
451455 onto=$( git rev-parse --verify " ${onto_name} ^0" ) ||
452- die " Does not point to a valid commit: $onto_name "
456+ die " $( eval_gettext " Does not point to a valid commit: \ $ onto_name" ) "
453457 ;;
454458esac
455459
@@ -472,7 +476,7 @@ case "$#" in
472476 then
473477 head_name=" detached HEAD"
474478 else
475- die " fatal: no such branch: $1 "
479+ die " $( eval_gettext " fatal: no such branch: \$ branch_name " ) "
476480 fi
477481 ;;
4784820)
@@ -492,7 +496,7 @@ case "$#" in
492496 ;;
493497esac
494498
495- require_clean_work_tree " rebase" " Please commit or stash them."
499+ require_clean_work_tree " rebase" " $( gettext " Please commit or stash them." ) "
496500
497501# Now we are rebasing commits $upstream..$orig_head (or with --root,
498502# everything leading up to $orig_head) on top of $onto
@@ -510,10 +514,10 @@ then
510514 then
511515 # Lazily switch to the target branch if needed...
512516 test -z " $switch_to " || git checkout " $switch_to " --
513- say " Current branch $branch_name is up to date."
517+ say " $( eval_gettext " Current branch \ $ branch_name is up to date." ) "
514518 exit 0
515519 else
516- say " Current branch $branch_name is up to date, rebase forced."
520+ say " $( eval_gettext " Current branch \ $ branch_name is up to date, rebase forced." ) "
517521 fi
518522fi
519523
@@ -524,7 +528,7 @@ if test -n "$diffstat"
524528then
525529 if test -n " $verbose "
526530 then
527- echo " Changes from $mb to $onto :"
531+ echo " $( eval_gettext " Changes from \ $ mb to \ $ onto:" ) "
528532 fi
529533 # We want color (if set), but no pager
530534 GIT_PAGER=' ' git diff --stat --summary " $mb " " $onto "
533537test " $type " = interactive && run_specific_rebase
534538
535539# Detach HEAD and reset the tree
536- say " First, rewinding head to replay your work on top of it..."
540+ say " $( gettext " First, rewinding head to replay your work on top of it..." ) "
537541git checkout -q " $onto ^0" || die " could not detach HEAD"
538542git update-ref ORIG_HEAD $orig_head
539543
540544# If the $onto is a proper descendant of the tip of the branch, then
541545# we just fast-forwarded.
542546if test " $mb " = " $orig_head "
543547then
544- say " Fast-forwarded $branch_name to $onto_name ."
548+ say " $( eval_gettext " Fast-forwarded \ $ branch_name to \ $ onto_name." ) "
545549 move_to_original_branch
546550 exit 0
547551fi
0 commit comments