diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt index e443568..7bbacb6 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt @@ -828,6 +828,22 @@ class AudioContentService( } } + /** + * themeStr 번역 처리 + */ + val themeStrTranslated = run { + val theme = audioContent.theme + if (theme?.id != null) { + val locale = langContext.lang.code + val translated = contentThemeTranslationRepository + .findByContentThemeIdAndLocale(theme.id!!, locale) + val text = translated?.theme + if (!text.isNullOrBlank()) text else theme.theme + } else { + audioContent.theme!!.theme + } + } + return GetAudioContentDetailResponse( contentId = audioContent.id!!, title = audioContent.title, @@ -835,7 +851,7 @@ class AudioContentService( languageCode = audioContent.languageCode, coverImageUrl = "$coverImageHost/${audioContent.coverImage!!}", contentUrl = audioContentUrl, - themeStr = audioContent.theme!!.theme, + themeStr = themeStrTranslated, tag = tag, price = audioContent.price, duration = audioContent.duration ?: "",