i18n: merge-octopus: mark messages for translation
Mark messages in git-merge-octopus.sh for translation. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vasco Almeida committed
Jun 17, 2016 at 20:20 UTC
6a4eb91a73fa88bfbeb8d570895052b2b28693cf
1 file changed
+10
-8
git-merge-octopus.sh
+10
-8
@@ -5,6 +5,8 @@
5
# Resolve two or more trees.
6
#
7
8
+. git-sh-i18n
9
+
10
LF='
11
'
12
@@ -46,7 +48,7 @@ esac
48
49
if ! git diff-index --quiet --cached HEAD --
50
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"
52
git diff-index --cached --name-only HEAD -- | sed -e 's/^/ /'
53
exit 2
54
fi
@@ -61,8 +63,8 @@ do
63
# We allow only last one to have a hand-resolvable
64
# conflicts. Last round failed and we still had
65
# 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."
68
exit 2
69
esac
70
@@ -73,11 +75,11 @@ do
75
eval pretty_name=\${GITHEAD_$SHA1_UP:-$pretty_name}
76
fi
77
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")"
79
80
case "$LF$common$LF" in
81
*"$LF$SHA1$LF"*)
80
- echo "Already up-to-date with $pretty_name"
82
+ eval_gettextln "Already up-to-date with \$pretty_name"
83
continue
84
;;
85
esac
@@ -89,7 +91,7 @@ do
91
# tree as the intermediate result of the merge.
92
# We still need to count this as part of the parent set.
93
92
- echo "Fast-forwarding to: $pretty_name"
94
+ eval_gettextln "Fast-forwarding to: \$pretty_name"
95
git read-tree -u -m $head $SHA1 || exit
96
MRC=$SHA1 MRT=$(git write-tree)
97
continue
@@ -97,12 +99,12 @@ do
99
100
NON_FF_MERGE=1
101
100
- echo "Trying simple merge with $pretty_name"
102
+ eval_gettextln "Trying simple merge with \$pretty_name"
103
git read-tree -u -m --aggressive $common $MRT $SHA1 || exit 2
104
next=$(git write-tree 2>/dev/null)
105
if test $? -ne 0
106
then
105
- echo "Simple merge did not work, trying automatic merge."
107
+ gettextln "Simple merge did not work, trying automatic merge."
108
git-merge-index -o git-merge-one-file -a ||
109
OCTOPUS_FAILURE=1
110
next=$(git write-tree 2>/dev/null)