From 8f354a1faedba64daf5442c12cbc605441bb60b0 Mon Sep 17 00:00:00 2001 From: Dimitriy Ryazantcev Date: Tue, 2 Jul 2019 21:22:48 +0300 Subject: l10n: localizable upload progress messages Currenly the data rate in throughput_string(...) method is output by simple strbuf_humanise_bytes(...) call and '/s' append. But for proper translation of such string the translator needs full context. Add strbuf_humanise_rate(...) method to properly print out localizable version of data rate ('3.5 MiB/s' etc) with full context. Strings with the units in strbuf_humanise_bytes(...) are marked for translation. Signed-off-by: Dimitriy Ryazantcev Signed-off-by: Junio C Hamano --- progress.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'progress.c') diff --git a/progress.c b/progress.c index a2e8cf64a8..951f7c7461 100644 --- a/progress.c +++ b/progress.c @@ -150,8 +150,7 @@ static void throughput_string(struct strbuf *buf, uint64_t total, strbuf_addstr(buf, ", "); strbuf_humanise_bytes(buf, total); strbuf_addstr(buf, " | "); - strbuf_humanise_bytes(buf, rate * 1024); - strbuf_addstr(buf, "/s"); + strbuf_humanise_rate(buf, rate * 1024); } void display_throughput(struct progress *progress, uint64_t total) -- cgit v1.2.3