Commit 65811676 authored by Giuseppe Terrasi's avatar Giuseppe Terrasi

revert tree string in order to translate properli secs, mins and hours ago into few parts of interface
parent 0715316a
......@@ -167,11 +167,11 @@ def diff_date(date, limen=2):
elif days == 1:
return _('yesterday')
elif minutes >= 60:
return ungettext("%(hr)d hour ago", "%(hr)d hours ago", hours) % {'hr':hours}
return ungettext('%(hr)d ' + _("hour ago"), '%(hr)d ' + _("hours ago"), hours) % {'hr':hours}
elif diff.seconds >= 60:
return ungettext("%(min)d min ago", "%(min)d mins ago", minutes) % {'min':minutes}
return ungettext('%(min)d ' + _("min ago"), '%(min)d ' + _("mins ago"), minutes) % {'min':minutes}
else:
return ungettext("%(sec)d sec ago", "%(sec)d secs ago", diff.seconds) % {'sec':diff.seconds}
return ungettext('%(sec)d ' + _("sec ago"), '%(sec)d ' + _("secs ago"), diff.seconds) % {'sec':diff.seconds}
@register.simple_tag
def media(url):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment