diff --git a/backend/i18n/lang/en.yaml b/backend/i18n/lang/en.yaml index ea2e2b3f2..39b80c6f9 100644 --- a/backend/i18n/lang/en.yaml +++ b/backend/i18n/lang/en.yaml @@ -278,5 +278,6 @@ UpdatePortFirewallReload: "Failed to reload the firewall, {{ .err }}, please man UserInfo: "Get panel information" UserInfoAddr: "Panel address: " UserInfoPassHelp: "Tip: To change the password, you can execute the command: " -SystemVersion: "Get system version information" DBConnErr: "Error: Failed to initialize database connection, {{ .err }}" +SystemVersion: "version: " +SystemMode: "mode: " diff --git a/backend/i18n/lang/fa.yaml b/backend/i18n/lang/fa.yaml index 612b34aab..da66e965d 100644 --- a/backend/i18n/lang/fa.yaml +++ b/backend/i18n/lang/fa.yaml @@ -58,5 +58,6 @@ UpdatePortFirewallReload: "Reload firewall namovaffagh bud, {{ .err }}, lotfan f UserInfo: "Daryaft etela'at-e panel" UserInfoAddr: "Adres-e panel: " UserInfoPassHelp: "Nokte: baraye taghiri ramz, mitavanid dastur zir ra anjam dahid: " -SystemVersion: "Daryaft etela'at-e version system" DBConnErr: "Khatta: etesal be database namovaffagh bud, {{ .err }}" +SystemVersion: "noskhe: " +SystemMode: "halat: " diff --git a/backend/i18n/lang/pt.yaml b/backend/i18n/lang/pt.yaml index a4eae1f83..f42f9f515 100644 --- a/backend/i18n/lang/pt.yaml +++ b/backend/i18n/lang/pt.yaml @@ -58,5 +58,6 @@ UpdatePortFirewallReload: "Falha ao recarregar o firewall, {{ .err }}, recarregu UserInfo: "Obter informações do painel" UserInfoAddr: "Endereço do painel: " UserInfoPassHelp: "Dica: Para alterar a senha, execute o comando: " -SystemVersion: "Obter informações da versão do sistema" DBConnErr: "Erro: Falha ao inicializar conexão com o banco de dados, {{ .err }}" +SystemVersion: "versão: " +SystemMode: "modo: " \ No newline at end of file diff --git a/backend/i18n/lang/zh-Hant.yaml b/backend/i18n/lang/zh-Hant.yaml index c20a19f0a..1e4cf4af9 100644 --- a/backend/i18n/lang/zh-Hant.yaml +++ b/backend/i18n/lang/zh-Hant.yaml @@ -278,5 +278,6 @@ UpdatePortFirewallReload: "防火牆重載失敗,{{ .err }},請您手動重 UserInfo: "獲取面板信息" UserInfoAddr: "面板地址:" UserInfoPassHelp: "提示:修改密碼可執行命令:" -SystemVersion: "獲取系統版本信息" DBConnErr: "錯誤:初始化資料庫連接失敗,{{ .err }}" +SystemVersion: "版本:" +SystemMode: "模式:" diff --git a/backend/i18n/lang/zh.yaml b/backend/i18n/lang/zh.yaml index 7d152cbdc..72fabe4c7 100644 --- a/backend/i18n/lang/zh.yaml +++ b/backend/i18n/lang/zh.yaml @@ -278,5 +278,6 @@ UpdatePortFirewallReload: "防火墙重载失败,{{ .err }},请您手动重 UserInfo: "获取面板信息" UserInfoAddr: "面板地址:" UserInfoPassHelp: "提示:修改密码可执行命令:" -SystemVersion: "获取系统版本信息" DBConnErr: "错误:初始化数据库连接失败,{{ .err }}" +SystemVersion: "版本:" +SystemMode: "模式:" diff --git a/cmd/server/cmd/version.go b/cmd/server/cmd/version.go index daa89993e..3cb62178e 100644 --- a/cmd/server/cmd/version.go +++ b/cmd/server/cmd/version.go @@ -29,12 +29,12 @@ var versionCmd = &cobra.Command{ } version := getSettingByKey(db, "SystemVersion") - fmt.Printf("1panel version: %s\n", version) + fmt.Println(i18n.GetMsgByKeyForCmd("SystemVersion") + version) config := configs.ServerConfig{} if err := yaml.Unmarshal(conf.AppYaml, &config); err != nil { - return fmt.Errorf("unmarshal conf.App.Yaml failed, errL %v", err) + return fmt.Errorf("unmarshal conf.App.Yaml failed, err: %v", err) } else { - fmt.Printf("mode: %s\n", config.System.Mode) + fmt.Println(i18n.GetMsgByKeyForCmd("SystemMode") + config.System.Mode) } return nil },