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:
@@ -15,10 +15,10 @@ import (
|
||||
type AddressBook struct {
|
||||
}
|
||||
|
||||
// Detail 地址簿
|
||||
// @Tags 地址簿
|
||||
// @Summary 地址簿详情
|
||||
// @Description 地址簿详情
|
||||
// Detail address book
|
||||
// @Tags address book
|
||||
// @Summary address book details
|
||||
// @Description address book details
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int true "ID"
|
||||
@@ -38,13 +38,13 @@ func (ct *AddressBook) Detail(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// Create 创建地址簿
|
||||
// @Tags 地址簿
|
||||
// @Summary 创建地址簿
|
||||
// @Description 创建地址簿
|
||||
// Create create address book
|
||||
// @Tags address book
|
||||
// @Summary create address book
|
||||
// @Description create address book
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body admin.AddressBookForm true "地址簿信息"
|
||||
// @Param body body admin.AddressBookForm true "address book info"
|
||||
// @Success 200 {object} response.Response{data=model.AddressBook}
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /admin/address_book/create [post]
|
||||
@@ -84,13 +84,13 @@ func (ct *AddressBook) Create(c *gin.Context) {
|
||||
response.Success(c, nil)
|
||||
}
|
||||
|
||||
// BatchCreate 批量创建地址簿
|
||||
// @Tags 地址簿
|
||||
// @Summary 批量创建地址簿
|
||||
// @Description 批量创建地址簿
|
||||
// BatchCreate batch create address books
|
||||
// @Tags address book
|
||||
// @Summary batch create address books
|
||||
// @Description batch create address books
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body admin.AddressBookForm true "地址簿信息"
|
||||
// @Param body body admin.AddressBookForm true "address book info"
|
||||
// @Success 200 {object} response.Response{data=model.AddressBook}
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /admin/address_book/batchCreate [post]
|
||||
@@ -113,13 +113,13 @@ func (ct *AddressBook) BatchCreate(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
if ul > 1 {
|
||||
//多用户置空标签
|
||||
//clear tags in multi-user mode
|
||||
f.Tags = []string{}
|
||||
//多用户只能创建到默认地址簿
|
||||
//in multi-user mode, can only create in the default address book
|
||||
f.CollectionId = 0
|
||||
}
|
||||
|
||||
//创建标签
|
||||
//create tag
|
||||
/*for _, fu := range f.UserIds {
|
||||
if fu == 0 {
|
||||
continue
|
||||
@@ -148,16 +148,16 @@ func (ct *AddressBook) BatchCreate(c *gin.Context) {
|
||||
response.Success(c, nil)
|
||||
}
|
||||
|
||||
// List 列表
|
||||
// @Tags 地址簿
|
||||
// @Summary 地址簿列表
|
||||
// @Description 地址簿列表
|
||||
// List list
|
||||
// @Tags address book
|
||||
// @Summary address book list
|
||||
// @Description address book list
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param page query int false "页码"
|
||||
// @Param page_size query int false "页大小"
|
||||
// @Param user_id query int false "用户id"
|
||||
// @Param is_my query int false "是否是我的"
|
||||
// @Param page query int false "page number"
|
||||
// @Param page_size query int false "page size"
|
||||
// @Param user_id query int false "userid"
|
||||
// @Param is_my query int false "whether it is mine"
|
||||
// @Success 200 {object} response.Response{data=model.AddressBookList}
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /admin/address_book/list [get]
|
||||
@@ -196,13 +196,13 @@ func (ct *AddressBook) List(c *gin.Context) {
|
||||
response.Success(c, res)
|
||||
}
|
||||
|
||||
// Update 编辑
|
||||
// @Tags 地址簿
|
||||
// @Summary 地址簿编辑
|
||||
// @Description 地址簿编辑
|
||||
// Update edit
|
||||
// @Tags address book
|
||||
// @Summary edit address book
|
||||
// @Description edit address book
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body admin.AddressBookForm true "地址簿信息"
|
||||
// @Param body body admin.AddressBookForm true "address book info"
|
||||
// @Success 200 {object} response.Response{data=model.AddressBook}
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /admin/address_book/update [post]
|
||||
@@ -240,13 +240,13 @@ func (ct *AddressBook) Update(c *gin.Context) {
|
||||
response.Success(c, nil)
|
||||
}
|
||||
|
||||
// Delete 删除
|
||||
// @Tags 地址簿
|
||||
// @Summary 地址簿删除
|
||||
// @Description 地址簿删除
|
||||
// Delete delete
|
||||
// @Tags address book
|
||||
// @Summary delete address book
|
||||
// @Description delete address book
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body admin.AddressBookForm true "地址簿信息"
|
||||
// @Param body body admin.AddressBookForm true "address book info"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /admin/address_book/delete [post]
|
||||
@@ -277,12 +277,12 @@ func (ct *AddressBook) Delete(c *gin.Context) {
|
||||
}
|
||||
|
||||
// ShareByWebClient
|
||||
// @Tags 地址簿
|
||||
// @Summary 地址簿分享
|
||||
// @Description 地址簿分享
|
||||
// @Tags address book
|
||||
// @Summary share address book
|
||||
// @Description share address book
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body admin.ShareByWebClientForm true "地址簿信息"
|
||||
// @Param body body admin.ShareByWebClientForm true "address book info"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /admin/address_book/share [post]
|
||||
|
||||
Reference in New Issue
Block a user