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:
2026-06-27 12:17:04 +02:00
co-authored by Claude Opus 4.8
parent c5687e1506
commit 16e97c8efa
103 changed files with 3088 additions and 3086 deletions
+15 -15
View File
@@ -17,13 +17,13 @@ import (
type Login struct {
}
// Login 登录
// @Tags 登录
// @Summary 登录
// @Description 登录
// Login login
// @Tags login
// @Summary login
// @Description login
// @Accept json
// @Produce json
// @Param body body admin.Login true "登录信息"
// @Param body body admin.Login true "login info"
// @Success 200 {object} response.Response{data=adResp.LoginPayload}
// @Failure 500 {object} response.Response
// @Router /admin/login [post]
@@ -34,7 +34,7 @@ func (ct *Login) Login(c *gin.Context) {
return
}
// 检查登录限制
// check login limit
loginLimiter := global.LoginLimiter
clientIp := c.ClientIP()
_, needCaptcha := loginLimiter.CheckSecurityStatus(clientIp)
@@ -56,7 +56,7 @@ func (ct *Login) Login(c *gin.Context) {
return
}
// 检查是否需要验证码
// check whether a captcha is required
if needCaptcha {
if f.CaptchaId == "" || f.Captcha == "" || !loginLimiter.VerifyCaptcha(f.CaptchaId, f.Captcha) {
response.Fail(c, 101, response.TranslateMsg(c, "CaptchaError"))
@@ -95,7 +95,7 @@ func (ct *Login) Login(c *gin.Context) {
Platform: f.Platform,
})
// 登录成功,清除登录限制
// login successful, clear the login limit
loginLimiter.RemoveAttempts(clientIp)
responseLoginSuccess(c, u, ut.Token)
}
@@ -129,10 +129,10 @@ func (ct *Login) Captcha(c *gin.Context) {
})
}
// Logout 登出
// @Tags 登录
// @Summary 登出
// @Description 登出
// Logout logout
// @Tags login
// @Summary logout
// @Description logout
// @Accept json
// @Produce json
// @Success 200 {object} response.Response
@@ -148,9 +148,9 @@ func (ct *Login) Logout(c *gin.Context) {
}
// LoginOptions
// @Tags 登录
// @Summary 登录选项
// @Description 登录选项
// @Tags login
// @Summary login options
// @Description login options
// @Accept json
// @Produce json
// @Success 200 {object} []string