diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-10-14 21:30:27 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-10-14 21:30:27 +0000 |
commit | 781d4b340208f3271e7223f4bfca7631ba3afee5 (patch) | |
tree | 854c205cdd207bb7eb5f32a3e443a467494634bf /iw | |
parent | 142f05bc088890f582d9c4492002665679535c48 (diff) | |
download | anaconda-781d4b340208f3271e7223f4bfca7631ba3afee5.tar.gz anaconda-781d4b340208f3271e7223f4bfca7631ba3afee5.tar.xz anaconda-781d4b340208f3271e7223f4bfca7631ba3afee5.zip |
make size strings more translation friendly (#106157)
Diffstat (limited to 'iw')
-rw-r--r-- | iw/progress_gui.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/iw/progress_gui.py b/iw/progress_gui.py index 22e8b2237..855722f76 100644 --- a/iw/progress_gui.py +++ b/iw/progress_gui.py @@ -33,18 +33,20 @@ from gui import processEvents, takeScreenShot # FIXME: from redhat-config-packages. perhaps move to common location def size_string (size): + def number_format(s): + return locale.format("%s", s, 1) + if size > 1024 * 1024: size = size / (1024*1024) - units_str = _(" MB") + return _("%s MB") %(number_format(size),) elif size > 1024: size = size / 1024 - units_str = _(" KB") + return _("%s KB") %(number_format(size),) else: if size == 1: - units_str = _(" Byte") + return _("%s Byte") %(number_format(size),) else: - units_str = _(" Bytes") - return locale.format ("%s", size, 1) + units_str + return _("%s Bytes") %(number_format(size),) class InstallProgressWindow_NEW (InstallWindow): |