Skip to content

Commit 218adaa

Browse files
pcloudsgitster
authored andcommitted
Revert diffstat back to English
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 889d358 commit 218adaa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

diff.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,11 +1397,11 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
13971397

13981398
if (!files) {
13991399
assert(insertions == 0 && deletions == 0);
1400-
return fprintf(fp, "%s\n", _(" 0 files changed"));
1400+
return fprintf(fp, "%s\n", " 0 files changed");
14011401
}
14021402

14031403
strbuf_addf(&sb,
1404-
Q_(" %d file changed", " %d files changed", files),
1404+
(files == 1) ? " %d file changed" : " %d files changed",
14051405
files);
14061406

14071407
/*
@@ -1418,8 +1418,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
14181418
* do not translate it.
14191419
*/
14201420
strbuf_addf(&sb,
1421-
Q_(", %d insertion(+)", ", %d insertions(+)",
1422-
insertions),
1421+
(insertions == 1) ? ", %d insertion(+)" : ", %d insertions(+)",
14231422
insertions);
14241423
}
14251424

@@ -1429,8 +1428,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
14291428
* do not translate it.
14301429
*/
14311430
strbuf_addf(&sb,
1432-
Q_(", %d deletion(-)", ", %d deletions(-)",
1433-
deletions),
1431+
(deletions == 1) ? ", %d deletion(-)" : ", %d deletions(-)",
14341432
deletions);
14351433
}
14361434
strbuf_addch(&sb, '\n');

0 commit comments

Comments
 (0)