1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-31 18:31:01 +00:00

Make sure the package locale pass golint

This commit is contained in:
Frédéric Guillot 2017-11-25 15:56:44 -08:00
parent db77e55119
commit f072439b79
5 changed files with 24 additions and 13 deletions

View file

@ -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