1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-02-12 19:40:06 +08:00

fix: Fixed the issue where application labels were not displayed after updating. (#7834)

This commit is contained in:
zhengkunwang 2025-02-10 11:17:24 +08:00 committed by GitHub
parent 89f969ec6e
commit ab932ae154
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,8 +129,14 @@ func (a AppService) GetAppTags(ctx *gin.Context) ([]response.TagDTO, error) {
}
var translations = make(map[string]string)
_ = json.Unmarshal([]byte(tag.Translations), &translations)
if name, ok := translations[lang]; ok {
if name, ok := translations[lang]; ok && name != "" {
tagDTO.Name = name
} else {
if lang == "zh" || lang == "zh-Hant" {
tagDTO.Name = tag.Name
} else {
tagDTO.Name = tag.Key
}
}
res = append(res, tagDTO)
}