Skip to content

Commit

Permalink
storage: Show both IEC and SI units in the long form
Browse files Browse the repository at this point in the history
Closes #3944
Reviewed-by: Dominik Perpeet <[email protected]>
  • Loading branch information
mvollmer authored and dperpeet committed Mar 10, 2016
1 parent 26c05b4 commit e0a0617
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/storaged/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ define([
};

utils.fmt_size_long = function fmt_size_long(bytes) {
var with_unit = cockpit.format_bytes(bytes, 1024);
/* Translators: Used in "42.5 KB (42399 bytes)" */
return with_unit + " (" + bytes + " " + C_("format-bytes", "bytes") + ")";
var with_binary_unit = cockpit.format_bytes(bytes, 1024);
var with_decimal_unit = cockpit.format_bytes(bytes, 1000);
/* Translators: Used in "..." */
return with_binary_unit + ", " + with_decimal_unit + ", " + bytes + " " + C_("format-bytes", "bytes");
};

utils.fmt_rate = function fmt_rate(bytes_per_sec) {
Expand Down

0 comments on commit e0a0617

Please sign in to comment.