Skip to content

[Bug]: i18n版本,功能初始化顺序错误。 #1944

Open
@Blues-Code

Description

@Blues-Code

gin-vue-admin 版本

i18n

Node 版本

v18.20.4

Golang 版本

go 1.23.0

是否依旧存在

不可以

bug描述

1,在i18n版本main方法中,viper加载配置文件,global.Translate在初始化之前使用,导致fmt.Printf输出错误
1

`func Translate(msg string) string {
if GVA_TRANSLATOR.IsInit {
	message := GVA_TRANSLATOR.TranslateMessage(msg)
	if message == "" {
		return msg
	}
	return message
}

return msg

}`

修改建议

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions