mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-23 01:20:11 +00:00
fix language settings loading
This commit is contained in:
parent
27ac0bf43e
commit
882a3467db
3
lang.go
3
lang.go
@ -19,6 +19,7 @@ func (ls *adminLangs) getOptions(chosen string) (string, []string) {
|
|||||||
i := 0
|
i := 0
|
||||||
for _, lang := range *ls {
|
for _, lang := range *ls {
|
||||||
opts[i] = lang.Meta.Name
|
opts[i] = lang.Meta.Name
|
||||||
|
i++
|
||||||
}
|
}
|
||||||
return chosenLang, opts
|
return chosenLang, opts
|
||||||
}
|
}
|
||||||
@ -39,6 +40,7 @@ func (ls *formLangs) getOptions(chosen string) (string, []string) {
|
|||||||
i := 0
|
i := 0
|
||||||
for _, lang := range *ls {
|
for _, lang := range *ls {
|
||||||
opts[i] = lang.Meta.Name
|
opts[i] = lang.Meta.Name
|
||||||
|
i++
|
||||||
}
|
}
|
||||||
return chosenLang, opts
|
return chosenLang, opts
|
||||||
}
|
}
|
||||||
@ -58,6 +60,7 @@ func (ls *emailLangs) getOptions(chosen string) (string, []string) {
|
|||||||
i := 0
|
i := 0
|
||||||
for _, lang := range *ls {
|
for _, lang := range *ls {
|
||||||
opts[i] = lang.Meta.Name
|
opts[i] = lang.Meta.Name
|
||||||
|
i++
|
||||||
}
|
}
|
||||||
return chosenLang, opts
|
return chosenLang, opts
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ type setting struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type section struct {
|
type section struct {
|
||||||
Meta langMeta `json:"meta"`
|
Meta meta `json:"meta"`
|
||||||
Order []string `json:"order"`
|
Order []string `json:"order"`
|
||||||
Settings map[string]setting `json:"settings"`
|
Settings map[string]setting `json:"settings"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user