From: Junio C Hamano Date: Tue, 02 Jul 2019 19:30:13 GMT Subject: Re: [PATCH v6] l10n: localizable upload progress messages Message-ID: In-Reply-To: <20190702182248.5322-2-dimitriy.ryazantcev@gmail.com> Dimitriy Ryazantcev writes: > -void strbuf_humanise_bytes(struct strbuf *buf, off_t bytes) > +static void strbuf_humanise(struct strbuf *buf, off_t bytes, > + int humanise_rate) > { > if (bytes > 1 << 30) { > - strbuf_addf(buf, "%u.%2.2u GiB", > + strbuf_addf(buf, > + humanise_rate == 0 ? > + /* TRANSLATORS: IEC 80000-13:2008 gibibyte */ > + _("%u.%2.2u GiB") : > + /* TRANSLATORS: IEC 80000-13:2008 gibibyte/second */ > + _("%u.%2.2u GiB/s"), > (unsigned)(bytes >> 30), > (unsigned)(bytes & ((1 << 30) - 1)) / 10737419); Thanks. I guess that the previous attempt to make it more table driven was probably a bit overkill, and because it did not quite work well for Q_(), this would probably be the "good enough, let's move on" optimal solution ;-) Will queue.