fix: fix issue with blank description (#8617)

This commit is contained in:
CityFun 2025-05-13 16:16:04 +08:00 committed by GitHub
parent 8a9f70851b
commit 788e7e6261
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,8 +66,11 @@ func (i *App) GetDescription(ctx *gin.Context) string {
if desc, ok := translations[lang]; ok && desc != "" {
return desc
}
if lang == "zh" {
if lang == "zh" && i.ShortDescZh != "" {
return i.ShortDescZh
}
if desc, ok := translations["en"]; ok && desc != "" {
return desc
}
return i.ShortDescEn
}