diff --git a/i18n/gi18n/gi18n_manager.go b/i18n/gi18n/gi18n_manager.go index e7105c5be..6b737df94 100644 --- a/i18n/gi18n/gi18n_manager.go +++ b/i18n/gi18n/gi18n_manager.go @@ -1,4 +1,4 @@ -// Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved. +// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, @@ -13,8 +13,6 @@ import ( "strings" "sync" - "github.com/gogf/gf/os/glog" - "github.com/gogf/gf/os/gfsnotify" "github.com/gogf/gf/text/gregex" @@ -235,11 +233,11 @@ func (m *Manager) init() { m.data[lang] = make(map[string]string) } if j, err := gjson.LoadContent(file.Content()); err == nil { - for k, v := range j.ToMap() { + for k, v := range j.Map() { m.data[lang][k] = gconv.String(v) } } else { - glog.Errorf("load i18n file '%s' failed: %v", name, err) + intlog.Errorf("load i18n file '%s' failed: %v", name, err) } } } @@ -270,11 +268,11 @@ func (m *Manager) init() { m.data[lang] = make(map[string]string) } if j, err := gjson.LoadContent(gfile.GetBytes(file)); err == nil { - for k, v := range j.ToMap() { + for k, v := range j.Map() { m.data[lang][k] = gconv.String(v) } } else { - glog.Errorf("load i18n file '%s' failed: %v", file, err) + intlog.Errorf("load i18n file '%s' failed: %v", file, err) } } // Monitor changes of i18n files for hot reload feature.