[PATCH 27/51] i18n: git-submodule $errmsg messages
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 3, 2011, 16:45 UTC
- Message-ID
- <1301849175-1697-28-git-send-email-avarab@gmail.com>
- In-Reply-To
- <1301849175-1697-1-git-send-email-avarab@gmail.com>
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 C_LOCALE_OUTPUT.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- git-submodule.sh | 6 +++--- t/t7401-submodule-summary.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh index 5fe29a2..b6c9a5b 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -646,13 +646,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= diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index efd220b..1b703fb 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -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 C_LOCALE_OUTPUT 'nonexistent commit' " git submodule summary >actual && cat >expected <<-EOF && * sm1 $head4...$head6:
-- 1.7.4.1