i18n: Translate all Chinese to English across the codebase
Translate Chinese comments, log/error messages, validator labels and Swagger annotations to English throughout the source code, generated Swagger docs, config files and CI workflows. Make the English README primary: README.md now holds the English docs and README_EN.md holds the Chinese version, with cross-language links updated accordingly. Note: the generated docs/ swagger files were translated in place; run `go generate ./...` (swag init) to regenerate them from the now-English annotations when a Go toolchain is available. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -58,7 +58,7 @@ func (a *Admin) Init() {
|
||||
}
|
||||
}
|
||||
|
||||
// Init 初始化配置
|
||||
// Init initializes the configuration
|
||||
func Init(rowVal *Config, path string) *viper.Viper {
|
||||
if path == "" {
|
||||
path = DefaultConfig
|
||||
@@ -77,9 +77,9 @@ func Init(rowVal *Config, path string) *viper.Viper {
|
||||
v.WatchConfig()
|
||||
|
||||
|
||||
//监听配置修改没什么必要
|
||||
// watching for config changes is not really necessary
|
||||
v.OnConfigChange(func(e fsnotify.Event) {
|
||||
//配置文件修改监听
|
||||
// watch for config file changes
|
||||
fmt.Println("config file changed:", e.Name)
|
||||
if err2 := v.Unmarshal(rowVal); err2 != nil {
|
||||
fmt.Println(err2)
|
||||
@@ -96,7 +96,7 @@ func Init(rowVal *Config, path string) *viper.Viper {
|
||||
return v
|
||||
}
|
||||
|
||||
// ReadEnv 读取环境变量
|
||||
// ReadEnv reads environment variables
|
||||
func ReadEnv(rowVal interface{}) *viper.Viper {
|
||||
v := viper.New()
|
||||
v.AutomaticEnv()
|
||||
|
||||
Reference in New Issue
Block a user