i18n: git-status "nothing to commit" messages
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>
Ævar Arnfjörð Bjarmason committed
Feb 22, 2011 at 23:42 UTC
8ec9bc0dd5852e5468db576b0cba39f9179d4610
2 files changed
+10
-10
t/t7506-status-submodule.sh
+4
-4
@@ -20,12 +20,12 @@ test_expect_success 'setup' '
20
git commit -m "Add submodule sub"
21
'
22
23
-test_expect_success 'status clean' '
23
+test_expect_success C_LOCALE_OUTPUT 'status clean' '
24
git status >output &&
25
grep "nothing to commit" output
26
'
27
28
-test_expect_success 'commit --dry-run -a clean' '
28
+test_expect_success C_LOCALE_OUTPUT 'commit --dry-run -a clean' '
29
test_must_fail git commit --dry-run -a >output &&
30
grep "nothing to commit" output
31
'
@@ -177,12 +177,12 @@ test_expect_success 'rm submodule contents' '
177
rm -rf sub/* sub/.git
178
'
179
180
-test_expect_success 'status clean (empty submodule dir)' '
180
+test_expect_success C_LOCALE_OUTPUT 'status clean (empty submodule dir)' '
181
git status >output &&
182
grep "nothing to commit" output
183
'
184
185
-test_expect_success 'status -a clean (empty submodule dir)' '
185
+test_expect_success C_LOCALE_OUTPUT 'status -a clean (empty submodule dir)' '
186
test_must_fail git commit --dry-run -a >output &&
187
grep "nothing to commit" output
188
'
wt-status.c
+6
-6
@@ -763,14 +763,14 @@ void wt_status_print(struct wt_status *s)
763
advice_status_hints
764
? _(" (use \"git add\" to track)") : "");
765
else if (s->is_initial)
766
- printf("nothing to commit%s\n", advice_status_hints
767
- ? " (create/copy files and use \"git add\" to track)" : "");
766
+ printf(_("nothing to commit%s\n"), advice_status_hints
767
+ ? _(" (create/copy files and use \"git add\" to track)") : "");
768
else if (!s->show_untracked_files)
769
- printf("nothing to commit%s\n", advice_status_hints
770
- ? " (use -u to show untracked files)" : "");
769
+ printf(_("nothing to commit%s\n"), advice_status_hints
770
+ ? _(" (use -u to show untracked files)") : "");
771
else
772
- printf("nothing to commit%s\n", advice_status_hints
773
- ? " (working directory clean)" : "");
772
+ printf(_("nothing to commit%s\n"), advice_status_hints
773
+ ? _(" (working directory clean)") : "");
774
}
775
}
776