i18n: git-submodule "blob" and "submodule" messages
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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
May 21, 2011 at 18:44 UTC
b3e73449642d3728986f4d7620a4050f1ff0999c
2 files changed
+8
-6
git-submodule.sh
+4
-2
@@ -712,11 +712,13 @@ cmd_summary() {
712
sha1_abbr_dst=$(echo $sha1_dst | cut -c1-7)
713
if test $status = T
714
then
715
+ blob="$(gettext "blob")"
716
+ submodule="$(gettext "submodule")"
717
if test $mod_dst = 160000
718
then
717
- echo "* $name $sha1_abbr_src(blob)->$sha1_abbr_dst(submodule)$total_commits:"
719
+ echo "* $name $sha1_abbr_src($blob)->$sha1_abbr_dst($submodule)$total_commits:"
720
else
719
- echo "* $name $sha1_abbr_src(submodule)->$sha1_abbr_dst(blob)$total_commits:"
721
+ echo "* $name $sha1_abbr_src($submodule)->$sha1_abbr_dst($blob)$total_commits:"
722
fi
723
else
724
echo "* $name $sha1_abbr_src...$sha1_abbr_dst$total_commits:"
t/t7401-submodule-summary.sh
+4
-4
@@ -128,7 +128,7 @@ test_expect_success 'typechanged submodule(submodule->blob), --cached' "
128
< Add foo5
129
130
EOF
131
- test_cmp actual expected
131
+ test_i18ncmp actual expected
132
"
133
134
test_expect_success 'typechanged submodule(submodule->blob), --files' "
@@ -138,7 +138,7 @@ test_expect_success 'typechanged submodule(submodule->blob), --files' "
138
> Add foo5
139
140
EOF
141
- test_cmp actual expected
141
+ test_i18ncmp actual expected
142
"
143
144
rm -rf sm1 &&
@@ -149,7 +149,7 @@ test_expect_success 'typechanged submodule(submodule->blob)' "
149
* sm1 $head4(submodule)->$head5(blob):
150
151
EOF
152
- test_cmp actual expected
152
+ test_i18ncmp actual expected
153
"
154
155
rm -f sm1 &&
@@ -173,7 +173,7 @@ test_expect_success 'typechanged submodule(blob->submodule)' "
173
> Add foo7
174
175
EOF
176
- test_cmp expected actual
176
+ test_i18ncmp expected actual
177
"
178
179
commit_file sm1 &&