Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2008-01-18 19:26:52 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2008-01-18 19:26:52 (GMT)
commitce6f25538b8f04a60aaf6e3e9f0b2fa37f4be925 (patch)
tree22be4f3c8cacb3c8e3a73a058efeb4ab0eb61114 /utils.py
parent703d7a577f37968812b4fac6d608010d9cd13446 (diff)
done for the day
git-svn-id: http://mediamods.com/public-svn/camera-activity/tags/51@1017 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index dfdeb25..63d2ac8 100644
--- a/utils.py
+++ b/utils.py
@@ -88,7 +88,6 @@ def scaleSvgToDim( handle, dim ):
def getDateString( when ):
- #todo: internationalize the date
return strftime( "%a, %b %d, %I:%M:%S %p", time.localtime(when) )
@@ -115,4 +114,14 @@ def getFreespaceKb( ):
stat = os.statvfs("/home")
freebytes = stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL]
freekb = freebytes / 1024
- return freekb \ No newline at end of file
+ return freekb
+
+
+def getIStr( s, args ):
+ try:
+ iStr = _(s) % args
+ except:
+ iStr = s % args
+
+ return iStr
+