Thread (21 messages) flat view 21 messages, 5 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:39

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
From: Jonathan Nieder <redacted>

Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
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"?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help