diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-09-22 15:04:55 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-09-22 15:04:55 -0700 |
commit | b1e8f534eff7569dc2e8dab4dee851d1b709f71b (patch) | |
tree | ec9d5cbebc78704727c9ce959f442b3df5cc7d76 /locale/parser.go | |
parent | aae9b4eb835c72c0b7ecd8fa6565eacce3963d00 (diff) |
Simplify locale package usage (refactoring)
Diffstat (limited to 'locale/parser.go')
-rw-r--r-- | locale/parser.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/locale/parser.go b/locale/parser.go deleted file mode 100644 index 03591c1..0000000 --- a/locale/parser.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2018 Frédéric Guillot. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package locale // import "miniflux.app/locale" - -import ( - "encoding/json" - "fmt" -) - -type catalogMessages map[string]interface{} -type catalog map[string]catalogMessages - -func parseCatalogMessages(data string) (catalogMessages, error) { - var translations catalogMessages - if err := json.Unmarshal([]byte(data), &translations); err != nil { - return nil, fmt.Errorf("invalid translation file: %v", err) - } - return translations, nil -} |