From f3d85d1309ded2d7daca3212f6cae0750d05f5a1 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 18 Feb 2025 14:17:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Fixed=20the=20issue=20where=20local=20ap?= =?UTF-8?q?plication=20descriptions=20were=20not=20di=E2=80=A6=20(#7896)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs https://github.com/1Panel-dev/1Panel/issues/7886 --- backend/app/dto/app.go | 4 ++-- backend/app/service/app_utils.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/app/dto/app.go b/backend/app/dto/app.go index 8175754a8..c91713e8e 100644 --- a/backend/app/dto/app.go +++ b/backend/app/dto/app.go @@ -78,8 +78,8 @@ type AppProperty struct { Name string `json:"name"` Type string `json:"type"` Tags []string `json:"tags"` - ShortDescZh string `json:"shortDescZh"` - ShortDescEn string `json:"shortDescEn"` + ShortDescZh string `json:"shortDescZh" yaml:"shortDescZh"` + ShortDescEn string `json:"shortDescEn" yaml:"shortDescEn"` Description Locale `json:"description"` Key string `json:"key"` Required []string `json:"Required"` diff --git a/backend/app/service/app_utils.go b/backend/app/service/app_utils.go index a791c20bf..81c6ca215 100644 --- a/backend/app/service/app_utils.go +++ b/backend/app/service/app_utils.go @@ -1163,12 +1163,11 @@ func handleLocalApp(appDir string) (app *model.App, err error) { app.Website = appDefine.Website app.Github = appDefine.Github app.Document = appDefine.Document - if appDefine.ShortDescZh != "" { - appDefine.Description.Zh = appDefine.ShortDescZh + app.ShortDescZh = appDefine.ShortDescZh } if appDefine.ShortDescEn != "" { - appDefine.Description.En = appDefine.ShortDescEn + app.ShortDescEn = appDefine.ShortDescEn } desc, _ := json.Marshal(appDefine.Description) app.Description = string(desc)