diff --git a/app/console/commands/panel.go b/app/console/commands/panel.go index 06b9a808..3fe471b4 100644 --- a/app/console/commands/panel.go +++ b/app/console/commands/panel.go @@ -221,7 +221,7 @@ func (receiver *Panel) Handle(ctx console.Context) error { case "writeMysqlPassword": password := arg1 if len(password) == 0 { - color.Redln("参数错误") + color.Redln(translate.Get("commands.panel.writeMysqlPassword.paramFail")) return nil } @@ -233,11 +233,11 @@ func (receiver *Panel) Handle(ctx console.Context) error { }) if err != nil { - color.Redln("写入MySQL root密码失败") + color.Redln(translate.Get("commands.panel.writeMysqlPassword.fail")) return nil } - color.Greenln("写入MySQL root密码成功") + color.Greenln(translate.Get("commands.panel.writeMysqlPassword.success")) case "cleanTask": _, err := facades.Orm().Query().Model(&models.Task{}).Where("status", models.TaskStatusRunning).OrWhere("status", models.TaskStatusWaiting).Update("status", models.TaskStatusFailed) diff --git a/lang/en.json b/lang/en.json index 0d2861ea..e669da6e 100644 --- a/lang/en.json +++ b/lang/en.json @@ -85,7 +85,10 @@ "success": "plugin installation status removed successfully" }, "writeMysqlPassword": { - "description": "write MySQL root password" + "description": "write MySQL root password", + "paramFail": "MySQL root password is required", + "fail": "failed to write MySQL root password", + "success": "MySQL root password written successfully" }, "writeSite": { "description": "write website data to the panel" diff --git a/lang/zh_CN.json b/lang/zh_CN.json index dda059e1..156923d6 100644 --- a/lang/zh_CN.json +++ b/lang/zh_CN.json @@ -85,7 +85,10 @@ "success": "移除插件安装状态成功" }, "writeMysqlPassword": { - "description": "写入MySQL root密码" + "description": "写入MySQL root密码", + "paramFail": "参数错误", + "fail": "写入MySQL root密码失败", + "success": "写入MySQL root密码成功" }, "writeSite": { "description": "写入网站数据到面板"