From 22d466e64666c0c9372f56aa253d61db7f42cb4a Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Fri, 26 Nov 2010 15:35:56 +0000 Subject: Workaround to Python 2.7 regression in locale.format(): it disallows trailing text after the format specifier. --- diff --git a/extensions/cpsection/updater/view.py b/extensions/cpsection/updater/view.py index 2164c0b..ba7c1ad 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) -- cgit v0.9.1