threads / patch / 31106

patchi18n: leave \n out of translated diffstat

Subject: [PATCH] i18n: leave \n out of translated diffstat

## tl;dr

2 messages between Jul 26, 2012 and Jul 26, 2012. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Nguyễn Thái Ngọc Duy· Jul 26, 2012, 12:52 UTC · lore

GETTEXT_POISON scrapes everything in translated strings, including \n. t4205.12 however needs this \n in matching the end result. Keep this \n out of translation to make t4205.12 happy.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 I haven't followed recent i18n patches closely. Jiang may have
 already fixed this in one of his patches. Anyway just in case
 everybody does miss this..
 Should I resend parseopt i18n marking series now or wait until rc
 period is over?
 diff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to diff.c +1 −1
diff --git a/diff.c b/diff.c
index 62cbe14..95706a5 100644
--- a/diff.c
+++ b/diff.c
@@ -1397,7 +1397,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
 
 	if (!files) {
 		assert(insertions == 0 && deletions == 0);
-		return fputs(_(" 0 files changed\n"), fp);
+		return fprintf(fp, "%s\n", _(" 0 files changed"));
 	}
 
 	strbuf_addf(&sb,
-- 
1.7.8
Junio C Hamano· Jul 26, 2012, 17:46 UTC · re: Nguyễn Thái Ngọc Duy · lore

Re: [PATCH] i18n: leave \n out of translated diffstat

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
Show 11 quoted lines
> diff --git a/diff.c b/diff.c
> index 62cbe14..95706a5 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -1397,7 +1397,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
>  
>  	if (!files) {
>  		assert(insertions == 0 && deletions == 0);
> -		return fputs(_(" 0 files changed\n"), fp);
> +		return fprintf(fp, "%s\n", _(" 0 files changed"));
>  	}
Good.

← back to recent threads