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
+11 -11
View File
@@ -9,11 +9,11 @@ func TestSimpleCache_Set(t *testing.T) {
s := NewSimpleCache()
err := s.Set("key", "value", 0)
if err != nil {
t.Fatalf("写入失败")
t.Fatalf("write failed")
}
err = s.Set("key", 111, 0)
if err != nil {
t.Fatalf("写入失败")
t.Fatalf("write failed")
}
}
@@ -24,7 +24,7 @@ func TestSimpleCache_Get(t *testing.T) {
err = s.Get("key", &value)
fmt.Println("value", value)
if err != nil {
t.Fatalf("读取失败")
t.Fatalf("read failed")
}
err = s.Set("key1", 11, 0)
@@ -32,7 +32,7 @@ func TestSimpleCache_Get(t *testing.T) {
err = s.Get("key1", &value1)
fmt.Println("value1", value1)
if err != nil {
t.Fatalf("读取失败")
t.Fatalf("read failed")
}
err = s.Set("key2", []byte{'a', 'b'}, 0)
@@ -40,7 +40,7 @@ func TestSimpleCache_Get(t *testing.T) {
err = s.Get("key2", &value2)
fmt.Println("value2", string(value2))
if err != nil {
t.Fatalf("读取失败")
t.Fatalf("read failed")
}
err = s.Set("key3", 33.33, 0)
@@ -48,7 +48,7 @@ func TestSimpleCache_Get(t *testing.T) {
err = s.Get("key3", &value3)
fmt.Println("value3", value3)
if err != nil {
t.Fatalf("读取失败")
t.Fatalf("read failed")
}
}
@@ -80,18 +80,18 @@ func TestSimpleCache_GetStruct(t *testing.T) {
}
err := s.Set("key", old, 300)
if err != nil {
t.Fatalf("写入失败")
t.Fatalf("write failed")
}
res := &r{}
err2 := s.Get("key", res)
fmt.Println("res", res)
if err2 != nil {
t.Fatalf("读取失败" + err2.Error())
t.Fatalf("read failed" + err2.Error())
}
//修改原始值,看后面是否会变化
// modify the original value to see whether it changes afterward
old.A = "aa"
old_rr.AA = "aaa"
fmt.Println("old", old)
@@ -99,10 +99,10 @@ func TestSimpleCache_GetStruct(t *testing.T) {
err3 := s.Get("key", res2)
fmt.Println("res2", res2, res2.R.AA, res2.R.BB)
if err3 != nil {
t.Fatalf("读取失败" + err3.Error())
t.Fatalf("read failed" + err3.Error())
}
//if reflect.DeepEqual(res, old) {
// t.Fatalf("读取错误")
// t.Fatalf("read error")
//}
}