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 File struct {
|
||||
}
|
||||
|
||||
// OssToken 文件
|
||||
// @Tags 文件
|
||||
// @Summary 获取ossToken
|
||||
// @Description 获取ossToken
|
||||
// OssToken file
|
||||
// @Tags file
|
||||
// @Summary getossToken
|
||||
// @Description getossToken
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} response.Response
|
||||
@@ -33,7 +33,7 @@ type FileBack struct {
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
// Notify 上传成功后回调
|
||||
// Notify callback after successful upload
|
||||
func (f *File) Notify(c *gin.Context) {
|
||||
|
||||
res := global.Oss.Verify(c.Request)
|
||||
@@ -50,13 +50,13 @@ func (f *File) Notify(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
||||
// Upload 上传文件到本地
|
||||
// @Tags 文件
|
||||
// @Summary 上传文件到本地
|
||||
// @Description 上传文件到本地
|
||||
// Upload upload file to local
|
||||
// @Tags file
|
||||
// @Summary upload file to local
|
||||
// @Description upload file to local
|
||||
// @Accept multipart/form-data
|
||||
// @Produce json
|
||||
// @Param file formData file true "上传文件示例"
|
||||
// @Param file formData file true "file upload example"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /admin/file/upload [post]
|
||||
@@ -71,12 +71,12 @@ func (f *File) Upload(c *gin.Context) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
// 上传文件至指定目录
|
||||
// upload the file to the specified directory
|
||||
err = c.SaveUploadedFile(file, dst)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
// 返回文件web地址
|
||||
// return filewebaddress
|
||||
response.Success(c, gin.H{
|
||||
"url": webPath + file.Filename,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user