From a5743f94b261bcef13f486e29b98fff0ed1a7fc1 Mon Sep 17 00:00:00 2001 From: kkumar-gcc Date: Fri, 26 Apr 2024 18:13:13 +0530 Subject: [PATCH] finish translation for panel.writePlugin --- app/console/commands/panel.go | 6 +++--- lang/en.json | 5 ++++- lang/zh_CN.json | 5 ++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/console/commands/panel.go b/app/console/commands/panel.go index 6d172934..f2a99a51 100644 --- a/app/console/commands/panel.go +++ b/app/console/commands/panel.go @@ -185,7 +185,7 @@ func (receiver *Panel) Handle(ctx console.Context) error { slug := arg1 version := arg2 if len(slug) == 0 || len(version) == 0 { - color.Redln("参数错误") + color.Redln(translate.Get("commands.panel.writePlugin.paramFail")) return nil } @@ -197,11 +197,11 @@ func (receiver *Panel) Handle(ctx console.Context) error { }) if err != nil { - color.Redln("写入插件安装状态失败") + color.Redln(translate.Get("commands.panel.writePlugin.fail")) return nil } - color.Greenln("写入插件安装状态成功") + color.Greenln(translate.Get("commands.panel.writePlugin.success")) case "deletePlugin": slug := arg1 diff --git a/lang/en.json b/lang/en.json index 1ee13dd7..04b4113f 100644 --- a/lang/en.json +++ b/lang/en.json @@ -73,7 +73,10 @@ "fail": "initialization failed" }, "writePlugin": { - "description": "write plugin installation status" + "description": "write plugin installation status", + "paramFail": "plugin slug and version are required", + "fail": "failed to write plugin installation status", + "success": "plugin installation status written successfully" }, "deletePlugin": { "description": "delete plugin installation status" diff --git a/lang/zh_CN.json b/lang/zh_CN.json index 30dfb8d3..6c4bf6ed 100644 --- a/lang/zh_CN.json +++ b/lang/zh_CN.json @@ -73,7 +73,10 @@ "fail": "初始化失败" }, "writePlugin": { - "description": "写入插件安装状态" + "description": "写入插件安装状态", + "paramFail": "参数错误", + "fail": "写入插件安装状态失败", + "success": "写入插件安装状态成功" }, "deletePlugin": { "description": "移除插件安装状态"