summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d08ebf9)
raw | patch | inline | side by side (parent: d08ebf9)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 22 Feb 2011 23:42:10 +0000 (23:42 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Mar 2011 07:52:56 +0000 (23:52 -0800) |
Mark the tag_template message as translatable with N_() and then use
it later with _(). We need to skip a test under GETTEXT_POISON that
relies on the output having a leading newline.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
it later with _(). We need to skip a test under GETTEXT_POISON that
relies on the output having a leading newline.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/tag.c | patch | blob | history | |
t/t7004-tag.sh | patch | blob | history |
diff --git a/builtin/tag.c b/builtin/tag.c
index 4bed7c2cf35631fb7bfb250b0ea49bcf446b1e8e..4242e271aea68c8702b61e0829f1ff40cfb7ca2e 100644 (file)
--- a/builtin/tag.c
+++ b/builtin/tag.c
}
static const char tag_template[] =
- "\n"
+ N_("\n"
"#\n"
"# Write a tag message\n"
- "#\n";
+ "#\n");
static void set_signingkey(const char *value)
{
if (!is_null_sha1(prev))
write_tag_body(fd, prev);
else
- write_or_die(fd, tag_template, strlen(tag_template));
+ write_or_die(fd, _(tag_template), strlen(_(tag_template)));
close(fd);
if (launch_editor(path, buf, NULL)) {
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 3e7baaf89f9bada46fc084e568544ce9df833594..1dedfd0c836c06eb3d2f66aa8e4e7eac54368508 100755 (executable)
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
'
test_expect_success \
+ C_LOCALE_OUTPUT \
'message in editor has initial comment: first line' '
# check the first line --- should be empty
echo >first.expect &&