From b3e73449642d3728986f4d7620a4050f1ff0999c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 21 May 2011 18:44:09 +0000 Subject: [PATCH] i18n: git-submodule "blob" and "submodule" messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Gettextize the words "blob" and "submodule", which will be interpolated in a message emitted by git-submodule. This is explicitly tested for so we need to skip a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- git-submodule.sh | 6 ++++-- t/t7401-submodule-summary.sh | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 654a8cb8c..c1d3a5e2f 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -712,11 +712,13 @@ cmd_summary() { sha1_abbr_dst=$(echo $sha1_dst | cut -c1-7) if test $status = T then + blob="$(gettext "blob")" + submodule="$(gettext "submodule")" if test $mod_dst = 160000 then - echo "* $name $sha1_abbr_src(blob)->$sha1_abbr_dst(submodule)$total_commits:" + echo "* $name $sha1_abbr_src($blob)->$sha1_abbr_dst($submodule)$total_commits:" else - echo "* $name $sha1_abbr_src(submodule)->$sha1_abbr_dst(blob)$total_commits:" + echo "* $name $sha1_abbr_src($submodule)->$sha1_abbr_dst($blob)$total_commits:" fi else echo "* $name $sha1_abbr_src...$sha1_abbr_dst$total_commits:" diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index cfa663264..30b429e7d 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -128,7 +128,7 @@ test_expect_success 'typechanged submodule(submodule->blob), --cached' " < Add foo5 EOF - test_cmp actual expected + test_i18ncmp actual expected " test_expect_success 'typechanged submodule(submodule->blob), --files' " @@ -138,7 +138,7 @@ test_expect_success 'typechanged submodule(submodule->blob), --files' " > Add foo5 EOF - test_cmp actual expected + test_i18ncmp actual expected " rm -rf sm1 && @@ -149,7 +149,7 @@ test_expect_success 'typechanged submodule(submodule->blob)' " * sm1 $head4(submodule)->$head5(blob): EOF - test_cmp actual expected + test_i18ncmp actual expected " rm -f sm1 && @@ -173,7 +173,7 @@ test_expect_success 'typechanged submodule(blob->submodule)' " > Add foo7 EOF - test_cmp expected actual + test_i18ncmp expected actual " commit_file sm1 && -- 2.30.2