diff options
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 + |