diff options
author | Walter Bender <walter@sugarlabs.org> | 2010-11-26 15:35:56 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2010-11-26 15:35:56 (GMT) |
commit | c0885c5fe55dca2d9fb4df32b7a4e9bae95a301b (patch) | |
tree | b7df9fb9dfff9bc71235305bb8426c57430bef1d | |
parent | 4a63bc3121d6084804ef8445d0cdc50160810b65 (diff) |
Workaround to Python 2.7 regression in locale.format(): it disallows trailing text after the format specifier.
-rw-r--r-- | extensions/cpsection/updater/view.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/cpsection/updater/view.py b/extensions/cpsection/updater/view.py index de50d8d..814658f 100644 --- a/extensions/cpsection/updater/view.py +++ b/extensions/cpsection/updater/view.py @@ -385,7 +385,7 @@ def _format_size(size): return _('1 KB') elif size < 1024 * 1024: # TRANS: download size of small updates, e.g. '250 KB' - return locale.format(_('%.0f KB'), size / 1024.0) + return locale.format_string(_('%.0f KB'), size / 1024.0) else: # TRANS: download size of updates, e.g. '2.3 MB' - return locale.format(_('%.1f MB'), size / 1024.0 / 1024) + return locale.format_string(_('%.1f MB'), size / 1024.0 / 1024) |