make fmtTimeSpan strings translatable

This commit is contained in:
Damien Elmes 2009-03-23 10:48:28 +09:00
parent caf91b287e
commit 1098bb1c5c

View file

@ -49,7 +49,7 @@ def fmtTimeSpan(time, pad=0, point=0, short=False):
fmt = shortTimeTable[type]
else:
fmt = timeTable[type](_pluralCount(round(time, point)))
timestr = "%(a)d.%(b)df" % {'a': pad, 'b': point}
timestr = _("%(a)d.%(b)df") % {'a': pad, 'b': point}
return ("%" + (fmt % timestr)) % time
def fmtTimeSpanPair(time1, time2, short=False):
@ -61,7 +61,7 @@ def fmtTimeSpanPair(time1, time2, short=False):
fmt = shortTimeTable[type]
else:
fmt = timeTable[type](2)
timestr = "%(a)d.%(b)df" % {'a': 0, 'b': point}
timestr = _("%(a)d.%(b)df") % {'a': 0, 'b': point}
finalstr = "%s-%s" % (
('%' + timestr) % time1,
('%' + timestr) % time2)