添加多语言最基础代码
This commit is contained in:
@@ -51,7 +51,7 @@ func (this *AdminAction) RunGet(params struct {
|
||||
|
||||
// 权限
|
||||
moduleMaps := []maps.Map{}
|
||||
for _, m := range configloaders.AllModuleMaps() {
|
||||
for _, m := range configloaders.AllModuleMaps(this.Lang()) {
|
||||
code := m.GetString("code")
|
||||
isChecked := false
|
||||
for _, module := range admin.Modules {
|
||||
|
||||
@@ -20,7 +20,7 @@ func (this *CreatePopupAction) Init() {
|
||||
}
|
||||
|
||||
func (this *CreatePopupAction) RunGet(params struct{}) {
|
||||
this.Data["modules"] = configloaders.AllModuleMaps()
|
||||
this.Data["modules"] = configloaders.AllModuleMaps(this.Lang())
|
||||
this.Show()
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ func (this *UpdateAction) RunGet(params struct {
|
||||
}
|
||||
|
||||
// 权限
|
||||
var moduleMaps = configloaders.AllModuleMaps()
|
||||
var moduleMaps = configloaders.AllModuleMaps(this.Lang())
|
||||
for _, m := range moduleMaps {
|
||||
code := m.GetString("code")
|
||||
isChecked := false
|
||||
|
||||
@@ -39,7 +39,7 @@ func (this *IndexAction) RunGet(params struct{}) {
|
||||
module, ok := configloaders.FindFirstAdminModule(this.AdminId())
|
||||
if ok {
|
||||
if module != "dashboard" {
|
||||
for _, m := range configloaders.AllModuleMaps() {
|
||||
for _, m := range configloaders.AllModuleMaps(this.Lang()) {
|
||||
if m.GetString("code") == module {
|
||||
this.RedirectURL(m.GetString("url"))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user