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:
@@ -13,10 +13,10 @@ import (
|
||||
type Index struct {
|
||||
}
|
||||
|
||||
// Index 首页
|
||||
// @Tags 首页
|
||||
// @Summary 首页
|
||||
// @Description 首页
|
||||
// Index home
|
||||
// @Tags home
|
||||
// @Summary home
|
||||
// @Description home
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} response.Response
|
||||
@@ -29,10 +29,10 @@ func (i *Index) Index(c *gin.Context) {
|
||||
)
|
||||
}
|
||||
|
||||
// Heartbeat 心跳
|
||||
// @Tags 首页
|
||||
// @Summary 心跳
|
||||
// @Description 心跳
|
||||
// Heartbeat heartbeat
|
||||
// @Tags home
|
||||
// @Summary heartbeat
|
||||
// @Description heartbeat
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} nil
|
||||
@@ -54,7 +54,7 @@ func (i *Index) Heartbeat(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{})
|
||||
return
|
||||
}
|
||||
//如果在40s以内则不更新
|
||||
// do not update if within 40s
|
||||
if time.Now().Unix()-peer.LastOnlineTime >= 30 {
|
||||
upp := &model.Peer{RowId: peer.RowId, LastOnlineTime: time.Now().Unix(), LastOnlineIp: c.ClientIP()}
|
||||
service.AllService.PeerService.Update(upp)
|
||||
@@ -62,17 +62,17 @@ func (i *Index) Heartbeat(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{})
|
||||
}
|
||||
|
||||
// Version 版本
|
||||
// @Tags 首页
|
||||
// @Summary 版本
|
||||
// @Description 版本
|
||||
// Version version
|
||||
// @Tags home
|
||||
// @Summary version
|
||||
// @Description version
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /version [get]
|
||||
func (i *Index) Version(c *gin.Context) {
|
||||
//读取resources/version文件
|
||||
// read the resources/version file
|
||||
v := service.AllService.AppService.GetAppVersion()
|
||||
response.Success(
|
||||
c,
|
||||
|
||||
Reference in New Issue
Block a user