Skip to content

Commit

Permalink
Revert diffstat back to English
Browse files Browse the repository at this point in the history
This reverts the i18n part of 7f81463 (Use correct grammar in diffstat
summary line - 2012-02-01) but still keeps the grammar correctness for
English. It also reverts b354f11 (Fix tests under GETTEXT_POISON on
diffstat - 2012-08-27). The result is diffstat always in English
for all commands.

This helps stop users from accidentally sending localized
format-patch'd patches.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Sep 14, 2012
1 parent 889d358 commit 218adaa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,11 +1397,11 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)

if (!files) {
assert(insertions == 0 && deletions == 0);
return fprintf(fp, "%s\n", _(" 0 files changed"));
return fprintf(fp, "%s\n", " 0 files changed");
}

strbuf_addf(&sb,
Q_(" %d file changed", " %d files changed", files),
(files == 1) ? " %d file changed" : " %d files changed",
files);

/*
Expand All @@ -1418,8 +1418,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
* do not translate it.
*/
strbuf_addf(&sb,
Q_(", %d insertion(+)", ", %d insertions(+)",
insertions),
(insertions == 1) ? ", %d insertion(+)" : ", %d insertions(+)",
insertions);
}

Expand All @@ -1429,8 +1428,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
* do not translate it.
*/
strbuf_addf(&sb,
Q_(", %d deletion(-)", ", %d deletions(-)",
deletions),
(deletions == 1) ? ", %d deletion(-)" : ", %d deletions(-)",
deletions);
}
strbuf_addch(&sb, '\n');
Expand Down

0 comments on commit 218adaa

Please sign in to comment.