summaryrefslogtreecommitdiff
path: root/progress.c
diff options
context:
space:
mode:
authorDimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>2019-07-02 18:22:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-02 19:18:49 (GMT)
commit8f354a1faedba64daf5442c12cbc605441bb60b0 (patch)
treec8ce80e82e5b1ba5529bf14a678a98f8a87fa2b6 /progress.c
parent8dca754b1e874719a732bc9ab7b0e14b21b1bc10 (diff)
downloadgit-8f354a1faedba64daf5442c12cbc605441bb60b0.zip
git-8f354a1faedba64daf5442c12cbc605441bb60b0.tar.gz
git-8f354a1faedba64daf5442c12cbc605441bb60b0.tar.bz2
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.c3
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)