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:
@@ -39,15 +39,15 @@ func (is *ServerCmdService) Create(u *model.ServerCmd) error {
|
||||
return res
|
||||
}
|
||||
|
||||
// SendCmd 发送命令
|
||||
// SendCmd send command
|
||||
func (is *ServerCmdService) SendCmd(port int, cmd string, arg string) (string, error) {
|
||||
//组装命令
|
||||
//assemble command
|
||||
cmd = cmd + " " + arg
|
||||
res, err := is.SendSocketCmd("v6", port, cmd)
|
||||
if err == nil {
|
||||
return res, nil
|
||||
}
|
||||
//v6连接失败,尝试v4
|
||||
//v6connection failed, trying v4
|
||||
res, err = is.SendSocketCmd("v4", port, cmd)
|
||||
if err == nil {
|
||||
return res, nil
|
||||
@@ -69,14 +69,14 @@ func (is *ServerCmdService) SendSocketCmd(ty string, port int, cmd string) (stri
|
||||
return "", err
|
||||
}
|
||||
defer conn.Close()
|
||||
//发送命令
|
||||
//send command
|
||||
_, err = conn.Write([]byte(cmd))
|
||||
if err != nil {
|
||||
Logger.Debugf("%s send cmd failed: %v", ty, err)
|
||||
return "", err
|
||||
}
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
//读取返回
|
||||
//read response
|
||||
buf := make([]byte, 1024)
|
||||
n, err := conn.Read(buf)
|
||||
if err != nil && err.Error() != "EOF" {
|
||||
|
||||
Reference in New Issue
Block a user