From 5adfecf689763290f92f1ba5c602040f634eb443 Mon Sep 17 00:00:00 2001 From: klaus Date: Wed, 21 Jan 2026 16:39:36 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20-=20=EB=8B=A4=EA=B5=AD=EC=96=B4=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=8B=9C=20=EB=82=A0=EC=A7=9C=20=ED=8F=AC=EB=A7=B7?= =?UTF-8?q?=EC=9D=B4=20=EC=84=9E=EC=9D=B4=EB=8A=94=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 앱 내 설정 언어와 디바이스 언어가 다를 때 날짜 포맷에 여러 언어가 섞여서 표시되는 문제를 해결하기 위해 앱 설정 언어를 명시적으로 적용하도록 수정. 래핑된 컨텍스트를 사용하여 리소스를 가져오고 날짜 변환 시에도 해당 로케일을 전달하도록 개선. --- .../live/room/detail/LiveRoomDetailFragment.kt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/live/room/detail/LiveRoomDetailFragment.kt b/app/src/main/java/kr/co/vividnext/sodalive/live/room/detail/LiveRoomDetailFragment.kt index e356a8a0..596b3536 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/live/room/detail/LiveRoomDetailFragment.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/live/room/detail/LiveRoomDetailFragment.kt @@ -28,7 +28,10 @@ import kr.co.vividnext.sodalive.databinding.ItemLiveDetailUserSummaryBinding import kr.co.vividnext.sodalive.explorer.profile.UserProfileActivity import kr.co.vividnext.sodalive.extensions.convertDateFormat import kr.co.vividnext.sodalive.extensions.dpToPx +import kr.co.vividnext.sodalive.settings.language.LanguageManager +import kr.co.vividnext.sodalive.settings.language.LocaleHelper import org.koin.android.ext.android.inject +import java.util.Locale import java.util.TimeZone class LiveRoomDetailFragment( @@ -116,6 +119,9 @@ class LiveRoomDetailFragment( @SuppressLint("SetTextI18n", "NotifyDataSetChanged") private fun setRoomDetail(response: GetRoomDetailResponse) { + val locale = Locale(LanguageManager.getEffectiveLanguage(requireContext())) + val wrappedContext = LocaleHelper.wrap(requireContext()) + binding.tv19.visibility = if (response.isAdult) { View.VISIBLE } else { @@ -125,7 +131,8 @@ class LiveRoomDetailFragment( binding.tvTitle.text = response.title binding.tvDate.text = response.beginDateTimeUtc.convertDateFormat( from = "yyyy-MM-dd'T'HH:mm:ss", - to = getString(R.string.screen_live_room_detail_date_format), + to = wrappedContext.getString(R.string.screen_live_room_detail_date_format), + outputLocale = locale, inputTimeZone = TimeZone.getTimeZone("UTC") ) @@ -138,7 +145,7 @@ class LiveRoomDetailFragment( 0 ) } else { - binding.tvCan.text = getString(R.string.screen_live_room_free) + binding.tvCan.text = wrappedContext.getString(R.string.screen_live_room_free) binding.tvCan.setCompoundDrawablesWithIntrinsicBounds( 0, 0, @@ -226,7 +233,7 @@ class LiveRoomDetailFragment( binding.rvParticipate.visibility = View.VISIBLE binding.tvParticipateExpression.visibility = View.VISIBLE binding.tvOpenAllProfile.text = - getString(R.string.screen_live_room_collapse) + wrappedContext.getString(R.string.screen_live_room_collapse) binding.tvOpenAllProfile.setCompoundDrawablesWithIntrinsicBounds( R.drawable.ic_live_detail_top, 0, @@ -238,7 +245,7 @@ class LiveRoomDetailFragment( binding.rvParticipate.visibility = View.GONE binding.tvParticipateExpression.visibility = View.GONE binding.tvOpenAllProfile.text = - getString(R.string.screen_live_room_expand) + wrappedContext.getString(R.string.screen_live_room_expand) binding.tvOpenAllProfile.setCompoundDrawablesWithIntrinsicBounds( R.drawable.ic_live_detail_bottom, 0, @@ -351,6 +358,7 @@ class LiveRoomDetailFragment( } private fun shareRoom(response: GetRoomDetailResponse) { + val wrappedContext = LocaleHelper.wrap(requireContext()) viewModel.shareRoomLink( response.roomId, response.isPrivateRoom, @@ -362,7 +370,7 @@ class LiveRoomDetailFragment( val shareIntent = Intent.createChooser( intent, - getString(R.string.screen_live_room_share_title) + wrappedContext.getString(R.string.screen_live_room_share_title) ) startActivity(shareIntent) }