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:
parent
db77e55119
commit
f072439b79
5 changed files with 24 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue