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:
+2
-2
@@ -15,9 +15,9 @@ type User struct {
|
||||
TimeModel
|
||||
}
|
||||
|
||||
// BeforeSave 钩子用于确保 email 字段有合理的默认值
|
||||
// BeforeSave hook ensures the email field has a sensible default value
|
||||
//func (u *User) BeforeSave(tx *gorm.DB) (err error) {
|
||||
// // 如果 email 为空,设置为默认值
|
||||
// // If email is empty, set it to a default value
|
||||
// if u.Email == "" {
|
||||
// u.Email = fmt.Sprintf("%s@example.com", u.Username)
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user