Code

gettextize: git-branch "(no branch)" message
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 1 Sep 2010 19:04:36 +0000 (19:04 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:10:10 +0000 (07:10 +0000)
Gettextize the "(no branch)" message that's shown by "git branch" when
you're in a detached HEAD.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
builtin/branch.c
t/t3203-branch-output.sh

index 59e71fc40ab335ed78ed35b0271c8b2c3ac8fa0c..fc6c4c341531e2febc3c9c0d99301760c730bd84 100644 (file)
@@ -481,7 +481,7 @@ static void show_detached(struct ref_list *ref_list)
 
        if (head_commit && is_descendant_of(head_commit, ref_list->with_commit)) {
                struct ref_item item;
-               item.name = xstrdup("(no branch)");
+               item.name = xstrdup(_("(no branch)"));
                item.len = strlen(item.name);
                item.kind = REF_LOCAL_BRANCH;
                item.dest = NULL;
index 809d1c4ed49f06d06ba50cda6f52fe9201d2d625..dfdf5a749ae7aea7c1ad7dc2802f8272d382510e 100755 (executable)
@@ -72,7 +72,7 @@ cat >expect <<'EOF'
   branch-two
   master
 EOF
-test_expect_success 'git branch shows detached HEAD properly' '
+test_expect_success NO_GETTEXT_POISON 'git branch shows detached HEAD properly' '
        git checkout HEAD^0 &&
        git branch >actual &&
        test_cmp expect actual