2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 14:57:16 +08:00

finish translation for panel.deleteEntrance

This commit is contained in:
kkumar-gcc
2024-04-26 18:08:50 +05:30
parent 4c8a88ea03
commit 227c5344e3
3 changed files with 25 additions and 25 deletions

View File

@@ -138,7 +138,7 @@ func (receiver *Panel) Handle(ctx console.Context) error {
port, err := tools.Exec(`cat /www/panel/panel.conf | grep APP_PORT | awk -F '=' '{print $2}' | tr -d '\n'`)
if err != nil {
color.Redln(translate.Get("commands.panel.getInfo.portFail"))
color.Redln(translate.Get("commands.panel.portFail"))
return nil
}
ip, err := tools.GetPublicIP()
@@ -152,34 +152,34 @@ func (receiver *Panel) Handle(ctx console.Context) error {
color.Greenln(translate.Get("commands.panel.getInfo.username") + ": " + user.Username)
color.Greenln(translate.Get("commands.panel.getInfo.password") + ": " + password)
color.Greenln(translate.Get("commands.panel.getInfo.port") + ": " + port)
color.Greenln(translate.Get("commands.panel.getInfo.entrance") + ": " + facades.Config().GetString("http.entrance"))
color.Greenln(translate.Get("commands.panel.port") + ": " + port)
color.Greenln(translate.Get("commands.panel.entrance") + ": " + facades.Config().GetString("http.entrance"))
color.Greenln(translate.Get("commands.panel.getInfo.address") + ": " + protocol + "://" + ip + ":" + port + facades.Config().GetString("http.entrance"))
case "getPort":
port, err := tools.Exec(`cat /www/panel/panel.conf | grep APP_PORT | awk -F '=' '{print $2}' | tr -d '\n'`)
if err != nil {
color.Redln("获取面板端口失败")
color.Redln(translate.Get("commands.panel.portFail"))
return nil
}
color.Greenln(translate.Get("commands.panel.getPort.port") + ": " + port)
color.Greenln(translate.Get("commands.panel.port") + ": " + port)
case "getEntrance":
color.Greenln(translate.Get("commands.panel.getEntrance.entrance") + ": " + facades.Config().GetString("http.entrance"))
color.Greenln(translate.Get("commands.panel.entrance") + ": " + facades.Config().GetString("http.entrance"))
case "deleteEntrance":
oldEntrance, err := tools.Exec(`cat /www/panel/panel.conf | grep APP_ENTRANCE | awk -F '=' '{print $2}' | tr -d '\n'`)
if err != nil {
color.Redln("获取面板入口失败")
color.Redln(translate.Get("commands.panel.deleteEntrance.fail"))
return nil
}
if _, err = tools.Exec("sed -i 's!APP_ENTRANCE=" + oldEntrance + "!APP_ENTRANCE=/!g' /www/panel/panel.conf"); err != nil {
color.Redln("删除面板入口失败")
color.Redln(translate.Get("commands.panel.deleteEntrance.fail"))
return nil
}
color.Greenln("删除面板入口成功")
color.Greenln(translate.Get("commands.panel.deleteEntrance.success"))
case "writePlugin":
slug := arg1

View File

@@ -11,6 +11,9 @@
"forDeveloper": "Please use the following commands under the guidance of the developer",
"use": "Please use the following commands",
"tool": "command line tool",
"portFail": "failed to get panel port",
"port": "Panel port",
"entrance": "Panel entrance",
"update": {
"description": "update/fix panel to latest version",
"taskCheck": "There is currently a task being executed and updates are prohibited.",
@@ -23,23 +26,20 @@
"adminGetFail": "failed to get administrator information",
"adminSaveFail": "failed to save administrator information",
"passwordGenerationFail": "failed to generate password",
"portFail": "failed to get panel port",
"username": "Username",
"password": "Password",
"port": "Panel port",
"entrance": "Panel entrance",
"address": "Panel address"
},
"getPort": {
"description": "get the panel access port",
"port": "panel port"
"description": "get the panel access port"
},
"getEntrance": {
"description": "get panel access",
"entrance": "entrance"
"description": "get panel access"
},
"deleteEntrance": {
"description": "delete panel access"
"description": "delete panel access",
"fail": "failed to delete panel entrance",
"success": "panel entrance deleted successfully"
},
"cleanTask": {
"description": "clean up running and waiting tasks in the panel [used when tasks are stuck]"

View File

@@ -11,6 +11,9 @@
"forDeveloper": "以下命令请在开发者指导下使用",
"use": "请使用以下命令",
"tool": "命令行工具",
"port": "面板端口",
"portFail": "获取面板端口失败",
"entrance": "面板入口",
"update": {
"description": "更新 / 修复面板到最新版本",
"taskCheck": "当前有任务正在执行,禁止更新",
@@ -23,23 +26,20 @@
"adminGetFail": "获取管理员信息失败",
"adminSaveFail": "保存管理员信息失败",
"passwordGenerationFail": "生成密码失败",
"portFail": "获取面板端口失败",
"username": "用户名",
"password": "密码",
"port": "面板端口",
"entrance": "面板入口",
"address": "面板地址"
},
"getPort": {
"description": "获取面板访问端口",
"port": "面板端口"
"description": "获取面板访问端口"
},
"getEntrance": {
"description": "获取面板访问入口",
"entrance": "面板入口"
"description": "获取面板访问入口"
},
"deleteEntrance": {
"description": "删除面板访问入口"
"description": "删除面板访问入口",
"fail": "删除面板入口失败",
"success": "删除面板入口成功"
},
"cleanTask": {
"description": "清理面板运行中和等待中的任务[任务卡住时使用]"