From 25d8757255adb98d0130ad257857fcdfb1ea4892 Mon Sep 17 00:00:00 2001 From: Vladimir Vissoultchev Date: Wed, 18 Nov 2015 13:31:11 +0200 Subject: [PATCH] Ooops, a special case for "now" --- modules/base/tool.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/base/tool.go b/modules/base/tool.go index ec855462b..2a2781006 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -303,7 +303,7 @@ func timeSince(then time.Time, lang string) string { switch { case diff <= 0: - langTr = "tool.now" + langTr, lbl = "tool.now", "" case diff <= 2: langTr = "tool.1s" case diff < 1*Minute: @@ -340,6 +340,9 @@ func timeSince(then time.Time, lang string) string { langTr, diffNum = "tool.years", diff/Year } + if lbl == "" { + return i18n.Tr(lang, langTr) + } if diffNum == 0 { return i18n.Tr(lang, langTr, lbl) }