관리자 콘텐츠 메시지 다국어 처리
This commit is contained in:
@@ -51,7 +51,9 @@ class AdminContentService(
|
|||||||
searchWord: String,
|
searchWord: String,
|
||||||
pageable: Pageable
|
pageable: Pageable
|
||||||
): GetAdminContentListResponse {
|
): GetAdminContentListResponse {
|
||||||
if (searchWord.length < 2) throw SodaException("2글자 이상 입력하세요.")
|
if (searchWord.length < 2) {
|
||||||
|
throw SodaException(messageKey = "admin.content.search_word_min_length")
|
||||||
|
}
|
||||||
val totalCount = repository.getAudioContentTotalCount(searchWord, status = status)
|
val totalCount = repository.getAudioContentTotalCount(searchWord, status = status)
|
||||||
val audioContentAndThemeList = repository.getAudioContentList(
|
val audioContentAndThemeList = repository.getAudioContentList(
|
||||||
status = status,
|
status = status,
|
||||||
@@ -82,7 +84,7 @@ class AdminContentService(
|
|||||||
@Transactional
|
@Transactional
|
||||||
fun updateAudioContent(request: UpdateAdminContentRequest) {
|
fun updateAudioContent(request: UpdateAdminContentRequest) {
|
||||||
val audioContent = repository.findByIdOrNull(id = request.id)
|
val audioContent = repository.findByIdOrNull(id = request.id)
|
||||||
?: throw SodaException("없는 콘텐츠 입니다.")
|
?: throw SodaException(messageKey = "admin.content.not_found")
|
||||||
|
|
||||||
if (request.isDefaultCoverImage) {
|
if (request.isDefaultCoverImage) {
|
||||||
audioContent.coverImage = "`profile/default_profile.png`"
|
audioContent.coverImage = "`profile/default_profile.png`"
|
||||||
|
|||||||
@@ -33,19 +33,19 @@ class AdminContentBannerService(
|
|||||||
fun createAudioContentMainBanner(image: MultipartFile, requestString: String) {
|
fun createAudioContentMainBanner(image: MultipartFile, requestString: String) {
|
||||||
val request = objectMapper.readValue(requestString, CreateContentBannerRequest::class.java)
|
val request = objectMapper.readValue(requestString, CreateContentBannerRequest::class.java)
|
||||||
if (request.type == AudioContentBannerType.CREATOR && request.creatorId == null) {
|
if (request.type == AudioContentBannerType.CREATOR && request.creatorId == null) {
|
||||||
throw SodaException("크리에이터를 선택하세요.")
|
throw SodaException(messageKey = "admin.content.banner.creator_required")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.type == AudioContentBannerType.SERIES && request.seriesId == null) {
|
if (request.type == AudioContentBannerType.SERIES && request.seriesId == null) {
|
||||||
throw SodaException("시리즈를 선택하세요.")
|
throw SodaException(messageKey = "admin.content.banner.series_required")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.type == AudioContentBannerType.LINK && request.link == null) {
|
if (request.type == AudioContentBannerType.LINK && request.link == null) {
|
||||||
throw SodaException("링크 url을 입력하세요.")
|
throw SodaException(messageKey = "admin.content.banner.link_required")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.type == AudioContentBannerType.EVENT && request.eventId == null) {
|
if (request.type == AudioContentBannerType.EVENT && request.eventId == null) {
|
||||||
throw SodaException("이벤트를 선택하세요.")
|
throw SodaException(messageKey = "admin.content.banner.event_required")
|
||||||
}
|
}
|
||||||
|
|
||||||
val event = if (request.eventId != null && request.eventId > 0) {
|
val event = if (request.eventId != null && request.eventId > 0) {
|
||||||
@@ -94,7 +94,7 @@ class AdminContentBannerService(
|
|||||||
fun updateAudioContentMainBanner(image: MultipartFile?, requestString: String) {
|
fun updateAudioContentMainBanner(image: MultipartFile?, requestString: String) {
|
||||||
val request = objectMapper.readValue(requestString, UpdateContentBannerRequest::class.java)
|
val request = objectMapper.readValue(requestString, UpdateContentBannerRequest::class.java)
|
||||||
val audioContentBanner = repository.findByIdOrNull(request.id)
|
val audioContentBanner = repository.findByIdOrNull(request.id)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
val fileName = generateFileName()
|
val fileName = generateFileName()
|
||||||
@@ -124,22 +124,22 @@ class AdminContentBannerService(
|
|||||||
AudioContentBannerType.EVENT -> {
|
AudioContentBannerType.EVENT -> {
|
||||||
if (request.eventId != null) {
|
if (request.eventId != null) {
|
||||||
val event = eventRepository.findByIdOrNull(request.eventId)
|
val event = eventRepository.findByIdOrNull(request.eventId)
|
||||||
?: throw SodaException("이벤트를 선택하세요.")
|
?: throw SodaException(messageKey = "admin.content.banner.event_required")
|
||||||
|
|
||||||
audioContentBanner.event = event
|
audioContentBanner.event = event
|
||||||
} else {
|
} else {
|
||||||
throw SodaException("이벤트를 선택하세요.")
|
throw SodaException(messageKey = "admin.content.banner.event_required")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioContentBannerType.CREATOR -> {
|
AudioContentBannerType.CREATOR -> {
|
||||||
if (request.creatorId != null) {
|
if (request.creatorId != null) {
|
||||||
val creator = memberRepository.findByIdOrNull(request.creatorId)
|
val creator = memberRepository.findByIdOrNull(request.creatorId)
|
||||||
?: throw SodaException("크리에이터를 선택하세요.")
|
?: throw SodaException(messageKey = "admin.content.banner.creator_required")
|
||||||
|
|
||||||
audioContentBanner.creator = creator
|
audioContentBanner.creator = creator
|
||||||
} else {
|
} else {
|
||||||
throw SodaException("크리에이터를 선택하세요.")
|
throw SodaException(messageKey = "admin.content.banner.creator_required")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,18 +147,18 @@ class AdminContentBannerService(
|
|||||||
if (request.link != null) {
|
if (request.link != null) {
|
||||||
audioContentBanner.link = request.link
|
audioContentBanner.link = request.link
|
||||||
} else {
|
} else {
|
||||||
throw SodaException("링크 url을 입력하세요.")
|
throw SodaException(messageKey = "admin.content.banner.link_required")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioContentBannerType.SERIES -> {
|
AudioContentBannerType.SERIES -> {
|
||||||
if (request.seriesId != null) {
|
if (request.seriesId != null) {
|
||||||
val series = seriesRepository.findByIdOrNull(request.seriesId)
|
val series = seriesRepository.findByIdOrNull(request.seriesId)
|
||||||
?: throw SodaException("시리즈를 선택하세요.")
|
?: throw SodaException(messageKey = "admin.content.banner.series_required")
|
||||||
|
|
||||||
audioContentBanner.series = series
|
audioContentBanner.series = series
|
||||||
} else {
|
} else {
|
||||||
throw SodaException("시리즈를 선택하세요.")
|
throw SodaException(messageKey = "admin.content.banner.series_required")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class AdminContentCurationService(
|
|||||||
@Transactional
|
@Transactional
|
||||||
fun createContentCuration(request: CreateContentCurationRequest) {
|
fun createContentCuration(request: CreateContentCurationRequest) {
|
||||||
val tab = contentMainTabRepository.findByIdOrNull(request.tabId)
|
val tab = contentMainTabRepository.findByIdOrNull(request.tabId)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
val curation = AudioContentCuration(
|
val curation = AudioContentCuration(
|
||||||
title = request.title,
|
title = request.title,
|
||||||
@@ -37,7 +37,7 @@ class AdminContentCurationService(
|
|||||||
@Transactional
|
@Transactional
|
||||||
fun updateContentCuration(request: UpdateContentCurationRequest) {
|
fun updateContentCuration(request: UpdateContentCurationRequest) {
|
||||||
val audioContentCuration = repository.findByIdOrNull(id = request.id)
|
val audioContentCuration = repository.findByIdOrNull(id = request.id)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
if (request.title != null) {
|
if (request.title != null) {
|
||||||
audioContentCuration.title = request.title
|
audioContentCuration.title = request.title
|
||||||
@@ -85,7 +85,7 @@ class AdminContentCurationService(
|
|||||||
|
|
||||||
fun getCurationItem(curationId: Long): List<GetCurationItemResponse> {
|
fun getCurationItem(curationId: Long): List<GetCurationItemResponse> {
|
||||||
val curation = repository.findByIdOrNull(curationId)
|
val curation = repository.findByIdOrNull(curationId)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
return if (curation.isSeries) {
|
return if (curation.isSeries) {
|
||||||
contentCurationItemRepository.getAudioContentCurationSeriesItemList(curationId)
|
contentCurationItemRepository.getAudioContentCurationSeriesItemList(curationId)
|
||||||
@@ -106,7 +106,7 @@ class AdminContentCurationService(
|
|||||||
fun addItemToCuration(request: AddItemToCurationRequest) {
|
fun addItemToCuration(request: AddItemToCurationRequest) {
|
||||||
// 큐레이션 조회
|
// 큐레이션 조회
|
||||||
val audioContentCuration = repository.findByIdOrNull(id = request.curationId)
|
val audioContentCuration = repository.findByIdOrNull(id = request.curationId)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
if (audioContentCuration.isSeries) {
|
if (audioContentCuration.isSeries) {
|
||||||
request.itemIdList.forEach { seriesId ->
|
request.itemIdList.forEach { seriesId ->
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class AdminHashTagCurationService(
|
|||||||
val isExists = repository.isExistsTag(tag = tag)
|
val isExists = repository.isExistsTag(tag = tag)
|
||||||
|
|
||||||
if (isExists) {
|
if (isExists) {
|
||||||
throw SodaException("이미 등록된 태그 입니다.")
|
throw SodaException(messageKey = "admin.content.hash_tag.already_registered")
|
||||||
}
|
}
|
||||||
|
|
||||||
repository.save(
|
repository.save(
|
||||||
@@ -42,7 +42,7 @@ class AdminHashTagCurationService(
|
|||||||
@Transactional
|
@Transactional
|
||||||
fun updateContentHashTagCuration(request: UpdateContentHashTagCurationRequest) {
|
fun updateContentHashTagCuration(request: UpdateContentHashTagCurationRequest) {
|
||||||
val hashTagCuration = repository.findByIdOrNull(id = request.id)
|
val hashTagCuration = repository.findByIdOrNull(id = request.id)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
if (request.tag != null) {
|
if (request.tag != null) {
|
||||||
var tag = request.tag.trim()
|
var tag = request.tag.trim()
|
||||||
@@ -88,7 +88,7 @@ class AdminHashTagCurationService(
|
|||||||
@Transactional
|
@Transactional
|
||||||
fun addItemToHashTagCuration(request: AddItemToCurationRequest) {
|
fun addItemToHashTagCuration(request: AddItemToCurationRequest) {
|
||||||
val curation = repository.findByIdOrNull(id = request.curationId)
|
val curation = repository.findByIdOrNull(id = request.curationId)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
request.itemIdList.forEach { contentId ->
|
request.itemIdList.forEach { contentId ->
|
||||||
val audioContent = audioContentRepository.findByIdAndActive(contentId)
|
val audioContent = audioContentRepository.findByIdAndActive(contentId)
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ class AdminContentSeriesService(
|
|||||||
@Transactional
|
@Transactional
|
||||||
fun modifySeries(request: AdminModifySeriesRequest) {
|
fun modifySeries(request: AdminModifySeriesRequest) {
|
||||||
val series = repository.findByIdAndActiveTrue(request.seriesId)
|
val series = repository.findByIdAndActiveTrue(request.seriesId)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
if (request.publishedDaysOfWeek != null) {
|
if (request.publishedDaysOfWeek != null) {
|
||||||
val days = request.publishedDaysOfWeek
|
val days = request.publishedDaysOfWeek
|
||||||
if (days.contains(SeriesPublishedDaysOfWeek.RANDOM) && days.size > 1) {
|
if (days.contains(SeriesPublishedDaysOfWeek.RANDOM) && days.size > 1) {
|
||||||
throw SodaException("랜덤과 연재요일 동시에 선택할 수 없습니다.")
|
throw SodaException(messageKey = "admin.content.series.random_days_conflict")
|
||||||
}
|
}
|
||||||
series.publishedDaysOfWeek.clear()
|
series.publishedDaysOfWeek.clear()
|
||||||
series.publishedDaysOfWeek.addAll(days)
|
series.publishedDaysOfWeek.addAll(days)
|
||||||
@@ -56,7 +56,7 @@ class AdminContentSeriesService(
|
|||||||
|
|
||||||
if (request.genreId != null) {
|
if (request.genreId != null) {
|
||||||
val genre = genreRepository.findActiveSeriesGenreById(request.genreId)
|
val genre = genreRepository.findActiveSeriesGenreById(request.genreId)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
series.genre = genre
|
series.genre = genre
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import kr.co.vividnext.sodalive.aws.s3.S3Uploader
|
|||||||
import kr.co.vividnext.sodalive.common.ApiResponse
|
import kr.co.vividnext.sodalive.common.ApiResponse
|
||||||
import kr.co.vividnext.sodalive.common.SodaException
|
import kr.co.vividnext.sodalive.common.SodaException
|
||||||
import kr.co.vividnext.sodalive.content.series.main.banner.ContentSeriesBannerService
|
import kr.co.vividnext.sodalive.content.series.main.banner.ContentSeriesBannerService
|
||||||
|
import kr.co.vividnext.sodalive.i18n.LangContext
|
||||||
|
import kr.co.vividnext.sodalive.i18n.SodaMessageSource
|
||||||
import kr.co.vividnext.sodalive.utils.generateFileName
|
import kr.co.vividnext.sodalive.utils.generateFileName
|
||||||
import org.springframework.beans.factory.annotation.Value
|
import org.springframework.beans.factory.annotation.Value
|
||||||
import org.springframework.data.domain.PageRequest
|
import org.springframework.data.domain.PageRequest
|
||||||
@@ -33,6 +35,8 @@ import org.springframework.web.multipart.MultipartFile
|
|||||||
class AdminContentSeriesBannerController(
|
class AdminContentSeriesBannerController(
|
||||||
private val bannerService: ContentSeriesBannerService,
|
private val bannerService: ContentSeriesBannerService,
|
||||||
private val s3Uploader: S3Uploader,
|
private val s3Uploader: S3Uploader,
|
||||||
|
private val langContext: LangContext,
|
||||||
|
private val messageSource: SodaMessageSource,
|
||||||
|
|
||||||
@Value("\${cloud.aws.s3.bucket}")
|
@Value("\${cloud.aws.s3.bucket}")
|
||||||
private val s3Bucket: String,
|
private val s3Bucket: String,
|
||||||
@@ -113,7 +117,8 @@ class AdminContentSeriesBannerController(
|
|||||||
@DeleteMapping("/{bannerId}")
|
@DeleteMapping("/{bannerId}")
|
||||||
fun deleteBanner(@PathVariable bannerId: Long) = run {
|
fun deleteBanner(@PathVariable bannerId: Long) = run {
|
||||||
bannerService.deleteBanner(bannerId)
|
bannerService.deleteBanner(bannerId)
|
||||||
ApiResponse.ok("배너가 성공적으로 삭제되었습니다.")
|
val message = messageSource.getMessage("admin.content.series.banner.delete_success", langContext.lang)
|
||||||
|
ApiResponse.ok(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -124,7 +129,8 @@ class AdminContentSeriesBannerController(
|
|||||||
@RequestBody request: UpdateBannerOrdersRequest
|
@RequestBody request: UpdateBannerOrdersRequest
|
||||||
) = run {
|
) = run {
|
||||||
bannerService.updateBannerOrders(request.ids)
|
bannerService.updateBannerOrders(request.ids)
|
||||||
ApiResponse.ok(null, "배너 정렬 순서가 성공적으로 변경되었습니다.")
|
val message = messageSource.getMessage("admin.content.series.banner.reorder_success", langContext.lang)
|
||||||
|
ApiResponse.ok(null, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun saveImage(bannerId: Long, image: MultipartFile): String {
|
private fun saveImage(bannerId: Long, image: MultipartFile): String {
|
||||||
@@ -139,7 +145,7 @@ class AdminContentSeriesBannerController(
|
|||||||
metadata = metadata
|
metadata = metadata
|
||||||
)
|
)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
throw SodaException("이미지 저장에 실패했습니다: ${e.message}")
|
throw SodaException(messageKey = "admin.content.series.banner.image_save_failed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ class AdminContentSeriesGenreService(private val repository: AdminContentSeriesG
|
|||||||
@Transactional
|
@Transactional
|
||||||
fun modifySeriesGenre(request: ModifySeriesGenreRequest) {
|
fun modifySeriesGenre(request: ModifySeriesGenreRequest) {
|
||||||
if (request.genre == null && request.isAdult == null && request.isActive == null) {
|
if (request.genre == null && request.isAdult == null && request.isActive == null) {
|
||||||
throw SodaException("변경사항이 없습니다.")
|
throw SodaException(messageKey = "admin.content.series.genre.no_changes")
|
||||||
}
|
}
|
||||||
|
|
||||||
val seriesGenre = repository.findByIdOrNull(id = request.id)
|
val seriesGenre = repository.findByIdOrNull(id = request.id)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
if (request.genre != null) {
|
if (request.genre != null) {
|
||||||
seriesGenre.genre = request.genre
|
seriesGenre.genre = request.genre
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class AdminRecommendSeriesService(
|
|||||||
fun createRecommendSeries(image: MultipartFile, requestString: String) {
|
fun createRecommendSeries(image: MultipartFile, requestString: String) {
|
||||||
val request = objectMapper.readValue(requestString, CreateRecommendSeriesRequest::class.java)
|
val request = objectMapper.readValue(requestString, CreateRecommendSeriesRequest::class.java)
|
||||||
val series = seriesRepository.findByIdOrNull(request.seriesId)
|
val series = seriesRepository.findByIdOrNull(request.seriesId)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
val recommendSeries = RecommendSeries(isFree = request.isFree)
|
val recommendSeries = RecommendSeries(isFree = request.isFree)
|
||||||
recommendSeries.series = series
|
recommendSeries.series = series
|
||||||
@@ -49,7 +49,7 @@ class AdminRecommendSeriesService(
|
|||||||
fun updateRecommendSeries(image: MultipartFile?, requestString: String) {
|
fun updateRecommendSeries(image: MultipartFile?, requestString: String) {
|
||||||
val request = objectMapper.readValue(requestString, UpdateRecommendSeriesRequest::class.java)
|
val request = objectMapper.readValue(requestString, UpdateRecommendSeriesRequest::class.java)
|
||||||
val recommendSeries = repository.findByIdOrNull(request.id)
|
val recommendSeries = repository.findByIdOrNull(request.id)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
val fileName = generateFileName()
|
val fileName = generateFileName()
|
||||||
|
|||||||
@@ -53,13 +53,15 @@ class AdminContentThemeService(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun themeExistCheck(request: CreateContentThemeRequest) {
|
fun themeExistCheck(request: CreateContentThemeRequest) {
|
||||||
repository.findIdByTheme(request.theme)?.let { throw SodaException("이미 등록된 테마 입니다.") }
|
repository.findIdByTheme(request.theme)?.let {
|
||||||
|
throw SodaException(messageKey = "admin.content.theme.already_registered")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
fun deleteTheme(id: Long) {
|
fun deleteTheme(id: Long) {
|
||||||
val theme = repository.findByIdOrNull(id)
|
val theme = repository.findByIdOrNull(id)
|
||||||
?: throw SodaException("잘못된 요청입니다.")
|
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||||
|
|
||||||
theme.theme = "${theme.theme}_deleted"
|
theme.theme = "${theme.theme}_deleted"
|
||||||
theme.isActive = false
|
theme.isActive = false
|
||||||
|
|||||||
@@ -303,6 +303,92 @@ class SodaMessageSource {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private val adminContentMessages = mapOf(
|
||||||
|
"admin.content.search_word_min_length" to mapOf(
|
||||||
|
Lang.KO to "2글자 이상 입력하세요.",
|
||||||
|
Lang.EN to "Please enter at least 2 characters.",
|
||||||
|
Lang.JA to "2文字以上入力してください。"
|
||||||
|
),
|
||||||
|
"admin.content.not_found" to mapOf(
|
||||||
|
Lang.KO to "없는 콘텐츠 입니다.",
|
||||||
|
Lang.EN to "Content not found.",
|
||||||
|
Lang.JA to "該当のコンテンツが見つかりません。"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val adminContentBannerMessages = mapOf(
|
||||||
|
"admin.content.banner.creator_required" to mapOf(
|
||||||
|
Lang.KO to "크리에이터를 선택하세요.",
|
||||||
|
Lang.EN to "Please select a creator.",
|
||||||
|
Lang.JA to "クリエイターを選択してください。"
|
||||||
|
),
|
||||||
|
"admin.content.banner.series_required" to mapOf(
|
||||||
|
Lang.KO to "시리즈를 선택하세요.",
|
||||||
|
Lang.EN to "Please select a series.",
|
||||||
|
Lang.JA to "シリーズを選択してください。"
|
||||||
|
),
|
||||||
|
"admin.content.banner.link_required" to mapOf(
|
||||||
|
Lang.KO to "링크 url을 입력하세요.",
|
||||||
|
Lang.EN to "Please enter a link URL.",
|
||||||
|
Lang.JA to "リンクURLを入力してください。"
|
||||||
|
),
|
||||||
|
"admin.content.banner.event_required" to mapOf(
|
||||||
|
Lang.KO to "이벤트를 선택하세요.",
|
||||||
|
Lang.EN to "Please select an event.",
|
||||||
|
Lang.JA to "イベントを選択してください。"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val adminHashTagCurationMessages = mapOf(
|
||||||
|
"admin.content.hash_tag.already_registered" to mapOf(
|
||||||
|
Lang.KO to "이미 등록된 태그 입니다.",
|
||||||
|
Lang.EN to "Tag already registered.",
|
||||||
|
Lang.JA to "既に登録されたタグです。"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val adminContentSeriesMessages = mapOf(
|
||||||
|
"admin.content.series.random_days_conflict" to mapOf(
|
||||||
|
Lang.KO to "랜덤과 연재요일 동시에 선택할 수 없습니다.",
|
||||||
|
Lang.EN to "Random and published days cannot be selected together.",
|
||||||
|
Lang.JA to "ランダムと連載曜日を同時に選択できません。"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val adminContentSeriesBannerMessages = mapOf(
|
||||||
|
"admin.content.series.banner.delete_success" to mapOf(
|
||||||
|
Lang.KO to "배너가 성공적으로 삭제되었습니다.",
|
||||||
|
Lang.EN to "Banner deleted successfully.",
|
||||||
|
Lang.JA to "バナーが削除されました。"
|
||||||
|
),
|
||||||
|
"admin.content.series.banner.reorder_success" to mapOf(
|
||||||
|
Lang.KO to "배너 정렬 순서가 성공적으로 변경되었습니다.",
|
||||||
|
Lang.EN to "Banner order updated successfully.",
|
||||||
|
Lang.JA to "バナーの並び順が変更されました。"
|
||||||
|
),
|
||||||
|
"admin.content.series.banner.image_save_failed" to mapOf(
|
||||||
|
Lang.KO to "이미지 저장에 실패했습니다.",
|
||||||
|
Lang.EN to "Failed to save image.",
|
||||||
|
Lang.JA to "画像の保存に失敗しました。"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val adminContentSeriesGenreMessages = mapOf(
|
||||||
|
"admin.content.series.genre.no_changes" to mapOf(
|
||||||
|
Lang.KO to "변경사항이 없습니다.",
|
||||||
|
Lang.EN to "No changes to update.",
|
||||||
|
Lang.JA to "変更事項がありません。"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val adminContentThemeMessages = mapOf(
|
||||||
|
"admin.content.theme.already_registered" to mapOf(
|
||||||
|
Lang.KO to "이미 등록된 테마 입니다.",
|
||||||
|
Lang.EN to "Theme already registered.",
|
||||||
|
Lang.JA to "既に登録されたテーマです。"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
fun getMessage(key: String, lang: Lang): String? {
|
fun getMessage(key: String, lang: Lang): String? {
|
||||||
val messageGroups = listOf(
|
val messageGroups = listOf(
|
||||||
commonMessages,
|
commonMessages,
|
||||||
@@ -317,7 +403,14 @@ class SodaMessageSource {
|
|||||||
adminChatCharacterMessages,
|
adminChatCharacterMessages,
|
||||||
adminChatCurationMessages,
|
adminChatCurationMessages,
|
||||||
adminChatCharacterImageMessages,
|
adminChatCharacterImageMessages,
|
||||||
adminChatOriginalWorkMessages
|
adminChatOriginalWorkMessages,
|
||||||
|
adminContentMessages,
|
||||||
|
adminContentBannerMessages,
|
||||||
|
adminHashTagCurationMessages,
|
||||||
|
adminContentSeriesMessages,
|
||||||
|
adminContentSeriesBannerMessages,
|
||||||
|
adminContentSeriesGenreMessages,
|
||||||
|
adminContentThemeMessages
|
||||||
)
|
)
|
||||||
for (messages in messageGroups) {
|
for (messages in messageGroups) {
|
||||||
val translations = messages[key] ?: continue
|
val translations = messages[key] ?: continue
|
||||||
|
|||||||
Reference in New Issue
Block a user