From: Justin Tobler Date: Tue, 16 Dec 2025 01:36:10 GMT Subject: Re: [PATCH v3 2/7] strbuf: split out logic to humanise byte values Message-ID: In-Reply-To: On 25/12/16 10:19AM, Junio C Hamano wrote: > Justin Tobler writes: > > > + *value = xstrfmt(_("%u"), (unsigned)bytes); > > Does this "%u" need translation? > > I very much doubt it, but if it did, this does need TRANSLATORS > comment. Ya, I don't think one should be necessary. Will remove in the next version. I think I made the same mistake in humanise_count() in a later patch. I'll also adjust it there. > > > + *unit = humanise_rate ? > > + /* TRANSLATORS: IEC 80000-13:2008 byte/second */ > > + Q_("byte/s", "bytes/s", bytes) : > > + /* TRANSLATORS: IEC 80000-13:2008 byte */ > > + Q_("byte", "bytes", bytes); > > } > > } > > > > +static void strbuf_humanise(struct strbuf *buf, off_t bytes, unsigned flags) > > +{ > > + char *value; > > + const char *unit; > > + > > + humanise_bytes(bytes, &value, &unit, flags); > > + strbuf_addf(buf, _("%s %s"), value, unit); > > This definitely needs the TRANSLATORS comment to tell what is going on. Ok, will do in the next version. Thanks :) -Justin