Skip to contentSkip to conversation

i18n: diff/apply statistics

PATCH In review Jiang Xin 2 participants 5 messages Jun 15, 2016 2 messages not in the archive

lore
Share & tools
lore

Jiang Xin

author
#0 lore raw

PATCH 1/1 i18n: diff/apply statistics

translate oneline statistics of diff/apply.

---
 builtin/apply.c |    2 +-
 diff.c          |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
builtin/apply.c +1 -1
index c24d..e289e 100644
@@ -3241,7 +3241,7 @@ static void stat_patch_list(struct patch *patch)
 		show_stats(patch);
 	}
 
-	printf(" %d files changed, %d insertions(+), %d deletions(-)\n", files, adds, dels);
+	printf(_(" %d files changed, %d insertions(+), %d deletions(-)\n"), files, adds, dels);
 }
 
 static void numstat_patch_list(struct patch *patch)
diff.c +2 -2
index 7e1542..b9115 100644
@@ -1476,7 +1476,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
 	}
 	fprintf(options->file, "%s", line_prefix);
 	fprintf(options->file,
-	       " %d files changed, %d insertions(+), %d deletions(-)\n",
+	       _(" %d files changed, %d insertions(+), %d deletions(-)\n"),
 	       total_files, adds, dels);
 }
 
@@ -1507,7 +1507,7 @@ static void show_shortstats(struct diffstat_t *data, struct diff_options *option
 				options->output_prefix_data);
 		fprintf(options->file, "%s", msg->buf);
 	}
-	fprintf(options->file, " %d files changed, %d insertions(+), %d deletions(-)\n",
+	fprintf(options->file, _(" %d files changed, %d insertions(+), %d deletions(-)\n"),
 	       total_files, adds, dels);
 }
 
Signature · 1 line
1.7.9.3.g1fbd7

A message that is not in the archive (sent off-list or not yet received): CANYiYbGg_ORq4HhB+LRUjhwUuZs-PZf8BzAPcS1qDUMmchdCJQ@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): CACsJy8DfdTPfwZJq1_=RzO_f67FoLGJ1Q__Qfqtg+HxKZEMp4g@mail.gmail.com

author
#5 lore raw

2012/2/3 Nguyen Thai Ngoc Duy <[email protected]>:

Quoted 5 lines · Jiang Xin
Quoted 4 lines

2012/2/2 Nguyen Thai Ngoc Duy <[email protected]>:

Quoted 3 lines

There's another patch with similar goal:

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

http://thread.gmane.org/gmane.comp.version-control.git/189453/focus=189509

It's cool, especially the call of interactive_use, so that translations for the statistics line is only for human, not for scripts/pipe...

That's the idea but they decided to allow translations unconditionally in the end.

Ohh, sad, not so cool. Are there any reasons?

Signature · 1 line
Jiang Xin
#6 lore raw
Quoted 8 lines · Jiang Xin

2012/2/3 Nguyen Thai Ngoc Duy <[email protected]>:

Quoted 7 lines · Jiang Xin
Quoted 6 lines

2012/2/2 Nguyen Thai Ngoc Duy <[email protected]>:

Quoted 4 lines

There's another patch with similar goal:

http://thread.gmane.org/gmane.comp.version-control.git/189453/focus=189509

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

It's cool, especially the call of interactive_use, so that translations for the statistics line is only for human, not for scripts/pipe...

That's the idea but they decided to allow translations unconditionally in the end.

Ohh, sad, not so cool. Are there any reasons?

Inconsistency mainly. I don't see anything sad about that though. You should read that thread.

Signature · 1 line
Duy