콘텐츠 상세 - themeStr 언어별 번역 제공 기능 수정

This commit is contained in:
2025-12-15 12:25:10 +09:00
parent dc0df81232
commit 45ee55028f

View File

@@ -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 ?: "",