summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96d7c32)
raw | patch | inline | side by side (parent: 96d7c32)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Thu, 2 Sep 2010 18:55:40 +0000 (18:55 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:12:10 +0000 (07:12 +0000) |
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>
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>
builtin/tag.c | patch | blob | history | |
t/t7004-tag.sh | patch | blob | history |
diff --git a/builtin/tag.c b/builtin/tag.c
index 0baa2079a3590af8052f05bfe46e8cba0f6e79a0..9da762cbf79c80d5ea8235724b62ec48e9eeb20b 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 700b556fe886ff8e6927591e4a047542bc00ef83..99e867730444244d6108a331eea4b03c2b197829 100755 (executable)
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
'
test_expect_success \
+ NO_GETTEXT_POISON \
'message in editor has initial comment: first line' '
# check the first line --- should be empty
echo >first.expect &&