diff options
author | 2017-11-20 14:35:11 -0800 | |
---|---|---|
committer | 2017-11-20 14:35:11 -0800 | |
commit | a76c2a8c22a44bbaada4434ff5ecfaaf54de7d44 (patch) | |
tree | 04c1083a33545cada50b96b0b4ce27da645bdc60 /server | |
parent | ace752490554ab3abc03f1befe2a6e28ffd5d5e6 (diff) |
Improve OPML import/export
Diffstat (limited to 'server')
-rw-r--r-- | server/static/bin.go | 2 | ||||
-rw-r--r-- | server/static/css.go | 2 | ||||
-rw-r--r-- | server/static/js.go | 2 | ||||
-rw-r--r-- | server/template/common.go | 2 | ||||
-rw-r--r-- | server/template/template.go | 15 | ||||
-rw-r--r-- | server/template/views.go | 2 | ||||
-rw-r--r-- | server/ui/controller/opml.go | 5 |
7 files changed, 17 insertions, 13 deletions
diff --git a/server/static/bin.go b/server/static/bin.go index 32ac5b6..e9cba0f 100644 --- a/server/static/bin.go +++ b/server/static/bin.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-20 13:44:53.696612572 -0800 PST m=+0.008696070 +// 2017-11-20 14:18:33.249018092 -0800 PST m=+0.005104170 package static diff --git a/server/static/css.go b/server/static/css.go index b862d6a..105de9a 100644 --- a/server/static/css.go +++ b/server/static/css.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-20 13:44:53.70263347 -0800 PST m=+0.014716968 +// 2017-11-20 14:18:33.25118969 -0800 PST m=+0.007275768 package static diff --git a/server/static/js.go b/server/static/js.go index cf47d47..ceea289 100644 --- a/server/static/js.go +++ b/server/static/js.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-20 13:44:53.707892515 -0800 PST m=+0.019976013 +// 2017-11-20 14:18:33.255571671 -0800 PST m=+0.011657749 package static diff --git a/server/template/common.go b/server/template/common.go index 4e41d02..80bdd39 100644 --- a/server/template/common.go +++ b/server/template/common.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-20 13:44:53.731951822 -0800 PST m=+0.044035320 +// 2017-11-20 14:18:33.28176883 -0800 PST m=+0.037854908 package template diff --git a/server/template/template.go b/server/template/template.go index 086cdc5..7e2bf21 100644 --- a/server/template/template.go +++ b/server/template/template.go @@ -6,11 +6,6 @@ package template import ( "bytes" - "github.com/miniflux/miniflux2/errors" - "github.com/miniflux/miniflux2/locale" - "github.com/miniflux/miniflux2/server/route" - "github.com/miniflux/miniflux2/server/template/helper" - "github.com/miniflux/miniflux2/server/ui/filter" "html/template" "io" "log" @@ -18,6 +13,12 @@ import ( "strings" "time" + "github.com/miniflux/miniflux2/errors" + "github.com/miniflux/miniflux2/locale" + "github.com/miniflux/miniflux2/server/route" + "github.com/miniflux/miniflux2/server/template/helper" + "github.com/miniflux/miniflux2/server/ui/filter" + "github.com/gorilla/mux" ) @@ -61,11 +62,13 @@ func (t *TemplateEngine) ParseAll() { }, "t": func(key interface{}, args ...interface{}) string { switch key.(type) { - case string, error: + case string: return t.currentLocale.Get(key.(string), args...) case errors.LocalizedError: err := key.(errors.LocalizedError) return err.Localize(t.currentLocale) + case error: + return key.(error).Error() default: return "" } diff --git a/server/template/views.go b/server/template/views.go index f5ce314..c7376f0 100644 --- a/server/template/views.go +++ b/server/template/views.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2017-11-20 13:44:53.712375345 -0800 PST m=+0.024458843 +// 2017-11-20 14:18:33.257809595 -0800 PST m=+0.013895673 package template diff --git a/server/ui/controller/opml.go b/server/ui/controller/opml.go index 45d34f8..9d4d2af 100644 --- a/server/ui/controller/opml.go +++ b/server/ui/controller/opml.go @@ -5,8 +5,9 @@ package controller import ( - "github.com/miniflux/miniflux2/server/core" "log" + + "github.com/miniflux/miniflux2/server/core" ) func (c *Controller) Export(ctx *core.Context, request *core.Request, response *core.Response) { @@ -52,7 +53,7 @@ func (c *Controller) UploadOPML(ctx *core.Context, request *core.Request, respon } response.Html().Render("import", args.Merge(tplParams{ - "errorMessage": impErr.Error(), + "errorMessage": impErr, "menu": "feeds", })) |