Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
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
+