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:
Vendored
+4
-4
@@ -32,12 +32,12 @@ func (c *FileCache) Get(key string, value interface{}) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// 获取值,如果文件不存在或者过期,返回空,过滤掉错误
|
||||
// get value; if the file does not exist or has expired, return empty and ignore errors
|
||||
func (c *FileCache) getValue(key string) (string, error) {
|
||||
f := c.fileName(key)
|
||||
fileInfo, err := os.Stat(f)
|
||||
if err != nil {
|
||||
//文件不存在
|
||||
// file does not exist
|
||||
return "", nil
|
||||
}
|
||||
difT := time.Now().Sub(fileInfo.ModTime())
|
||||
@@ -52,7 +52,7 @@ func (c *FileCache) getValue(key string) (string, error) {
|
||||
return string(data), nil
|
||||
}
|
||||
|
||||
// 保存值
|
||||
// save value
|
||||
func (c *FileCache) saveValue(key string, value string, exp int) error {
|
||||
f := c.fileName(key)
|
||||
lock := c.getLock(f)
|
||||
@@ -91,7 +91,7 @@ func (c *FileCache) fileName(key string) string {
|
||||
}
|
||||
|
||||
func (c *FileCache) Gc() error {
|
||||
//检查文件过期时间,并删除
|
||||
// check file expiration time and delete
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user