1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

fix language settings loading

This commit is contained in:
Harvey Tindall 2021-01-21 14:16:03 +00:00
parent 27ac0bf43e
commit 882a3467db
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
5 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@ func (ls *adminLangs) getOptions(chosen string) (string, []string) {
i := 0
for _, lang := range *ls {
opts[i] = lang.Meta.Name
i++
}
return chosenLang, opts
}
@ -39,6 +40,7 @@ func (ls *formLangs) getOptions(chosen string) (string, []string) {
i := 0
for _, lang := range *ls {
opts[i] = lang.Meta.Name
i++
}
return chosenLang, opts
}
@ -58,6 +60,7 @@ func (ls *emailLangs) getOptions(chosen string) (string, []string) {
i := 0
for _, lang := range *ls {
opts[i] = lang.Meta.Name
i++
}
return chosenLang, opts
}

View File

@ -147,7 +147,7 @@ type setting struct {
}
type section struct {
Meta langMeta `json:"meta"`
Meta meta `json:"meta"`
Order []string `json:"order"`
Settings map[string]setting `json:"settings"`
}