Code

gettextize: git-bisect die + gettext messages
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 14 Sep 2010 12:11:31 +0000 (12:11 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:58:26 +0000 (07:58 +0000)
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
git-bisect.sh

index c2948193650142bbca9910e3ca40e939d6fa4b38..31ca97ca80e26b37ef500705e2a7065e6f38c0bb 100755 (executable)
@@ -58,7 +58,7 @@ bisect_start() {
        #
        head=$(GIT_DIR="$GIT_DIR" git symbolic-ref -q HEAD) ||
        head=$(GIT_DIR="$GIT_DIR" git rev-parse --verify HEAD) ||
-       die "Bad HEAD - I need a HEAD"
+       die "$(gettext "Bad HEAD - I need a HEAD")"
 
        #
        # Check if we are bisecting.
@@ -77,11 +77,11 @@ bisect_start() {
                        # cogito usage, and cogito users should understand
                        # it relates to cg-seek.
                        [ -s "$GIT_DIR/head-name" ] &&
-                               die "won't bisect on seeked tree"
+                               die "$(gettext "won't bisect on seeked tree")"
                        start_head="${head#refs/heads/}"
                        ;;
                *)
-                       die "Bad HEAD - strange symbolic ref"
+                       die "$(gettext "Bad HEAD - strange symbolic ref")"
                        ;;
                esac
        fi
@@ -198,10 +198,10 @@ bisect_state() {
        state=$1
        case "$#,$state" in
        0,*)
-               die "Please call 'bisect_state' with at least one argument." ;;
+               die "$(gettext "Please call 'bisect_state' with at least one argument.")" ;;
        1,bad|1,good|1,skip)
                rev=$(git rev-parse --verify HEAD) ||
-                       die "Bad rev input: HEAD"
+                       die "$(gettext "Bad rev input: HEAD")"
                bisect_write "$state" "$rev"
                check_expected_revs "$rev" ;;
        2,bad|*,good|*,skip)
@@ -216,7 +216,7 @@ bisect_state() {
                eval "$eval"
                check_expected_revs "$@" ;;
        *,bad)
-               die "'git bisect bad' can take only one argument." ;;
+               die "$(gettext "'git bisect bad' can take only one argument.")" ;;
        *)
                usage ;;
        esac
@@ -355,7 +355,7 @@ bisect_replay () {
                good|bad|skip)
                        bisect_write "$command" "$rev" ;;
                *)
-                       die "?? what are you talking about?" ;;
+                       die "$(gettext "?? what are you talking about?")" ;;
                esac
        done <"$1"
        bisect_auto_next