Skip to content

Commit 6a4eb91

Browse files
vascoolgitster
authored andcommitted
i18n: merge-octopus: mark messages for translation
Mark messages in git-merge-octopus.sh for translation. Signed-off-by: Vasco Almeida <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e8d7c39 commit 6a4eb91

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

git-merge-octopus.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# Resolve two or more trees.
66
#
77

8+
. git-sh-i18n
9+
810
LF='
911
'
1012

@@ -46,7 +48,7 @@ esac
4648

4749
if ! git diff-index --quiet --cached HEAD --
4850
then
49-
echo "Error: Your local changes to the following files would be overwritten by merge"
51+
gettextln "Error: Your local changes to the following files would be overwritten by merge"
5052
git diff-index --cached --name-only HEAD -- | sed -e 's/^/ /'
5153
exit 2
5254
fi
@@ -61,8 +63,8 @@ do
6163
# We allow only last one to have a hand-resolvable
6264
# conflicts. Last round failed and we still had
6365
# a head to merge.
64-
echo "Automated merge did not work."
65-
echo "Should not be doing an Octopus."
66+
gettextln "Automated merge did not work."
67+
gettextln "Should not be doing an Octopus."
6668
exit 2
6769
esac
6870

@@ -73,11 +75,11 @@ do
7375
eval pretty_name=\${GITHEAD_$SHA1_UP:-$pretty_name}
7476
fi
7577
common=$(git merge-base --all $SHA1 $MRC) ||
76-
die "Unable to find common commit with $pretty_name"
78+
die "$(eval_gettext "Unable to find common commit with \$pretty_name")"
7779

7880
case "$LF$common$LF" in
7981
*"$LF$SHA1$LF"*)
80-
echo "Already up-to-date with $pretty_name"
82+
eval_gettextln "Already up-to-date with \$pretty_name"
8183
continue
8284
;;
8385
esac
@@ -89,20 +91,20 @@ do
8991
# tree as the intermediate result of the merge.
9092
# We still need to count this as part of the parent set.
9193

92-
echo "Fast-forwarding to: $pretty_name"
94+
eval_gettextln "Fast-forwarding to: \$pretty_name"
9395
git read-tree -u -m $head $SHA1 || exit
9496
MRC=$SHA1 MRT=$(git write-tree)
9597
continue
9698
fi
9799

98100
NON_FF_MERGE=1
99101

100-
echo "Trying simple merge with $pretty_name"
102+
eval_gettextln "Trying simple merge with \$pretty_name"
101103
git read-tree -u -m --aggressive $common $MRT $SHA1 || exit 2
102104
next=$(git write-tree 2>/dev/null)
103105
if test $? -ne 0
104106
then
105-
echo "Simple merge did not work, trying automatic merge."
107+
gettextln "Simple merge did not work, trying automatic merge."
106108
git-merge-index -o git-merge-one-file -a ||
107109
OCTOPUS_FAILURE=1
108110
next=$(git write-tree 2>/dev/null)

0 commit comments

Comments
 (0)