equal
deleted
inserted
replaced
84 for prefix, multiply in prefix_multiply: |
84 for prefix, multiply in prefix_multiply: |
85 if size >= multiply: |
85 if size >= multiply: |
86 # TP: e.g.: '%(size)s %(prefix)s' -> '118.30 MiB' |
86 # TP: e.g.: '%(size)s %(prefix)s' -> '118.30 MiB' |
87 return _(u'%(size)s %(prefix)s') % { |
87 return _(u'%(size)s %(prefix)s') % { |
88 'size': locale.format('%.2f', float(size) / multiply, |
88 'size': locale.format('%.2f', float(size) / multiply, |
89 True), |
89 True).decode(ENCODING, 'replace'), |
90 'prefix': prefix} |
90 'prefix': prefix} |
91 |
91 |
92 |
92 |
93 def size_in_bytes(size): |
93 def size_in_bytes(size): |
94 """Converts the string `size` to a long (size in bytes). |
94 """Converts the string `size` to a long (size in bytes). |