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
+34 -34
View File
@@ -14,10 +14,10 @@ import (
type Peer struct {
}
// Detail 设备
// @Tags 设备
// @Summary 设备详情
// @Description 设备详情
// Detail device
// @Tags device
// @Summary device details
// @Description device details
// @Accept json
// @Produce json
// @Param id path int true "ID"
@@ -37,13 +37,13 @@ func (ct *Peer) Detail(c *gin.Context) {
return
}
// Create 创建设备
// @Tags 设备
// @Summary 创建设备
// @Description 创建设备
// Create create device
// @Tags device
// @Summary create device
// @Description create device
// @Accept json
// @Produce json
// @Param body body admin.PeerForm true "设备信息"
// @Param body body admin.PeerForm true "device info"
// @Success 200 {object} response.Response{data=model.Peer}
// @Failure 500 {object} response.Response
// @Router /admin/peer/create [post]
@@ -68,18 +68,18 @@ func (ct *Peer) Create(c *gin.Context) {
response.Success(c, nil)
}
// List 列表
// @Tags 设备
// @Summary 设备列表
// @Description 设备列表
// List list
// @Tags device
// @Summary device list
// @Description device list
// @Accept json
// @Produce json
// @Param page query int false "页码"
// @Param page_size query int false "页大小"
// @Param time_ago query int false "时间"
// @Param page query int false "page number"
// @Param page_size query int false "page size"
// @Param time_ago query int false "time"
// @Param id query string false "ID"
// @Param hostname query string false "主机名"
// @Param uuids query string false "uuids 用逗号分隔"
// @Param hostname query string false "hostname"
// @Param uuids query string false "uuids separated by commas"
// @Success 200 {object} response.Response{data=model.PeerList}
// @Failure 500 {object} response.Response
// @Router /admin/peer/list [get]
@@ -121,13 +121,13 @@ func (ct *Peer) List(c *gin.Context) {
response.Success(c, res)
}
// Update 编辑
// @Tags 设备
// @Summary 设备编辑
// @Description 设备编辑
// Update edit
// @Tags device
// @Summary edit device
// @Description edit device
// @Accept json
// @Produce json
// @Param body body admin.PeerForm true "设备信息"
// @Param body body admin.PeerForm true "device info"
// @Success 200 {object} response.Response{data=model.Peer}
// @Failure 500 {object} response.Response
// @Router /admin/peer/update [post]
@@ -156,13 +156,13 @@ func (ct *Peer) Update(c *gin.Context) {
response.Success(c, nil)
}
// Delete 删除
// @Tags 设备
// @Summary 设备删除
// @Description 设备删除
// Delete delete
// @Tags device
// @Summary delete device
// @Description delete device
// @Accept json
// @Produce json
// @Param body body admin.PeerForm true "设备信息"
// @Param body body admin.PeerForm true "device info"
// @Success 200 {object} response.Response
// @Failure 500 {object} response.Response
// @Router /admin/peer/delete [post]
@@ -192,13 +192,13 @@ func (ct *Peer) Delete(c *gin.Context) {
response.Fail(c, 101, response.TranslateMsg(c, "ItemNotFound"))
}
// BatchDelete 批量删除
// @Tags 设备
// @Summary 批量设备删除
// @Description 批量设备删除
// BatchDelete batch delete
// @Tags device
// @Summary batch delete devices
// @Description batch delete devices
// @Accept json
// @Produce json
// @Param body body admin.PeerBatchDeleteForm true "设备id"
// @Param body body admin.PeerBatchDeleteForm true "deviceid"
// @Success 200 {object} response.Response
// @Failure 500 {object} response.Response
// @Router /admin/peer/batchDelete [post]
@@ -232,7 +232,7 @@ func (ct *Peer) SimpleData(c *gin.Context) {
return
}
res := service.AllService.PeerService.List(1, 99999, func(tx *gorm.DB) {
//可以公开的情报
//information that can be made public
tx.Select("id,version")
tx.Where("id in (?)", f.Ids)
})