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
6
strbuf.h
6
strbuf.h
@ -372,6 +372,12 @@ void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *src);
|
||||
*/
|
||||
void strbuf_humanise_bytes(struct strbuf *buf, off_t bytes);
|
||||
|
||||
/**
|
||||
* Append the given byte rate as a human-readable string (i.e. 12.23 KiB/s,
|
||||
* 3.50 MiB/s).
|
||||
*/
|
||||
void strbuf_humanise_rate(struct strbuf *buf, off_t bytes);
|
||||
|
||||
/**
|
||||
* Add a formatted string to the buffer.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user