Skip to content

Commit ab932ae

Browse files
fix: Fixed the issue where application labels were not displayed after updating. (#7834)
1 parent 89f969e commit ab932ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

backend/app/service/app.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,14 @@ func (a AppService) GetAppTags(ctx *gin.Context) ([]response.TagDTO, error) {
129129
}
130130
var translations = make(map[string]string)
131131
_ = json.Unmarshal([]byte(tag.Translations), &translations)
132-
if name, ok := translations[lang]; ok {
132+
if name, ok := translations[lang]; ok && name != "" {
133133
tagDTO.Name = name
134+
} else {
135+
if lang == "zh" || lang == "zh-Hant" {
136+
tagDTO.Name = tag.Name
137+
} else {
138+
tagDTO.Name = tag.Key
139+
}
134140
}
135141
res = append(res, tagDTO)
136142
}

0 commit comments

Comments
 (0)