Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Blues-Code opened this issue Nov 26, 2024 · 1 comment
Open

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

Blues-Code opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Blues-Code
Copy link

Blues-Code commented Nov 26, 2024

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

@Blues-Code Blues-Code added the bug Something isn't working label Nov 26, 2024
@pixelmaxQm pixelmaxQm changed the title [Bug]: [Bug]: i18n版本,功能初始化顺序错误。 Dec 2, 2024
@pixelmaxQm
Copy link
Collaborator

我们尽快复现并修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants