Code

gettextize: git-submodule $errmsg messages
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 13 Sep 2010 20:34:08 +0000 (20:34 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:58:22 +0000 (07:58 +0000)
Gettextize warning messages stored in the $errmsg variable using
eval_gettext interpolation. 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/t7401-submodule-summary.sh

index 065b3434ae4a519a2ca0db7c4332f6477226d019..d453fe96cd56031b6834dba1602beea77fe70293 100755 (executable)
@@ -643,13 +643,13 @@ cmd_summary() {
                total_commits=
                case "$missing_src,$missing_dst" in
                t,)
-                       errmsg="  Warn: $name doesn't contain commit $sha1_src"
+                       errmsg="$(eval_gettext "  Warn: \$name doesn't contain commit \$sha1_src")"
                        ;;
                ,t)
-                       errmsg="  Warn: $name doesn't contain commit $sha1_dst"
+                       errmsg="$(eval_gettext "  Warn: \$name doesn't contain commit \$sha1_dst")"
                        ;;
                t,t)
-                       errmsg="  Warn: $name doesn't contain commits $sha1_src and $sha1_dst"
+                       errmsg="$(eval_gettext "  Warn: \$name doesn't contain commits \$sha1_src and \$sha1_dst")"
                        ;;
                *)
                        errmsg=
index e14a2de0d83640fb2fcb69d806da90703439d577..f33f071a32a69d68da18d9a5c414d20e06236818 100755 (executable)
@@ -155,7 +155,7 @@ EOF
 rm -f sm1 &&
 test_create_repo sm1 &&
 head6=$(add_file sm1 foo6 foo7)
-test_expect_success 'nonexistent commit' "
+test_expect_success NO_GETTEXT_POISON 'nonexistent commit' "
     git submodule summary >actual &&
     cat >expected <<-EOF &&
 * sm1 $head4...$head6: