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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Sep 13, 2012 at 21:16 UTC
218adaaaa064c436115dbcd5705a0e2c42e90a25
1 file changed
+4
-6
diff.c
+4
-6
@@ -1397,11 +1397,11 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
1397
1398
if (!files) {
1399
assert(insertions == 0 && deletions == 0);
1400
- return fprintf(fp, "%s\n", _(" 0 files changed"));
1400
+ return fprintf(fp, "%s\n", " 0 files changed");
1401
}
1402
1403
strbuf_addf(&sb,
1404
- Q_(" %d file changed", " %d files changed", files),
1404
+ (files == 1) ? " %d file changed" : " %d files changed",
1405
files);
1406
1407
/*
@@ -1418,8 +1418,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
1418
* do not translate it.
1419
*/
1420
strbuf_addf(&sb,
1421
- Q_(", %d insertion(+)", ", %d insertions(+)",
1422
- insertions),
1421
+ (insertions == 1) ? ", %d insertion(+)" : ", %d insertions(+)",
1422
insertions);
1423
}
1424
@@ -1429,8 +1428,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
1428
* do not translate it.
1429
*/
1430
strbuf_addf(&sb,
1432
- Q_(", %d deletion(-)", ", %d deletions(-)",
1433
- deletions),
1431
+ (deletions == 1) ? ", %d deletion(-)" : ", %d deletions(-)",
1432
deletions);
1433
}
1434
strbuf_addch(&sb, '\n');