diff options
author | Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com> | 2019-07-02 21:22:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-02 12:18:49 -0700 |
commit | 8f354a1faedba64daf5442c12cbc605441bb60b0 (patch) | |
tree | c8ce80e82e5b1ba5529bf14a678a98f8a87fa2b6 /progress.c | |
parent | The third batch (diff) | |
download | tgif-8f354a1faedba64daf5442c12cbc605441bb60b0.tar.xz |
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 <dimitriy.ryazantcev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'progress.c')
-rw-r--r-- | progress.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) |