path: root/progress.c
diff options
authorDimitriy Ryazantcev <>2019-07-02 18:22:48 (GMT)
committerJunio C Hamano <>2019-07-02 19:18:49 (GMT)
commit8f354a1faedba64daf5442c12cbc605441bb60b0 (patch)
treec8ce80e82e5b1ba5529bf14a678a98f8a87fa2b6 /progress.c
parent8dca754b1e874719a732bc9ab7b0e14b21b1bc10 (diff)
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 <>
Diffstat (limited to 'progress.c')
1 files changed, 1 insertions, 2 deletions
diff --git a/progress.c b/progress.c
index a2e8cf6..951f7c7 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)