mirror of https://github.com/snachodog/mybuddy.git
bugfix: dashboard shows ago when less then 1minute
This commit is contained in:
parent
59e9263a69
commit
5ccca11b42
|
@ -38,7 +38,7 @@ def duration_string(duration, precision="s"):
|
||||||
duration = ""
|
duration = ""
|
||||||
if h > 0:
|
if h > 0:
|
||||||
duration = ngettext("%(hours)s hour", "%(hours)s hours", h) % {"hours": h}
|
duration = ngettext("%(hours)s hour", "%(hours)s hours", h) % {"hours": h}
|
||||||
if m > 0 and precision != "h":
|
if m >= 0 and precision != "h":
|
||||||
if duration != "":
|
if duration != "":
|
||||||
duration += ", "
|
duration += ", "
|
||||||
duration += ngettext("%(minutes)s minute", "%(minutes)s minutes", m) % {
|
duration += ngettext("%(minutes)s minute", "%(minutes)s minutes", m) % {
|
||||||
|
|
Loading…
Reference in New Issue