Re: [PATCH] i18n: mark outputs of mode changes for i18n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ralf Thielow <ralf.thielow@xxxxxxxxx> writes:

> diff --git a/diff.c b/diff.c
> index 1a594df..25fcb6f 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -2264,21 +2264,21 @@ static void builtin_diff(const char *name_a,
>  	strbuf_addf(&header, "%s%sdiff --git %s %s%s\n", line_prefix, set, a_one, b_two, reset);
>  	if (lbl[0][0] == '/') {
>  		/* /dev/null */
> -		strbuf_addf(&header, "%s%snew file mode %06o%s\n", line_prefix, set, two->mode, reset);
> +		strbuf_addf(&header, "%s%s%s %06o%s\n", line_prefix, set, _("new file mode"), two->mode, reset);
>  		if (xfrm_msg)
>  			strbuf_addstr(&header, xfrm_msg);
>  		must_show_header = 1;
>  	}
>  	else if (lbl[1][0] == '/') {
> -		strbuf_addf(&header, "%s%sdeleted file mode %06o%s\n", line_prefix, set, one->mode, reset);
> +		strbuf_addf(&header, "%s%s%s %06o%s\n", line_prefix, set, _("deleted file mode"), one->mode, reset);
>  		if (xfrm_msg)
>  			strbuf_addstr(&header, xfrm_msg);
>  		must_show_header = 1;
>  	}
>  	else {
>  		if (one->mode != two->mode) {
> -			strbuf_addf(&header, "%s%sold mode %06o%s\n", line_prefix, set, one->mode, reset);
> -			strbuf_addf(&header, "%s%snew mode %06o%s\n", line_prefix, set, two->mode, reset);
> +			strbuf_addf(&header, "%s%s%s %06o%s\n", line_prefix, set, _("old mode"), one->mode, reset);
> +			strbuf_addf(&header, "%s%s%s %06o%s\n", line_prefix, set, _("new mode"), two->mode, reset);
>  			must_show_header = 1;
>  		}
>  		if (xfrm_msg)
> @@ -4130,7 +4130,7 @@ static void show_mode_change(FILE *file, struct diff_filepair *p, int show_name,
>  		const char *line_prefix)
>  {
>  	if (p->one->mode && p->two->mode && p->one->mode != p->two->mode) {
> -		fprintf(file, "%s mode change %06o => %06o%c", line_prefix, p->one->mode,
> +		fprintf(file, _("%s mode change %06o => %06o%c"), line_prefix, p->one->mode,
>  			p->two->mode, show_name ? ' ' : '\n');
>  		if (show_name) {
>  			write_name_quoted(p->two->path, file, '\n');

I do not see how it makes sense to do this alone, among many other
metainfo lines that are not marked for translation.

More importantly, these lines are not for human consumption but for
machine parsing (see builtin/apply.c:parse_git_header() function).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]