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>
This commit is contained in:
committed by
Junio C Hamano
parent
8dca754b1e
commit
8f354a1fae
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user