--- a/src/modules/misc.py Tue Oct 28 13:50:16 2008 -0500
+++ b/src/modules/misc.py Wed Oct 29 15:46:31 2008 +0000
@@ -38,6 +38,7 @@
import time
import calendar
import shutil
+import gettext
from stat import *
import pkg.urlhelpers as urlhelpers
@@ -45,6 +46,8 @@
from pkg.client.imagetypes import img_type_names, IMG_NONE
from pkg import VERSION
+_ = gettext.gettext
+
def time_to_timestamp(t):
"""convert seconds since epoch to %Y%m%dT%H%M%SZ format"""
# XXX optimize?
@@ -378,13 +381,13 @@
in the largest unit possible."""
units = [
- ("B", 2**10),
- ("kB", 2**20),
- ("MB", 2**30),
- ("GB", 2**40),
- ("TB", 2**50),
- ("PB", 2**60),
- ("EB", 2**70)
+ (_("B"), 2**10),
+ (_("kB"), 2**20),
+ (_("MB"), 2**30),
+ (_("GB"), 2**40),
+ (_("TB"), 2**50),
+ (_("PB"), 2**60),
+ (_("EB"), 2**70)
]
for uom, limit in units: