콘텐츠 상세 - themeStr 언어별 번역 제공 기능 수정
This commit is contained in:
@@ -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(
|
return GetAudioContentDetailResponse(
|
||||||
contentId = audioContent.id!!,
|
contentId = audioContent.id!!,
|
||||||
title = audioContent.title,
|
title = audioContent.title,
|
||||||
@@ -835,7 +851,7 @@ class AudioContentService(
|
|||||||
languageCode = audioContent.languageCode,
|
languageCode = audioContent.languageCode,
|
||||||
coverImageUrl = "$coverImageHost/${audioContent.coverImage!!}",
|
coverImageUrl = "$coverImageHost/${audioContent.coverImage!!}",
|
||||||
contentUrl = audioContentUrl,
|
contentUrl = audioContentUrl,
|
||||||
themeStr = audioContent.theme!!.theme,
|
themeStr = themeStrTranslated,
|
||||||
tag = tag,
|
tag = tag,
|
||||||
price = audioContent.price,
|
price = audioContent.price,
|
||||||
duration = audioContent.duration ?: "",
|
duration = audioContent.duration ?: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user