Code

gettextize: git-submodule "[...] path is ignored" message
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 13 Sep 2010 20:14:24 +0000 (20:14 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:58:22 +0000 (07:58 +0000)
Gettextize the "The following path is ignored" message. This is
explicitly tested for so we need to skip some tests with
NO_GETTEXT_POISON.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
git-submodule.sh
t/t7400-submodule-basic.sh

index 6ec6aa5a9498401afffe2146802fe0fbde0afc0c..cd37bf71f93acd36c063cb61ebbe776eee6b9eb6 100755 (executable)
@@ -208,9 +208,9 @@ cmd_add()
 
        if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
        then
-               echo >&2 "The following path is ignored by one of your .gitignore files:" &&
-               echo >&2 $path &&
-               echo >&2 "Use -f if you really want to add it."
+               echo >&2 "$(eval_gettext "The following path is ignored by one of your .gitignore files:
+\$path
+Use -f if you really want to add it.")"
                exit 1
        fi
 
index 782b0a3ece7724bf8df7cf4d405715a42ad21d44..70107938fc061ad3dfbc897ac9d97313dfc43cbb 100755 (executable)
@@ -86,7 +86,7 @@ test_expect_success 'submodule add' '
        test_cmp empty untracked
 '
 
-test_expect_success 'submodule add to .gitignored path fails' '
+test_expect_success NO_GETTEXT_POISON 'submodule add to .gitignored path fails' '
        (
                cd addtest-ignore &&
                cat <<-\EOF >expect &&