Code

gettextize: git-am cannot_fallback messages
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 7 Sep 2010 14:36:09 +0000 (14:36 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:58:16 +0000 (07:58 +0000)
Translate messages with gettext(1) before they're passed to the
cannot_fallback function, just like we handle the die function.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
git-am.sh

index b2b21aaa4faa6e6805186df38807a1f83dc89b3b..5cec47d15375ecd6949e0e5f3abcf06e868e959c 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -108,7 +108,7 @@ fall_back_3way () {
        "$dotest/patch" &&
     GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
     git write-tree >"$dotest/patch-merge-base+" ||
-    cannot_fallback "Repository lacks necessary blobs to fall back on 3-way merge."
+    cannot_fallback "$(gettext "Repository lacks necessary blobs to fall back on 3-way merge.")"
 
     say Using index info to reconstruct a base tree...
     if GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
@@ -117,8 +117,8 @@ fall_back_3way () {
        mv "$dotest/patch-merge-base+" "$dotest/patch-merge-base"
        mv "$dotest/patch-merge-tmp-index" "$dotest/patch-merge-index"
     else
-        cannot_fallback "Did you hand edit your patch?
-It does not apply to blobs recorded in its index."
+        cannot_fallback "$(gettext "Did you hand edit your patch?
+It does not apply to blobs recorded in its index.")"
     fi
 
     test -f "$dotest/patch-merge-index" &&