aboutsummaryrefslogtreecommitdiffhomepage
path: root/template
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-02-27 21:08:32 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-02-27 21:08:32 -0800
commit953d0a2dc05714c22f7c9c389a860fd38c07b66e (patch)
treedbbbb0659ed8e69e02c9b977b63550d1192d6be2 /template
parent9694861cb6ad08ded824b9bf04ef19a3a168d7b9 (diff)
Support localized feed errors generated by background workers
Diffstat (limited to 'template')
-rw-r--r--template/functions.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/template/functions.go b/template/functions.go
index 08a4617..81ce1db 100644
--- a/template/functions.go
+++ b/template/functions.go
@@ -85,8 +85,9 @@ func (f *funcMap) Map() template.FuncMap {
case string:
return f.Language.Get(key.(string), args...)
case errors.LocalizedError:
- err := key.(errors.LocalizedError)
- return err.Localize(f.Language)
+ return key.(errors.LocalizedError).Localize(f.Language)
+ case *errors.LocalizedError:
+ return key.(*errors.LocalizedError).Localize(f.Language)
case error:
return key.(error).Error()
default: