diff options
author | Frédéric Guillot <fred@miniflux.net> | 2017-11-25 15:56:44 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2017-11-25 15:56:44 -0800 |
commit | f072439b79ff6a003810a337664961865fefa755 (patch) | |
tree | 4080b8fdeca4e157655e2f7b0de7196e67ec11b9 /locale/locale.go | |
parent | db77e551191b8f60ab657b549bc5499b9266cf69 (diff) |
Make sure the package locale pass golint
Diffstat (limited to 'locale/locale.go')
-rw-r--r-- | locale/locale.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/locale/locale.go b/locale/locale.go index 4900525..257ec2b 100644 --- a/locale/locale.go +++ b/locale/locale.go @@ -6,16 +6,19 @@ package locale import "log" +// Translation is the translation mapping table. type Translation map[string]interface{} +// Locales represents locales supported by the system. type Locales map[string]Translation +// Load prepare the locale system by loading all translations. func Load() *Translator { translator := NewTranslator() - for language, translations := range Translations { + for language, tr := range translations { log.Println("Loading translation:", language) - translator.AddLanguage(language, translations) + translator.AddLanguage(language, tr) } return translator |