summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-09-06 22:16:50 +0700
committerJunio C Hamano <gitster@pobox.com>2012-09-06 13:29:38 -0700
commit50bd8b7eb960ff7a646195e0751b48a0e57e03ad (patch)
tree04f26f9014bcb59a2a4ea1f4dbf90076ad105538 /wt-status.c
parent871e293c9acbeaacce59dcd98fab6028f552f5be (diff)
downloadgit-50bd8b7eb960ff7a646195e0751b48a0e57e03ad.tar.gz
status: remove i18n legos
"%s files" gives no sense what "%s" might be. Give translators full phrases. "blah blah blah%s\n" where %s is another sentence does not show the real length of full line. As a result, l10n messages may exceed 80 columns unintentionally. Make it two sentences. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c48
1 files changed, 28 insertions, 20 deletions
diff --git a/wt-status.c b/wt-status.c
index c110cbc125..4eeaf2396a 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -221,7 +221,7 @@ static void wt_status_print_other_header(struct wt_status *s,
const char *how)
{
const char *c = color(WT_STATUS_HEADER, s);
- status_printf_ln(s, c, _("%s files:"), what);
+ status_printf_ln(s, c, "%s:", what);
if (!advice_status_hints)
return;
status_printf_ln(s, c, _(" (use \"git %s <file>...\" to include in what will be committed)"), how);
@@ -1008,9 +1008,9 @@ void wt_status_print(struct wt_status *s)
wt_status_print_submodule_summary(s, 1); /* unstaged */
}
if (s->show_untracked_files) {
- wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
+ wt_status_print_other(s, &s->untracked, _("Untracked files"), "add");
if (s->show_ignored_files)
- wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
+ wt_status_print_other(s, &s->ignored, _("Ignored files"), "add -f");
} else if (s->commitable)
status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
advice_status_hints
@@ -1023,23 +1023,31 @@ void wt_status_print(struct wt_status *s)
status_printf_ln(s, GIT_COLOR_NORMAL, _("No changes"));
else if (s->nowarn)
; /* nothing */
- else if (s->workdir_dirty)
- printf(_("no changes added to commit%s\n"),
- advice_status_hints
- ? _(" (use \"git add\" and/or \"git commit -a\")") : "");
- else if (s->untracked.nr)
- printf(_("nothing added to commit but untracked files present%s\n"),
- 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)") : "");
- else if (!s->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)") : "");
+ else if (s->workdir_dirty) {
+ if (advice_status_hints)
+ printf(_("no changes added to commit "
+ "(use \"git add\" and/or \"git commit -a\")\n"));
+ else
+ printf(_("no changes added to commit\n"));
+ } else if (s->untracked.nr) {
+ if (advice_status_hints)
+ printf(_("nothing added to commit but untracked files "
+ "present (use \"git add\" to track)\n"));
+ else
+ printf(_("nothing added to commit but untracked files present\n"));
+ } else if (s->is_initial) {
+ if (advice_status_hints)
+ printf(_("nothing to commit (create/copy files "
+ "and use \"git add\" to track)\n"));
+ else
+ printf(_("nothing to commit\n"));
+ } else if (!s->show_untracked_files) {
+ if (advice_status_hints)
+ printf(_("nothing to commit (use -u to show untracked files)\n"));
+ else
+ printf(_("nothing to commit\n"));
+ } else
+ printf(_("nothing to commit, working directory clean\n"));
}
}