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
+10 -10
View File
@@ -12,10 +12,10 @@ import (
type WebClient struct {
}
// ServerConfig 服务配置
// ServerConfig service config
// @Tags WEBCLIENT
// @Summary 服务配置
// @Description 服务配置,给webclient提供api-server
// @Summary service config
// @Description service config, provides an api-server for the webclient
// @Accept json
// @Produce json
// @Success 200 {object} response.Response
@@ -42,10 +42,10 @@ func (i *WebClient) ServerConfig(c *gin.Context) {
)
}
// SharedPeer 分享的peer
// SharedPeer shared peer
// @Tags WEBCLIENT
// @Summary 分享的peer
// @Description 分享的peer
// @Summary shared peer
// @Description shared peer
// @Accept json
// @Produce json
// @Success 200 {object} response.Response
@@ -65,7 +65,7 @@ func (i *WebClient) SharedPeer(c *gin.Context) {
return
}
if sr.Expire != 0 {
//判断是否过期,created_at + expire > now
//check whether expired,created_at + expire > now
ca := time.Time(sr.CreatedAt)
if ca.Add(time.Second * time.Duration(sr.Expire)).Before(time.Now()) {
response.Fail(c, 101, "share expired")
@@ -89,10 +89,10 @@ func (i *WebClient) SharedPeer(c *gin.Context) {
})
}
// ServerConfigV2 服务配置
// ServerConfigV2 service config
// @Tags WEBCLIENT_V2
// @Summary 服务配置
// @Description 服务配置,给webclient提供api-server
// @Summary service config
// @Description service config, provides an api-server for the webclient
// @Accept json
// @Produce json
// @Success 200 {object} response.Response