From: Junio C Hamano Date: Tue, 16 Dec 2025 01:19:38 GMT Subject: Re: [PATCH v3 2/7] strbuf: split out logic to humanise byte values Message-ID: In-Reply-To: <20251215205639.2700270-3-jltobler@gmail.com> 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. > + *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. > + free(value); > +}