mirror of
https://github.com/miniflux/v2.git
synced 2025-07-12 16:58:36 +00:00
Improve OPML import/export
This commit is contained in:
parent
ace7524905
commit
a76c2a8c22
15 changed files with 51 additions and 31 deletions
|
@ -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 ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue