mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
make fmtTimeSpan strings translatable
This commit is contained in:
parent
caf91b287e
commit
1098bb1c5c
1 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ def fmtTimeSpan(time, pad=0, point=0, short=False):
|
||||||
fmt = shortTimeTable[type]
|
fmt = shortTimeTable[type]
|
||||||
else:
|
else:
|
||||||
fmt = timeTable[type](_pluralCount(round(time, point)))
|
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
|
return ("%" + (fmt % timestr)) % time
|
||||||
|
|
||||||
def fmtTimeSpanPair(time1, time2, short=False):
|
def fmtTimeSpanPair(time1, time2, short=False):
|
||||||
|
@ -61,7 +61,7 @@ def fmtTimeSpanPair(time1, time2, short=False):
|
||||||
fmt = shortTimeTable[type]
|
fmt = shortTimeTable[type]
|
||||||
else:
|
else:
|
||||||
fmt = timeTable[type](2)
|
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" % (
|
finalstr = "%s-%s" % (
|
||||||
('%' + timestr) % time1,
|
('%' + timestr) % time1,
|
||||||
('%' + timestr) % time2)
|
('%' + timestr) % time2)
|
||||||
|
|
Loading…
Reference in a new issue