mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Support localized feed errors generated by background workers
This commit is contained in:
parent
9694861cb6
commit
953d0a2dc0
18 changed files with 59 additions and 65 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue