Skip to content

Commit

Permalink
Allows to translate the diff messages shown when the
Browse files Browse the repository at this point in the history
user commits, indicating the number of insertions,
deletions and files changed.

Signed-off-by: Jordi Mas <jmas@softcatala.org>
  • Loading branch information
jordimas committed Jul 12, 2021
1 parent d486ca6 commit 0676e24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions diff.c
Expand Up @@ -2593,7 +2593,7 @@ static void print_stat_summary_inserts_deletes(struct diff_options *options,
}

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

/*
Expand All @@ -2606,13 +2606,13 @@ static void print_stat_summary_inserts_deletes(struct diff_options *options,
*/
if (insertions || deletions == 0) {
strbuf_addf(&sb,
(insertions == 1) ? ", %d insertion(+)" : ", %d insertions(+)",
Q_(", %d insertion(+)", ", %d insertions(+)", insertions),
insertions);
}

if (deletions || insertions == 0) {
strbuf_addf(&sb,
(deletions == 1) ? ", %d deletion(-)" : ", %d deletions(-)",
Q_(", %d deletion(-)", ", %d deletions(-)", deletions),
deletions);
}
strbuf_addch(&sb, '\n');
Expand Down

0 comments on commit 0676e24

Please sign in to comment.