Re: [PATCH 03/10] i18n: mark relative dates for translation

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

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> From: Jonathan Nieder <jrnieder@xxxxxxxxx>
>
> Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---

Looks nicely done ;-)

>  	/* Give years and months for 5 years or so */
>  	if (diff < 1825) {
> ...
>  	}
>  	/* Otherwise, just years. Centuries is probably overkill. */
> -	snprintf(timebuf, timebuf_size, "%lu years ago", (diff + 183) / 365);
> -	return timebuf;
> +	strbuf_addf(timebuf,
> +		 Q_("%lu year ago", "%lu years ago", (diff + 183) / 365),
> +		 (diff + 183) / 365);
>  }

This is just a tangent, but could we possibly come here and say "1 year
ago"?
--
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]