라이브룸 상세/태그 다이얼로그 문자열 리소스화

This commit is contained in:
2025-12-02 18:58:18 +09:00
parent 6bd63fc751
commit af04ff9bf7
9 changed files with 101 additions and 24 deletions

View File

@@ -17,6 +17,7 @@ import com.orhanobut.logger.Logger
import kr.co.vividnext.sodalive.BuildConfig import kr.co.vividnext.sodalive.BuildConfig
import kr.co.vividnext.sodalive.common.ImageLoaderProvider import kr.co.vividnext.sodalive.common.ImageLoaderProvider
import kr.co.vividnext.sodalive.common.SharedPreferenceManager import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
import kr.co.vividnext.sodalive.di.AppDI import kr.co.vividnext.sodalive.di.AppDI
import kr.co.vividnext.sodalive.tracking.FirebaseTracking import kr.co.vividnext.sodalive.tracking.FirebaseTracking
import tech.notifly.Notifly import tech.notifly.Notifly
@@ -36,6 +37,7 @@ class SodaLiveApp : Application(), DefaultLifecycleObserver {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
SodaLiveApplicationHolder.init(this)
SharedPreferenceManager.init(applicationContext) SharedPreferenceManager.init(applicationContext)
ImageLoaderProvider.init(applicationContext) ImageLoaderProvider.init(applicationContext)

View File

@@ -0,0 +1,13 @@
package kr.co.vividnext.sodalive.common
import android.app.Application
object SodaLiveApplicationHolder {
private lateinit var application: Application
fun init(app: Application) {
application = app
}
fun get(): Application = application
}

View File

@@ -138,7 +138,7 @@ class LiveRoomDetailFragment(
0 0
) )
} else { } else {
binding.tvCan.text = "무료" binding.tvCan.text = getString(R.string.screen_live_room_free)
binding.tvCan.setCompoundDrawablesWithIntrinsicBounds( binding.tvCan.setCompoundDrawablesWithIntrinsicBounds(
0, 0,
0, 0,
@@ -156,7 +156,7 @@ class LiveRoomDetailFragment(
binding.ivShare2.setOnClickListener { shareRoom(response) } binding.ivShare2.setOnClickListener { shareRoom(response) }
if (response.channelName.isNullOrBlank()) { if (response.channelName.isNullOrBlank()) {
binding.tvParticipateExpression.text = "예약자" binding.tvParticipateExpression.setText(R.string.live_reservation_complete)
when { when {
response.manager.id == SharedPreferenceManager.userId -> { response.manager.id == SharedPreferenceManager.userId -> {
binding.llStartDelete.visibility = View.VISIBLE binding.llStartDelete.visibility = View.VISIBLE
@@ -225,7 +225,8 @@ class LiveRoomDetailFragment(
binding.llProfiles.visibility = View.GONE binding.llProfiles.visibility = View.GONE
binding.rvParticipate.visibility = View.VISIBLE binding.rvParticipate.visibility = View.VISIBLE
binding.tvParticipateExpression.visibility = View.VISIBLE binding.tvParticipateExpression.visibility = View.VISIBLE
binding.tvOpenAllProfile.text = "닫기" binding.tvOpenAllProfile.text =
getString(R.string.screen_live_room_collapse)
binding.tvOpenAllProfile.setCompoundDrawablesWithIntrinsicBounds( binding.tvOpenAllProfile.setCompoundDrawablesWithIntrinsicBounds(
R.drawable.ic_live_detail_top, R.drawable.ic_live_detail_top,
0, 0,
@@ -236,7 +237,8 @@ class LiveRoomDetailFragment(
binding.llProfiles.visibility = View.VISIBLE binding.llProfiles.visibility = View.VISIBLE
binding.rvParticipate.visibility = View.GONE binding.rvParticipate.visibility = View.GONE
binding.tvParticipateExpression.visibility = View.GONE binding.tvParticipateExpression.visibility = View.GONE
binding.tvOpenAllProfile.text = "펼쳐보기" binding.tvOpenAllProfile.text =
getString(R.string.screen_live_room_expand)
binding.tvOpenAllProfile.setCompoundDrawablesWithIntrinsicBounds( binding.tvOpenAllProfile.setCompoundDrawablesWithIntrinsicBounds(
R.drawable.ic_live_detail_bottom, R.drawable.ic_live_detail_bottom,
0, 0,
@@ -358,7 +360,10 @@ class LiveRoomDetailFragment(
intent.type = "text/plain" intent.type = "text/plain"
intent.putExtra(Intent.EXTRA_TEXT, it) intent.putExtra(Intent.EXTRA_TEXT, it)
val shareIntent = Intent.createChooser(intent, "라이브 공유") val shareIntent = Intent.createChooser(
intent,
getString(R.string.screen_live_room_share_title)
)
startActivity(shareIntent) startActivity(shareIntent)
} }
} }

View File

@@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData
import com.orhanobut.logger.Logger import com.orhanobut.logger.Logger
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.schedulers.Schedulers import io.reactivex.rxjava3.schedulers.Schedulers
import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.base.BaseViewModel
import kr.co.vividnext.sodalive.common.SharedPreferenceManager import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
import kr.co.vividnext.sodalive.common.Utils import kr.co.vividnext.sodalive.common.Utils
import kr.co.vividnext.sodalive.live.LiveRepository import kr.co.vividnext.sodalive.live.LiveRepository
@@ -42,7 +44,8 @@ class LiveRoomDetailViewModel(private val repository: LiveRepository) : BaseView
_toastLiveData.postValue(it.message) _toastLiveData.postValue(it.message)
} else { } else {
_toastLiveData.postValue( _toastLiveData.postValue(
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." SodaLiveApplicationHolder.get()
.getString(R.string.screen_live_room_unknown_error)
) )
} }
onFailure() onFailure()
@@ -51,7 +54,10 @@ class LiveRoomDetailViewModel(private val repository: LiveRepository) : BaseView
{ {
_isLoading.value = false _isLoading.value = false
it.message?.let { message -> Logger.e(message) } it.message?.let { message -> Logger.e(message) }
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") _toastLiveData.postValue(
SodaLiveApplicationHolder.get()
.getString(R.string.screen_live_room_unknown_error)
)
onFailure() onFailure()
} }
) )

View File

@@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData
import com.orhanobut.logger.Logger import com.orhanobut.logger.Logger
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.schedulers.Schedulers import io.reactivex.rxjava3.schedulers.Schedulers
import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.base.BaseViewModel
import kr.co.vividnext.sodalive.common.SharedPreferenceManager import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
class LiveTagViewModel(private val repository: LiveTagRepository) : BaseViewModel() { class LiveTagViewModel(private val repository: LiveTagRepository) : BaseViewModel() {
private val _toastLiveData = MutableLiveData<String?>() private val _toastLiveData = MutableLiveData<String?>()
@@ -31,14 +33,18 @@ class LiveTagViewModel(private val repository: LiveTagRepository) : BaseViewMode
_toastLiveData.postValue(it.message) _toastLiveData.postValue(it.message)
} else { } else {
_toastLiveData.postValue( _toastLiveData.postValue(
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." SodaLiveApplicationHolder.get()
.getString(R.string.screen_live_room_unknown_error)
) )
} }
} }
}, },
{ {
it.message?.let { message -> Logger.e(message) } it.message?.let { message -> Logger.e(message) }
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") _toastLiveData.postValue(
SodaLiveApplicationHolder.get()
.getString(R.string.screen_live_room_unknown_error)
)
} }
) )
) )

View File

@@ -120,7 +120,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:fontFamily="@font/gmarket_sans_medium" android:fontFamily="@font/gmarket_sans_medium"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="참여자" android:text="@string/screen_live_room_participant_label"
android:textColor="@color/color_eeeeee" android:textColor="@color/color_eeeeee"
android:textSize="12sp" android:textSize="12sp"
android:visibility="gone" /> android:visibility="gone" />
@@ -181,7 +181,7 @@
android:drawablePadding="6.7dp" android:drawablePadding="6.7dp"
android:fontFamily="@font/gmarket_sans_medium" android:fontFamily="@font/gmarket_sans_medium"
android:gravity="center" android:gravity="center"
android:text="펼쳐보기" android:text="@string/screen_live_room_expand"
android:textColor="@color/color_bbbbbb" android:textColor="@color/color_bbbbbb"
android:textSize="12sp" android:textSize="12sp"
app:drawableStartCompat="@drawable/ic_live_detail_bottom" /> app:drawableStartCompat="@drawable/ic_live_detail_bottom" />
@@ -294,7 +294,7 @@
android:fontFamily="@font/gmarket_sans_medium" android:fontFamily="@font/gmarket_sans_medium"
android:paddingHorizontal="8.7dp" android:paddingHorizontal="8.7dp"
android:paddingVertical="10dp" android:paddingVertical="10dp"
android:text="채널보기" android:text="@string/screen_live_room_channel"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="12sp" android:textSize="12sp"
app:drawableStartCompat="@drawable/ic_thumb_play" /> app:drawableStartCompat="@drawable/ic_thumb_play" />
@@ -374,7 +374,7 @@
android:fontFamily="@font/gmarket_sans_bold" android:fontFamily="@font/gmarket_sans_bold"
android:gravity="center" android:gravity="center"
android:paddingVertical="16dp" android:paddingVertical="16dp"
android:text="수정" android:text="@string/screen_live_room_modify"
android:textColor="@color/color_3bb9f1" android:textColor="@color/color_3bb9f1"
android:textSize="18.3sp" /> android:textSize="18.3sp" />
@@ -388,7 +388,7 @@
android:fontFamily="@font/gmarket_sans_bold" android:fontFamily="@font/gmarket_sans_bold"
android:gravity="center" android:gravity="center"
android:paddingVertical="16dp" android:paddingVertical="16dp"
android:text="시작하기" android:text="@string/screen_live_room_start"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="18.3sp" /> android:textSize="18.3sp" />
</LinearLayout> </LinearLayout>
@@ -403,7 +403,7 @@
android:fontFamily="@font/gmarket_sans_medium" android:fontFamily="@font/gmarket_sans_medium"
android:gravity="center" android:gravity="center"
android:padding="5.3dp" android:padding="5.3dp"
android:text="예약삭제" android:text="@string/screen_live_room_cancel_reservation"
android:textColor="@color/color_ff5c49" android:textColor="@color/color_ff5c49"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@@ -433,7 +433,7 @@
android:fontFamily="@font/gmarket_sans_bold" android:fontFamily="@font/gmarket_sans_bold"
android:gravity="center" android:gravity="center"
android:paddingVertical="16dp" android:paddingVertical="16dp"
android:text="예약완료" android:text="@string/screen_live_room_reservation_done"
android:textColor="@color/color_777777" android:textColor="@color/color_777777"
android:textSize="18.3sp" android:textSize="18.3sp"
android:visibility="gone" /> android:visibility="gone" />
@@ -447,7 +447,7 @@
android:fontFamily="@font/gmarket_sans_bold" android:fontFamily="@font/gmarket_sans_bold"
android:gravity="center" android:gravity="center"
android:paddingVertical="16dp" android:paddingVertical="16dp"
android:text="예약하기" android:text="@string/screen_live_room_reserve"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="18.3sp" android:textSize="18.3sp"
android:visibility="gone" /> android:visibility="gone" />
@@ -461,7 +461,7 @@
android:fontFamily="@font/gmarket_sans_bold" android:fontFamily="@font/gmarket_sans_bold"
android:gravity="center" android:gravity="center"
android:paddingVertical="16dp" android:paddingVertical="16dp"
android:text="지금 참여하기" android:text="@string/screen_live_room_join_now"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="18.3sp" android:textSize="18.3sp"
android:visibility="gone" /> android:visibility="gone" />

View File

@@ -414,6 +414,21 @@
<string name="screen_live_room_donation_message_hint">Enter a message to send (up to 1000 chars)</string> <string name="screen_live_room_donation_message_hint">Enter a message to send (up to 1000 chars)</string>
<string name="screen_live_room_secret_mission_input_min">Enter 10 or more cans</string> <string name="screen_live_room_secret_mission_input_min">Enter 10 or more cans</string>
<string name="screen_live_room_donation_input_min">Enter at least 1 can</string> <string name="screen_live_room_donation_input_min">Enter at least 1 can</string>
<string name="screen_live_room_free">Free</string>
<string name="screen_live_room_participant_label">Participants</string>
<string name="screen_live_room_expand">Show more</string>
<string name="screen_live_room_collapse">Hide</string>
<string name="screen_live_room_channel">View channel</string>
<string name="screen_live_room_modify">Edit</string>
<string name="screen_live_room_start">Start</string>
<string name="screen_live_room_cancel_reservation">Cancel reservation</string>
<string name="screen_live_room_reservation_done">Reserved</string>
<string name="screen_live_room_reserve">Reserve</string>
<string name="screen_live_room_join_now">Join now</string>
<string name="screen_live_tag_title">Select interests</string>
<string name="screen_live_tag_subtitle">You can select up to 3.</string>
<string name="screen_live_tag_confirm">Confirm</string>
<string name="screen_live_room_unknown_error">An unknown error occurred. Please try again.</string>
<string name="screen_my_notice_more">Details</string> <string name="screen_my_notice_more">Details</string>
<string name="screen_my_login">Login</string> <string name="screen_my_login">Login</string>
<string name="screen_my_edit_profile">Edit profile</string> <string name="screen_my_edit_profile">Edit profile</string>

View File

@@ -357,7 +357,6 @@
<string name="screen_live_room_copy_history">支援履歴をコピーしました。</string> <string name="screen_live_room_copy_history">支援履歴をコピーしました。</string>
<string name="screen_live_room_info_updated">ライブ情報を修正しました。</string> <string name="screen_live_room_info_updated">ライブ情報を修正しました。</string>
<string name="screen_live_room_quit">ライブ終了</string> <string name="screen_live_room_quit">ライブ終了</string>
<string name="screen_live_room_share_title">ライブを共有</string>
<string name="screen_live_room_end_title">ライブ終了</string> <string name="screen_live_room_end_title">ライブ終了</string>
<string name="screen_live_room_end_message">ライブを終了しますか?\n終了するとチャット内容は保存されず消えます。\n参加者もライブ終了とともに\n強制退出されます。</string> <string name="screen_live_room_end_message">ライブを終了しますか?\n終了するとチャット内容は保存されず消えます。\n参加者もライブ終了とともに\n強制退出されます。</string>
<string name="screen_live_room_exit_title">ライブ退出</string> <string name="screen_live_room_exit_title">ライブ退出</string>
@@ -414,6 +413,22 @@
<string name="screen_live_room_donation_message_hint">一緒に送るメッセージを入力最大1000文字</string> <string name="screen_live_room_donation_message_hint">一緒に送るメッセージを入力最大1000文字</string>
<string name="screen_live_room_secret_mission_input_min">10CAN以上を入力してください</string> <string name="screen_live_room_secret_mission_input_min">10CAN以上を入力してください</string>
<string name="screen_live_room_donation_input_min">1CAN以上を入力してください</string> <string name="screen_live_room_donation_input_min">1CAN以上を入力してください</string>
<string name="screen_live_room_free">無料</string>
<string name="screen_live_room_participant_label">参加者</string>
<string name="screen_live_room_expand">もっと見る</string>
<string name="screen_live_room_collapse">閉じる</string>
<string name="screen_live_room_channel">チャンネルを見る</string>
<string name="screen_live_room_modify">修正</string>
<string name="screen_live_room_start">開始</string>
<string name="screen_live_room_cancel_reservation">予約削除</string>
<string name="screen_live_room_reservation_done">予約完了</string>
<string name="screen_live_room_reserve">予約する</string>
<string name="screen_live_room_join_now">今すぐ参加</string>
<string name="screen_live_room_share_title">ライブ共有</string>
<string name="screen_live_tag_title">関心事を選択</string>
<string name="screen_live_tag_subtitle">最大3つまで選択できます。</string>
<string name="screen_live_tag_confirm">確認</string>
<string name="screen_live_room_unknown_error">不明なエラーが発生しました。もう一度お試しください。</string>
<string name="screen_my_notice_more">詳細</string> <string name="screen_my_notice_more">詳細</string>
<string name="screen_my_login">ログイン</string> <string name="screen_my_login">ログイン</string>
<string name="screen_my_edit_profile">プロフィール編集</string> <string name="screen_my_edit_profile">プロフィール編集</string>

View File

@@ -413,6 +413,21 @@
<string name="screen_live_room_donation_message_hint">함께 보낼 메시지 입력(최대 1000자)</string> <string name="screen_live_room_donation_message_hint">함께 보낼 메시지 입력(최대 1000자)</string>
<string name="screen_live_room_secret_mission_input_min">10캔 이상 입력하세요</string> <string name="screen_live_room_secret_mission_input_min">10캔 이상 입력하세요</string>
<string name="screen_live_room_donation_input_min">1캔 이상 입력하세요</string> <string name="screen_live_room_donation_input_min">1캔 이상 입력하세요</string>
<string name="screen_live_room_free">무료</string>
<string name="screen_live_room_participant_label">참여자</string>
<string name="screen_live_room_expand">펼쳐보기</string>
<string name="screen_live_room_collapse">닫기</string>
<string name="screen_live_room_channel">채널보기</string>
<string name="screen_live_room_modify">수정</string>
<string name="screen_live_room_start">시작하기</string>
<string name="screen_live_room_cancel_reservation">예약삭제</string>
<string name="screen_live_room_reservation_done">예약완료</string>
<string name="screen_live_room_reserve">예약하기</string>
<string name="screen_live_room_join_now">지금 참여하기</string>
<string name="screen_live_tag_title">관심사 선택</string>
<string name="screen_live_tag_subtitle">최대 3개까지 선택 가능합니다.</string>
<string name="screen_live_tag_confirm">확인</string>
<string name="screen_live_room_unknown_error">알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.</string>
<string name="screen_my_notice_more">자세히</string> <string name="screen_my_notice_more">자세히</string>
<string name="screen_my_login">LOGIN</string> <string name="screen_my_login">LOGIN</string>
<string name="screen_my_edit_profile">프로필 수정</string> <string name="screen_my_edit_profile">프로필 수정</string>