summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
Diffstat (limited to 'searx')
-rw-r--r--searx/webapp.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 54061a462..251d5672b 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -164,21 +164,9 @@ def index():
minutes = int((timedifference.seconds/60)%60)
hours = int(timedifference.seconds/60/60)
if hours == 0:
- if minutes == 1:
- result['publishedDate'] = gettext(u'1 minute ago')
- else:
- result['publishedDate'] = gettext(u'{minutes} minutes ago').format(minutes=minutes)
+ result['publishedDate'] = gettext(u'{minutes} minute(s) ago').format(minutes=minutes)
else:
- if hours == 1:
- if minutes == 1:
- result['publishedDate'] = gettext(u'1 hour, 1 minute ago')
- else:
- result['publishedDate'] = gettext(u'1 hour, {minutes} minutes ago').format(minutes=minutes)
- else:
- if minutes == 1:
- result['publishedDate'] = gettext(u'{hours} hours, 1 minutes ago').format(hours=hours)
- else:
- result['publishedDate'] = gettext(u'{hours} hours, {minutes} minutes ago').format(hours=hours, minutes=minutes)
+ result['publishedDate'] = gettext(u'{hours} hour(s), {minutes} minute(s) ago').format(hours=hours, minutes=minutes)
else:
result['publishedDate'] = format_date(result['publishedDate'])