Skip to content

Commit

Permalink
i18n: git-status "nothing to commit" messages
Browse files Browse the repository at this point in the history
Gettextize the "nothing to commit" messages. Many tests explicitly
checked for this message. Change them to skip under
GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Mar 10, 2011
1 parent 355ec7a commit 8ec9bc0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions t/t7506-status-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ test_expect_success 'setup' '
git commit -m "Add submodule sub"
'

test_expect_success 'status clean' '
test_expect_success C_LOCALE_OUTPUT 'status clean' '
git status >output &&
grep "nothing to commit" output
'

test_expect_success 'commit --dry-run -a clean' '
test_expect_success C_LOCALE_OUTPUT 'commit --dry-run -a clean' '
test_must_fail git commit --dry-run -a >output &&
grep "nothing to commit" output
'
Expand Down Expand Up @@ -177,12 +177,12 @@ test_expect_success 'rm submodule contents' '
rm -rf sub/* sub/.git
'

test_expect_success 'status clean (empty submodule dir)' '
test_expect_success C_LOCALE_OUTPUT 'status clean (empty submodule dir)' '
git status >output &&
grep "nothing to commit" output
'

test_expect_success 'status -a clean (empty submodule dir)' '
test_expect_success C_LOCALE_OUTPUT 'status -a clean (empty submodule dir)' '
test_must_fail git commit --dry-run -a >output &&
grep "nothing to commit" output
'
Expand Down
12 changes: 6 additions & 6 deletions wt-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,14 +763,14 @@ void wt_status_print(struct wt_status *s)
advice_status_hints
? _(" (use \"git add\" to track)") : "");
else if (s->is_initial)
printf("nothing to commit%s\n", advice_status_hints
? " (create/copy files and use \"git add\" to track)" : "");
printf(_("nothing to commit%s\n"), advice_status_hints
? _(" (create/copy files and use \"git add\" to track)") : "");
else if (!s->show_untracked_files)
printf("nothing to commit%s\n", advice_status_hints
? " (use -u to show untracked files)" : "");
printf(_("nothing to commit%s\n"), advice_status_hints
? _(" (use -u to show untracked files)") : "");
else
printf("nothing to commit%s\n", advice_status_hints
? " (working directory clean)" : "");
printf(_("nothing to commit%s\n"), advice_status_hints
? _(" (working directory clean)") : "");
}
}

Expand Down

0 comments on commit 8ec9bc0

Please sign in to comment.