diff --git a/app/src/main/java/kr/co/vividnext/sodalive/audio_content/AudioContentRepository.kt b/app/src/main/java/kr/co/vividnext/sodalive/audio_content/AudioContentRepository.kt index 411f24eb..3128abf8 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/audio_content/AudioContentRepository.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/audio_content/AudioContentRepository.kt @@ -1,11 +1,13 @@ package kr.co.vividnext.sodalive.audio_content +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.audio_content.category.CategoryApi import kr.co.vividnext.sodalive.audio_content.detail.PutAudioContentLikeRequest import kr.co.vividnext.sodalive.audio_content.donation.AudioContentDonationRequest import kr.co.vividnext.sodalive.audio_content.order.OrderRequest import kr.co.vividnext.sodalive.audio_content.order.OrderType import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.settings.ContentType import okhttp3.MultipartBody import okhttp3.RequestBody @@ -153,7 +155,8 @@ class AudioContentRepository( fun getContentRanking( page: Int, size: Int, - sortType: String = "매출", + sortType: String = SodaLiveApplicationHolder.get() + .getString(R.string.screen_home_sort_revenue), token: String ) = api.getContentRanking( page = page - 1, diff --git a/app/src/main/java/kr/co/vividnext/sodalive/audio_content/all/AudioContentRankingAllViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/audio_content/all/AudioContentRankingAllViewModel.kt index 173af567..7ccb3cdd 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/audio_content/all/AudioContentRankingAllViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/audio_content/all/AudioContentRankingAllViewModel.kt @@ -5,12 +5,12 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.audio_content.AudioContentRepository import kr.co.vividnext.sodalive.audio_content.main.GetAudioContentRankingItem import kr.co.vividnext.sodalive.base.BaseViewModel -import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.common.SharedPreferenceManager -import kr.co.vividnext.sodalive.R +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder class AudioContentRankingAllViewModel( private val repository: AudioContentRepository @@ -39,12 +39,14 @@ class AudioContentRankingAllViewModel( private var pageSize = 10 private var isLast = false - private var selectedSort = "매출" + private var selectedSort = + SodaLiveApplicationHolder.get().getString(R.string.screen_home_sort_revenue) fun getAudioContentRanking() { if (!_isLoading.value!! && !isLast && page <= 5) { _isLoading.value = true - val unknownError = SodaLiveApplicationHolder.get().getString(R.string.common_error_unknown) + val unknownError = + SodaLiveApplicationHolder.get().getString(R.string.common_error_unknown) compositeDisposable.add( repository.getContentRanking( page = page, diff --git a/app/src/main/java/kr/co/vividnext/sodalive/audio_content/detail/AudioContentDetailActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/audio_content/detail/AudioContentDetailActivity.kt index b629fa62..2a62b086 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/audio_content/detail/AudioContentDetailActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/audio_content/detail/AudioContentDetailActivity.kt @@ -42,6 +42,7 @@ import kr.co.vividnext.sodalive.base.SodaDialog import kr.co.vividnext.sodalive.common.Constants import kr.co.vividnext.sodalive.common.LoadingDialog 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.databinding.ActivityAudioContentDetailBinding import kr.co.vividnext.sodalive.explorer.profile.CreatorFollowNotifyFragment @@ -938,7 +939,7 @@ class AudioContentDetailActivity : BaseActivity Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) if (onFailure != null) { onFailure() } @@ -201,7 +207,8 @@ class AudioContentModifyViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -211,7 +218,8 @@ class AudioContentModifyViewModel( _isLoading.postValue(false) it.message?.let { message -> Logger.e(message) } _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } ) @@ -221,12 +229,18 @@ class AudioContentModifyViewModel( private fun validateData(): Boolean { if (title != null && title!!.isBlank()) { - _toastLiveData.postValue("제목을 입력해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.audio_content_upload_error_title_required) + ) return false } if (detail != null && (detail!!.isBlank() || detail!!.length < 5)) { - _toastLiveData.postValue("내용을 5자 이상 입력해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.audio_content_upload_error_detail_min_length) + ) return false } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/audio_content/playlist/create/AudioContentPlaylistCreateActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/audio_content/playlist/create/AudioContentPlaylistCreateActivity.kt index b12edad2..8b3e9363 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/audio_content/playlist/create/AudioContentPlaylistCreateActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/audio_content/playlist/create/AudioContentPlaylistCreateActivity.kt @@ -15,6 +15,7 @@ import kr.co.vividnext.sodalive.audio_content.playlist.create.add_content.Playli import kr.co.vividnext.sodalive.audio_content.playlist.detail.AudioContentPlaylistContent import kr.co.vividnext.sodalive.base.BaseActivity import kr.co.vividnext.sodalive.common.LoadingDialog +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.ActivityAudioContentPlaylistCreateBinding import kr.co.vividnext.sodalive.extensions.dpToPx import org.koin.android.ext.android.inject @@ -39,7 +40,8 @@ class AudioContentPlaylistCreateActivity : BaseActivity( private val inflate: (LayoutInflater) -> T @@ -110,7 +112,8 @@ abstract class BaseActivity( layoutInflater = layoutInflater, title = "포인트 지급", desc = message, - confirmButtonTitle = "확인", + confirmButtonTitle = SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_tag_confirm), confirmButtonClick = {} ).show(screenWidth) } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/chat/talk/TalkTabViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/chat/talk/TalkTabViewModel.kt index 3b3d586d..7c365b57 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/chat/talk/TalkTabViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/chat/talk/TalkTabViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder class TalkTabViewModel(private val repository: TalkTabRepository) : BaseViewModel() { @@ -59,13 +61,15 @@ class TalkTabViewModel(private val repository: TalkTabRepository) : BaseViewMode } } else { _toastLiveData.value = - response.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + response.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.msg_can_coupon_unknown_error) } }, { throwable -> _isLoading.value = false throwable.message?.let { message -> Logger.e(message) } - _toastLiveData.value = "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + _toastLiveData.value = SodaLiveApplicationHolder.get() + .getString(R.string.msg_can_coupon_unknown_error) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/chat/talk/room/ChatRoomActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/chat/talk/room/ChatRoomActivity.kt index 1a468891..89ffbbfd 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/chat/talk/room/ChatRoomActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/chat/talk/room/ChatRoomActivity.kt @@ -23,6 +23,7 @@ import kr.co.vividnext.sodalive.base.SodaDialog import kr.co.vividnext.sodalive.chat.character.detail.detail.CharacterType import kr.co.vividnext.sodalive.common.LoadingDialog import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.ActivityChatRoomBinding import kr.co.vividnext.sodalive.extensions.dpToPx import kr.co.vividnext.sodalive.extensions.moneyFormat @@ -538,7 +539,10 @@ class ChatRoomActivity : BaseActivity( } override fun onFinish() { - ensureQuotaNoticeShown("00:00:00") + ensureQuotaNoticeShown( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_audio_content_detail_time_default) + ) checkQuotaStatus() } }.start() @@ -565,7 +569,12 @@ class ChatRoomActivity : BaseActivity( val ms = if (epoch < 1_000_000_000_000L) epoch * 1000 else epoch val remain = ms - System.currentTimeMillis() val displayMs = (remain + DISPLAY_FUDGE_MS).coerceAtLeast(0L) - return if (displayMs > 0L) formatMillisToHms(displayMs) else "00:00:00" + return if (displayMs > 0L) { + formatMillisToHms(displayMs) + } else { + SodaLiveApplicationHolder.get() + .getString(R.string.screen_audio_content_detail_time_default) + } } private fun formatMillisToHms(ms: Long): String { @@ -780,7 +789,9 @@ class ChatRoomActivity : BaseActivity( ) }, { error -> isLoading = false - showToast(error.message ?: getString(R.string.chat_previous_messages_load_failed)) + showToast( + error.message ?: getString(R.string.chat_previous_messages_load_failed) + ) }) compositeDisposable.add(disposable) @@ -793,10 +804,10 @@ class ChatRoomActivity : BaseActivity( */ private fun onPurchaseMessageClicked(message: ChatMessage) { // 조건 확인: AI 메시지이며 잠금 상태여야 함 - val isLock = (message.price != null) && (message.hasAccess == false) + val isLock = (message.price != null) && !message.hasAccess if (message.mine || !isLock) return - val priceText = message.price?.toString() ?: "0" + val priceText = message.price.toString() val title = getString(R.string.chat_locked_message_title) val desc = getString(R.string.chat_locked_message_desc, priceText) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/common/RealPathUtil.kt b/app/src/main/java/kr/co/vividnext/sodalive/common/RealPathUtil.kt index 0787e3fe..9afc7287 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/common/RealPathUtil.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/common/RealPathUtil.kt @@ -9,6 +9,7 @@ import android.os.Environment import android.provider.DocumentsContract import android.provider.MediaStore import android.text.TextUtils +import kr.co.vividnext.sodalive.R object RealPathUtil { fun getRealPath(context: Context, fileUri: Uri): String? { @@ -35,7 +36,9 @@ object RealPathUtil { val type = split[0] if ("primary".equals(type, ignoreCase = true)) { - return Environment.getExternalStorageDirectory().toString() + "/" + split[1] + return Environment.getExternalStorageDirectory() + .toString() + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_separator_slash) + split[1] } } else if (isDownloadsDocument(uri)) { var cursor: Cursor? = null diff --git a/app/src/main/java/kr/co/vividnext/sodalive/dialog/MemberProfileDialog.kt b/app/src/main/java/kr/co/vividnext/sodalive/dialog/MemberProfileDialog.kt index 0624e911..3cbef7bb 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/dialog/MemberProfileDialog.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/dialog/MemberProfileDialog.kt @@ -13,6 +13,7 @@ import coil.transform.RoundedCornersTransformation import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.common.LoadingDialog import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.DialogMemberProfileBinding import kr.co.vividnext.sodalive.extensions.dpToPx import kr.co.vividnext.sodalive.report.ProfileReportDialog @@ -102,7 +103,7 @@ class MemberProfileDialog( dialogView.tvBlockMember.text = if (it.isBlocked) { "차단 해제" } else { - "차단" + SodaLiveApplicationHolder.get().getString(R.string.screen_block_member_block) } dialogView.tvBlockMember.setOnClickListener { _ -> @@ -141,15 +142,24 @@ class MemberProfileDialog( """.trimIndent() } val dialog = android.app.AlertDialog.Builder(activity) - dialog.setTitle("사용자 차단") + dialog.setTitle( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_block_title) + ) dialog.setMessage(message) - dialog.setPositiveButton("차단") { _, _ -> + dialog.setPositiveButton( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_block_member_block) + ) { _, _ -> viewModel.memberBlock(memberId) { dismiss() onBlockComplete() } } - dialog.setNegativeButton("취소") { _, _ -> } + dialog.setNegativeButton( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_message_write_cancel) + ) { _, _ -> } dialog.show() } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/ExplorerViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/ExplorerViewModel.kt index 92efee0e..a8851c9b 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/ExplorerViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/ExplorerViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.live.room.detail.GetRoomDetailUser class ExplorerViewModel(private val repository: ExplorerRepository) : BaseViewModel() { @@ -43,14 +45,18 @@ class ExplorerViewModel(private val repository: ExplorerRepository) : BaseViewMo _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } }, { it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -74,7 +80,8 @@ class ExplorerViewModel(private val repository: ExplorerRepository) : BaseViewMo _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -83,7 +90,10 @@ class ExplorerViewModel(private val repository: ExplorerRepository) : BaseViewMo { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/UserProfileViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/UserProfileViewModel.kt index d282eb93..fbd64155 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/UserProfileViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/UserProfileViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel 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.explorer.ExplorerRepository import kr.co.vividnext.sodalive.explorer.profile.cheers.PutModifyCheersRequest @@ -49,7 +51,8 @@ class UserProfileViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "신고가 접수되었습니다." + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) ) } @@ -58,13 +61,21 @@ class UserProfileViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("신고가 접수되었습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) + ) } ) ) } - fun report(type: ReportType, userId: Long, reason: String = "프로필 신고") { + fun report( + type: ReportType, + userId: Long, + reason: String = SodaLiveApplicationHolder.get() + .getString(R.string.dialog_member_profile_report_profile) + ) { _isLoading.value = true val request = ReportRequest(type, reason, reportedMemberId = userId) @@ -81,7 +92,8 @@ class UserProfileViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "신고가 접수되었습니다." + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) ) } @@ -90,7 +102,10 @@ class UserProfileViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("신고가 접수되었습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) + ) } ) ) @@ -115,7 +130,8 @@ class UserProfileViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } @@ -129,7 +145,9 @@ class UserProfileViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get().getString(R.string.common_error_unknown) + ) if (onFailure != null) { onFailure() } @@ -158,7 +176,8 @@ class UserProfileViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -167,7 +186,10 @@ class UserProfileViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -175,7 +197,10 @@ class UserProfileViewModel( fun writeCheers(parentCheersId: Long? = null, creatorId: Long, cheersContent: String) { if (cheersContent.isBlank()) { - _toastLiveData.postValue("내용을 입력하세요") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_error_empty) + ) return } @@ -197,14 +222,18 @@ class UserProfileViewModel( if (it.success) { getCreatorProfile(creatorId) } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -217,12 +246,18 @@ class UserProfileViewModel( isActive: Boolean? = null ) { if (cheersContent == null && isActive == null) { - _toastLiveData.postValue("변경사항이 없습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.msg_live_room_edit_no_changes) + ) return } if (cheersContent != null && cheersContent.isBlank()) { - _toastLiveData.postValue("내용을 입력하세요") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_error_empty) + ) return } @@ -252,14 +287,18 @@ class UserProfileViewModel( if (it.success) { getCreatorProfile(creatorId) } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -296,14 +335,18 @@ class UserProfileViewModel( getCreatorProfile(userId) _toastLiveData.postValue("차단하였습니다.") } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -326,14 +369,18 @@ class UserProfileViewModel( getCreatorProfile(userId) _toastLiveData.postValue("차단이 해제 되었습니다.") } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityAllViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityAllViewModel.kt index a7bf5190..0fabe32f 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityAllViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityAllViewModel.kt @@ -6,8 +6,10 @@ import com.google.gson.Gson import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.explorer.profile.creator_community.CreatorCommunityRepository import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostListResponse import kr.co.vividnext.sodalive.explorer.profile.creator_community.modify.ModifyCommunityPostRequest @@ -66,7 +68,8 @@ class CreatorCommunityAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -76,7 +79,10 @@ class CreatorCommunityAllViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -114,7 +120,8 @@ class CreatorCommunityAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -123,7 +130,8 @@ class CreatorCommunityAllViewModel( _isLoading.value = false it.message?.let { message -> Logger.e(message) } _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } ) @@ -177,7 +185,8 @@ class CreatorCommunityAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -185,7 +194,10 @@ class CreatorCommunityAllViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -212,7 +224,8 @@ class CreatorCommunityAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "신고가 접수되었습니다." + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) ) } @@ -221,7 +234,10 @@ class CreatorCommunityAllViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("신고가 접수되었습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) + ) } ) ) @@ -247,7 +263,8 @@ class CreatorCommunityAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -257,7 +274,10 @@ class CreatorCommunityAllViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityReportDialog.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityReportDialog.kt index 80585e17..097f7d2c 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityReportDialog.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityReportDialog.kt @@ -8,6 +8,8 @@ import android.view.WindowManager import android.widget.RadioButton import android.widget.Toast import androidx.appcompat.app.AlertDialog +import kr.co.vividnext.sodalive.R +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.DialogCommunityPostReportBinding import kr.co.vividnext.sodalive.extensions.dpToPx @@ -37,7 +39,11 @@ class CreatorCommunityReportDialog( alertDialog.dismiss() confirmButtonClick(reason) } else { - Toast.makeText(activity, "신고 이유를 선택하세요.", Toast.LENGTH_LONG).show() + Toast.makeText(activity, + SodaLiveApplicationHolder.get() + .getString(R.string.screen_audio_content_detail_report_reason_required), + Toast.LENGTH_LONG + ).show() } } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/comment/CreatorCommunityCommentListViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/comment/CreatorCommunityCommentListViewModel.kt index bc4c9ffb..c6be3fc4 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/comment/CreatorCommunityCommentListViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/comment/CreatorCommunityCommentListViewModel.kt @@ -5,9 +5,11 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.audio_content.comment.ModifyCommentRequest import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.explorer.profile.creator_community.CreatorCommunityRepository import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostCommentListItem @@ -63,7 +65,8 @@ class CreatorCommunityCommentListViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } @@ -77,7 +80,10 @@ class CreatorCommunityCommentListViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) if (onFailure != null) { onFailure() } @@ -124,7 +130,8 @@ class CreatorCommunityCommentListViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -132,7 +139,10 @@ class CreatorCommunityCommentListViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -146,12 +156,18 @@ class CreatorCommunityCommentListViewModel( isActive: Boolean? = null ) { if (comment == null && isActive == null) { - _toastLiveData.postValue("변경사항이 없습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.audio_content_comment_no_change) + ) return } if (comment != null && comment.isBlank()) { - _toastLiveData.postValue("내용을 입력하세요") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_creator_community_write_content_hint) + ) return } @@ -188,14 +204,18 @@ class CreatorCommunityCommentListViewModel( getCommentList(postId) } } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -228,7 +248,8 @@ class CreatorCommunityCommentListViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } @@ -242,7 +263,10 @@ class CreatorCommunityCommentListViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) if (onFailure != null) { onFailure() } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/player/CreatorCommunityMediaPlayerManager.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/player/CreatorCommunityMediaPlayerManager.kt index ea6ba51e..92ee620e 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/player/CreatorCommunityMediaPlayerManager.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/player/CreatorCommunityMediaPlayerManager.kt @@ -8,8 +8,10 @@ import android.net.Uri import android.widget.Toast import androidx.annotation.Keep import com.google.gson.annotations.SerializedName +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.audio_content.AudioContentPlayService import kr.co.vividnext.sodalive.audio_content.player.AudioContentPlayerService +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import java.io.IOException @Keep @@ -93,7 +95,12 @@ class CreatorCommunityMediaPlayerManager( } } catch (e: IOException) { e.printStackTrace() - Toast.makeText(context, "콘텐츠를 재생하지 못했습니다.\n다시 시도해 주세요", Toast.LENGTH_SHORT).show() + Toast.makeText( + context, + SodaLiveApplicationHolder.get() + .getString(R.string.screen_audition_play_error), + Toast.LENGTH_SHORT + ).show() } setOnCompletionListener { diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/modify/CreatorCommunityModifyViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/modify/CreatorCommunityModifyViewModel.kt index cc5ab4f5..e9a861ad 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/modify/CreatorCommunityModifyViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/modify/CreatorCommunityModifyViewModel.kt @@ -6,8 +6,10 @@ import com.google.gson.Gson import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.explorer.profile.creator_community.CreatorCommunityRepository import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostListResponse import okhttp3.MediaType @@ -84,7 +86,8 @@ class CreatorCommunityModifyViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } @@ -96,7 +99,10 @@ class CreatorCommunityModifyViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) if (onFailure != null) { onFailure() } @@ -178,7 +184,8 @@ class CreatorCommunityModifyViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -187,7 +194,8 @@ class CreatorCommunityModifyViewModel( _isLoading.value = false it.message?.let { message -> Logger.e(message) } _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } ) @@ -197,7 +205,10 @@ class CreatorCommunityModifyViewModel( private fun validateData(): Boolean { if (content.isBlank() || content.length < 5) { - _toastLiveData.postValue("내용을 5자 이상 입력해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.audio_content_upload_error_detail_min_length) + ) return false } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/write/CreatorCommunityWriteActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/write/CreatorCommunityWriteActivity.kt index 1a1f3238..98d692ff 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/write/CreatorCommunityWriteActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/write/CreatorCommunityWriteActivity.kt @@ -1,7 +1,6 @@ package kr.co.vividnext.sodalive.explorer.profile.creator_community.write import android.Manifest -import android.annotation.SuppressLint import android.graphics.Bitmap import android.os.Build import android.os.Bundle @@ -21,6 +20,7 @@ import kr.co.vividnext.sodalive.base.BaseActivity import kr.co.vividnext.sodalive.common.ImagePickerCropper import kr.co.vividnext.sodalive.common.LoadingDialog import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.ActivityCreatorCommunityWriteBinding import kr.co.vividnext.sodalive.extensions.dpToPx import org.koin.android.ext.android.inject @@ -298,7 +298,10 @@ class CreatorCommunityWriteActivity : BaseActivity Logger.e(message) } _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } ) @@ -174,7 +178,10 @@ class CreatorCommunityWriteViewModel( private fun validateData(): Boolean { if (content.isBlank() || content.length < 5) { - _toastLiveData.postValue("내용을 5자 이상 입력해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.audio_content_upload_error_detail_min_length) + ) return false } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/write/RecordingVoiceFragment.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/write/RecordingVoiceFragment.kt index 75718062..79ace93a 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/write/RecordingVoiceFragment.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/write/RecordingVoiceFragment.kt @@ -18,6 +18,7 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialogFragment import kr.co.vividnext.sodalive.R +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.FragmentRecordingVoiceBinding import java.io.File import java.io.IOException @@ -289,6 +290,7 @@ class RecordingVoiceFragment : BottomSheetDialogFragment() { private fun stopCountDownTimer() { handler.removeCallbacksAndMessages(null) startTime = 0 - binding.tvTimer.text = "00:00.00" + binding.tvTimer.text = + SodaLiveApplicationHolder.get().getString(R.string.recording_voice_initial_time) } } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAllViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAllViewModel.kt index 559660d5..743f160f 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAllViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAllViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.explorer.ExplorerRepository import kr.co.vividnext.sodalive.mypage.profile.ProfileUpdateRequest import kr.co.vividnext.sodalive.user.UserRepository @@ -64,7 +66,8 @@ class UserProfileDonationAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -74,7 +77,10 @@ class UserProfileDonationAllViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -110,7 +116,8 @@ class UserProfileDonationAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -120,7 +127,10 @@ class UserProfileDonationAllViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/fantalk/UserProfileFantalkAllViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/fantalk/UserProfileFantalkAllViewModel.kt index 7a8fbb3b..b0de36c4 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/fantalk/UserProfileFantalkAllViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/fantalk/UserProfileFantalkAllViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.explorer.ExplorerRepository import kr.co.vividnext.sodalive.explorer.profile.GetCheersResponse import kr.co.vividnext.sodalive.explorer.profile.cheers.PutModifyCheersRequest @@ -59,7 +61,8 @@ class UserProfileFantalkAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -69,7 +72,10 @@ class UserProfileFantalkAllViewModel( { _isLoading.postValue(false) it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -93,7 +99,8 @@ class UserProfileFantalkAllViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "신고가 접수되었습니다." + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) ) } @@ -102,7 +109,10 @@ class UserProfileFantalkAllViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("신고가 접수되었습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) + ) } ) ) @@ -110,7 +120,10 @@ class UserProfileFantalkAllViewModel( fun writeCheers(parentCheersId: Long? = null, creatorId: Long, cheersContent: String) { if (cheersContent.isBlank()) { - _toastLiveData.postValue("내용을 입력하세요") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.audio_content_comment_input_required) + ) return } @@ -134,14 +147,18 @@ class UserProfileFantalkAllViewModel( cheersPage = 1 getCheersList(creatorId) } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) @@ -154,12 +171,18 @@ class UserProfileFantalkAllViewModel( isActive: Boolean? = null ) { if (cheersContent == null && isActive == null) { - _toastLiveData.postValue("변경사항이 없습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.msg_live_room_edit_no_changes) + ) return } if (cheersContent != null && cheersContent.isBlank()) { - _toastLiveData.postValue("내용을 입력하세요") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.audio_content_comment_input_required) + ) return } @@ -191,14 +214,18 @@ class UserProfileFantalkAllViewModel( cheersPage = 1 getCheersList(creatorId) } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/follow/UserFollowerListViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/follow/UserFollowerListViewModel.kt index da4be356..f6617b2c 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/follow/UserFollowerListViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/follow/UserFollowerListViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.explorer.ExplorerRepository import kr.co.vividnext.sodalive.user.UserRepository @@ -72,7 +74,8 @@ class UserFollowerListViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -81,7 +84,8 @@ class UserFollowerListViewModel( _isLoading.value = false it.message?.let { message -> Logger.e(message) } _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } ) @@ -113,7 +117,8 @@ class UserFollowerListViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) ) } } @@ -121,7 +126,10 @@ class UserFollowerListViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.common_error_unknown) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/live/LiveViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/live/LiveViewModel.kt index 8512433d..727f8b7e 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/live/LiveViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/live/LiveViewModel.kt @@ -6,9 +6,11 @@ import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.core.Flowable import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.audio_content.AudioContentRepository import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.explorer.profile.creator_community.CreatorCommunityRepository import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostListResponse import kr.co.vividnext.sodalive.home.AudioContentMainItem @@ -93,7 +95,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -101,7 +104,10 @@ class LiveViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -123,7 +129,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -131,7 +138,10 @@ class LiveViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -213,7 +223,8 @@ class LiveViewModel( _toastLiveData.postValue(now.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -231,7 +242,8 @@ class LiveViewModel( _toastLiveData.postValue(reservation.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -271,7 +283,10 @@ class LiveViewModel( { _isLoading.postValue(false) it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -295,7 +310,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -303,7 +319,10 @@ class LiveViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -328,7 +347,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -336,7 +356,10 @@ class LiveViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -363,7 +386,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -371,7 +395,10 @@ class LiveViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -395,7 +422,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -403,7 +431,10 @@ class LiveViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -468,7 +499,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -476,7 +508,10 @@ class LiveViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -509,7 +544,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -517,7 +553,10 @@ class LiveViewModel( { _isLoading.postValue(false) it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -552,7 +591,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -560,7 +600,10 @@ class LiveViewModel( { _isLoading.postValue(false) it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -594,7 +637,8 @@ class LiveViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -602,7 +646,10 @@ class LiveViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/live/reservation_status/LiveReservationCancelActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/live/reservation_status/LiveReservationCancelActivity.kt index 965e89af..fe3127dd 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/live/reservation_status/LiveReservationCancelActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/live/reservation_status/LiveReservationCancelActivity.kt @@ -14,6 +14,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseActivity import kr.co.vividnext.sodalive.common.LoadingDialog +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.ActivityLiveReservationCancelBinding import kr.co.vividnext.sodalive.extensions.dpToPx import kr.co.vividnext.sodalive.main.MainActivity @@ -75,7 +76,8 @@ class LiveReservationCancelActivity : BaseActivity Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -76,7 +82,8 @@ class LiveReservationStatusViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -86,7 +93,10 @@ class LiveReservationStatusViewModel( _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -117,7 +127,8 @@ class LiveReservationStatusViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -126,7 +137,10 @@ class LiveReservationStatusViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/live/room/LiveRoomViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/live/room/LiveRoomViewModel.kt index c7d3a273..7ffcbd6d 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/live/room/LiveRoomViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/live/room/LiveRoomViewModel.kt @@ -8,9 +8,11 @@ import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.ApiResponse 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.live.LiveRepository import kr.co.vividnext.sodalive.live.room.donation.GetLiveRoomDonationStatusResponse @@ -164,14 +166,18 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } }, { it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -192,14 +198,18 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } }, { it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -236,14 +246,18 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } }, { it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -348,7 +362,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -357,7 +372,10 @@ class LiveRoomViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -385,7 +403,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -394,7 +413,10 @@ class LiveRoomViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -489,7 +511,9 @@ class LiveRoomViewModel( } if (coverImage == null && requestJson == null) { - _toastLiveData.value = "변경사항이 없습니다." + _toastLiveData.value = + SodaLiveApplicationHolder.get() + .getString(R.string.msg_live_room_edit_no_changes) return } @@ -512,7 +536,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "라이브 정보를 수정하지 못했습니다.\n다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.msg_live_room_edit_update_failed) ) } } @@ -520,7 +545,8 @@ class LiveRoomViewModel( { it.message?.let { message -> Logger.e(message) } _toastLiveData.postValue( - "라이브 정보를 수정하지 못했습니다.\n다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.msg_live_room_edit_update_failed) ) } ) @@ -544,7 +570,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -552,7 +579,10 @@ class LiveRoomViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -586,7 +616,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } onFailure() @@ -594,7 +625,10 @@ class LiveRoomViewModel( }, { it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) onFailure() } ) @@ -630,7 +664,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -638,7 +673,10 @@ class LiveRoomViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -827,7 +865,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -835,7 +874,10 @@ class LiveRoomViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -858,7 +900,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -866,7 +909,10 @@ class LiveRoomViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -899,14 +945,18 @@ class LiveRoomViewModel( _toastLiveData.postValue("차단하였습니다.") onSuccess() } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -929,20 +979,29 @@ class LiveRoomViewModel( getUserProfile(roomId = roomInfoResponse.roomId, userId = userId) {} _toastLiveData.postValue("차단이 해제 되었습니다.") } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) } - fun report(type: ReportType, userId: Long, reason: String = "프로필 신고") { + fun report( + type: ReportType, + userId: Long, + reason: String = SodaLiveApplicationHolder.get() + .getString(R.string.dialog_member_profile_report_profile) + ) { _isLoading.value = true val request = ReportRequest(type, reason, reportedMemberId = userId) @@ -959,7 +1018,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "신고가 접수되었습니다." + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) ) } @@ -968,7 +1028,10 @@ class LiveRoomViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("신고가 접수되었습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) + ) } ) ) @@ -1119,7 +1182,8 @@ class LiveRoomViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -1128,7 +1192,10 @@ class LiveRoomViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/live/room/create/LiveRoomCreateActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/live/room/create/LiveRoomCreateActivity.kt index 2a0d8b26..ad452561 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/live/room/create/LiveRoomCreateActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/live/room/create/LiveRoomCreateActivity.kt @@ -28,6 +28,7 @@ import kr.co.vividnext.sodalive.common.Constants import kr.co.vividnext.sodalive.common.ImagePickerCropper import kr.co.vividnext.sodalive.common.LoadingDialog import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.ActivityLiveRoomCreateBinding import kr.co.vividnext.sodalive.databinding.ItemLiveTagSelectedBinding import kr.co.vividnext.sodalive.extensions.convertDateFormat @@ -292,7 +293,11 @@ class LiveRoomCreateActivity : BaseActivity( if (SharedPreferenceManager.role == MemberRole.CREATOR.name) { binding.llPrice.visibility = View.VISIBLE - binding.tvPriceFree.setOnClickListener { binding.etPrice.setText("0") } + binding.tvPriceFree.setOnClickListener { + binding.etPrice.setText( + SodaLiveApplicationHolder.get().getString(R.string.common_zero) + ) + } binding.tvPrice100.setOnClickListener { binding.etPrice.setText("100") } binding.tvPrice300.setOnClickListener { binding.etPrice.setText("300") } binding.tvPrice500.setOnClickListener { binding.etPrice.setText("500") } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/live/room/donation/LiveRoomDonationMessageViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/live/room/donation/LiveRoomDonationMessageViewModel.kt index ca07c57f..38f0e838 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/live/room/donation/LiveRoomDonationMessageViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/live/room/donation/LiveRoomDonationMessageViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.live.LiveRepository class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) : BaseViewModel() { @@ -46,7 +48,8 @@ class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) : _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -54,7 +57,10 @@ class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) : { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -80,7 +86,8 @@ class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) : _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -88,7 +95,10 @@ class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) : { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/message/voice/VoiceMessageWriteFragment.kt b/app/src/main/java/kr/co/vividnext/sodalive/message/voice/VoiceMessageWriteFragment.kt index 393d970f..48b0d68b 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/message/voice/VoiceMessageWriteFragment.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/message/voice/VoiceMessageWriteFragment.kt @@ -30,6 +30,7 @@ import com.gun0912.tedpermission.normal.TedPermission import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.common.Constants import kr.co.vividnext.sodalive.common.LoadingDialog +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.FragmentVoiceMessageWriteBinding import kr.co.vividnext.sodalive.extensions.dpToPx import kr.co.vividnext.sodalive.live.room.detail.GetRoomDetailUser @@ -433,7 +434,8 @@ class VoiceMessageWriteFragment( countDownTimer = null } - binding.tvTimer.text = "00:00:00" + binding.tvTimer.text = SodaLiveApplicationHolder.get() + .getString(R.string.screen_audio_content_detail_time_default) second = -1 minute = 0 hour = 0 diff --git a/app/src/main/java/kr/co/vividnext/sodalive/mypage/MyPageFragment.kt b/app/src/main/java/kr/co/vividnext/sodalive/mypage/MyPageFragment.kt index 9600709f..c17c6e45 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/mypage/MyPageFragment.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/mypage/MyPageFragment.kt @@ -22,6 +22,7 @@ import kr.co.vividnext.sodalive.common.Constants import kr.co.vividnext.sodalive.common.FunctionButtonHelper import kr.co.vividnext.sodalive.common.LoadingDialog import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.FragmentMyBinding import kr.co.vividnext.sodalive.explorer.profile.UserProfileActivity import kr.co.vividnext.sodalive.extensions.dpToPx @@ -317,21 +318,21 @@ class MyPageFragment : BaseFragment(FragmentMyBinding::inflat } if (SharedPreferenceManager.role == MemberRole.CREATOR.name) { - binding.tvMyChannel.visibility = View.VISIBLE - binding.tvMyChannel.setOnClickListener { - startActivity( - Intent( - requireContext(), - UserProfileActivity::class.java - ).apply { - putExtra( - Constants.EXTRA_USER_ID, - SharedPreferenceManager.userId - ) - } - ) - } - } else { + binding.tvMyChannel.visibility = View.VISIBLE + binding.tvMyChannel.setOnClickListener { + startActivity( + Intent( + requireContext(), + UserProfileActivity::class.java + ).apply { + putExtra( + Constants.EXTRA_USER_ID, + SharedPreferenceManager.userId + ) + } + ) + } + } else { binding.tvMyChannel.visibility = View.GONE } } else { @@ -344,12 +345,14 @@ class MyPageFragment : BaseFragment(FragmentMyBinding::inflat (requireActivity() as MainActivity).showLoginActivity() } - binding.tvCanAmount.text = "0" + binding.tvCanAmount.text = + SodaLiveApplicationHolder.get().getString(R.string.common_zero) binding.tvCanAmount.setOnClickListener { (requireActivity() as MainActivity).showLoginActivity() } - binding.tvPointAmount.text = "0" + binding.tvPointAmount.text = + SodaLiveApplicationHolder.get().getString(R.string.common_zero) binding.tvPointAmount.setOnClickListener { (requireActivity() as MainActivity).showLoginActivity() } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/AlarmListViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/AlarmListViewModel.kt index 9c6a6208..91d6179e 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/AlarmListViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/AlarmListViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder class AlarmListViewModel(private val repository: AlarmListRepository) : BaseViewModel() { private val _toastLiveData = MutableLiveData() @@ -47,7 +49,8 @@ class AlarmListViewModel(private val repository: AlarmListRepository) : BaseView _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -55,7 +58,10 @@ class AlarmListViewModel(private val repository: AlarmListRepository) : BaseView { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) @@ -77,7 +83,8 @@ class AlarmListViewModel(private val repository: AlarmListRepository) : BaseView _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) ) } } @@ -85,7 +92,10 @@ class AlarmListViewModel(private val repository: AlarmListRepository) : BaseView { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_live_room_unknown_error) + ) } ) ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/db/Alarm.kt b/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/db/Alarm.kt index e12fc2d5..6f5799a8 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/db/Alarm.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/db/Alarm.kt @@ -2,6 +2,8 @@ package kr.co.vividnext.sodalive.mypage.alarm.db import androidx.room.Entity import androidx.room.PrimaryKey +import kr.co.vividnext.sodalive.R +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder @Entity(tableName = "alarms") data class Alarm( @@ -16,6 +18,10 @@ data class Alarm( var isEnabled: Boolean = true ) { fun getDaysText(): String { - return if (days.size == 7) "매일" else days.joinToString(", ") + return if (days.size == 7) { + SodaLiveApplicationHolder.get().getString(R.string.alarm_add_everyday) + } else { + days.joinToString(", ") + } } } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/scheduler/AlarmScheduler.kt b/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/scheduler/AlarmScheduler.kt index 8f56e51a..d4892058 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/scheduler/AlarmScheduler.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/mypage/alarm/scheduler/AlarmScheduler.kt @@ -4,7 +4,9 @@ import android.app.AlarmManager import android.app.PendingIntent import android.content.Context import android.content.Intent +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.common.Constants +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.mypage.alarm.db.Alarm import kr.co.vividnext.sodalive.mypage.alarm.receiver.AlarmReceiver import java.util.Calendar @@ -109,13 +111,13 @@ class AlarmScheduler(private val context: Context) { private fun getDayOfWeek(day: String): Int { return when (day) { - "일" -> Calendar.SUNDAY - "월" -> Calendar.MONDAY - "화" -> Calendar.TUESDAY - "수" -> Calendar.WEDNESDAY - "목" -> Calendar.THURSDAY - "금" -> Calendar.FRIDAY - "토" -> Calendar.SATURDAY + SodaLiveApplicationHolder.get().getString(R.string.day_sun_short) -> Calendar.SUNDAY + SodaLiveApplicationHolder.get().getString(R.string.day_mon_short) -> Calendar.MONDAY + SodaLiveApplicationHolder.get().getString(R.string.day_tue_short) -> Calendar.TUESDAY + SodaLiveApplicationHolder.get().getString(R.string.day_wed_short) -> Calendar.WEDNESDAY + SodaLiveApplicationHolder.get().getString(R.string.day_thu_short) -> Calendar.THURSDAY + SodaLiveApplicationHolder.get().getString(R.string.day_fri_short) -> Calendar.FRIDAY + SodaLiveApplicationHolder.get().getString(R.string.day_sat_short) -> Calendar.SATURDAY else -> Calendar.MONDAY } } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/mypage/auth/Auth.kt b/app/src/main/java/kr/co/vividnext/sodalive/mypage/auth/Auth.kt index 39d8be3a..2a3c5123 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/mypage/auth/Auth.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/mypage/auth/Auth.kt @@ -8,7 +8,9 @@ import kr.co.bootpay.android.Bootpay import kr.co.bootpay.android.events.BootpayEventListener import kr.co.bootpay.android.models.Payload import kr.co.vividnext.sodalive.BuildConfig +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import java.util.Date object Auth { @@ -18,9 +20,9 @@ object Auth { val payload = Payload() .setApplicationId(BuildConfig.BOOTPAY_APP_ID) - .setOrderName("본인인증") + .setOrderName(SodaLiveApplicationHolder.get().getString(R.string.auth_title)) .setPg("다날") - .setMethod("본인인증") + .setMethod(SodaLiveApplicationHolder.get().getString(R.string.auth_title)) .setAuthenticationId(authenticationId) .setPrice(0.toDouble()) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/mypage/can/payment/CanPaymentActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/mypage/can/payment/CanPaymentActivity.kt index 60fbb173..095c04b9 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/mypage/can/payment/CanPaymentActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/mypage/can/payment/CanPaymentActivity.kt @@ -33,6 +33,7 @@ import kr.co.vividnext.sodalive.base.BaseActivity import kr.co.vividnext.sodalive.common.Constants import kr.co.vividnext.sodalive.common.LoadingDialog import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.ActivityCanPaymentBinding import kr.co.vividnext.sodalive.extensions.formatMoney import kr.co.vividnext.sodalive.mypage.auth.BootpayResponse @@ -46,7 +47,10 @@ class CanPaymentActivity : BaseActivity( ActivityCanPaymentBinding::inflate ) { enum class PaymentMethod(val method: String) { - UNIFIED("통합 결제"), + UNIFIED( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_can_payment_method_unified) + ), PHONE("휴대폰"), KAKAOPAY("카카오페이") } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/mypage/can/payment/CanPaymentTempActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/mypage/can/payment/CanPaymentTempActivity.kt index 7a2ca2a9..9bcbc7d9 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/mypage/can/payment/CanPaymentTempActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/mypage/can/payment/CanPaymentTempActivity.kt @@ -20,6 +20,7 @@ import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseActivity import kr.co.vividnext.sodalive.common.LoadingDialog import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.databinding.ActivityCanPaymentBinding import kr.co.vividnext.sodalive.extensions.fontSpan import kr.co.vividnext.sodalive.extensions.moneyFormat @@ -31,7 +32,11 @@ class CanPaymentTempActivity : BaseActivity( ActivityCanPaymentBinding::inflate ) { enum class PaymentMethod(val method: String) { - UNIFIED("통합 결제"), PHONE("휴대폰") + UNIFIED( + SodaLiveApplicationHolder.get() + .getString(R.string.screen_can_payment_method_unified) + ), + PHONE("휴대폰") } private val viewModel: CanPaymentTempViewModel by inject() diff --git a/app/src/main/java/kr/co/vividnext/sodalive/user/UserViewModel.kt b/app/src/main/java/kr/co/vividnext/sodalive/user/UserViewModel.kt index c27d1d92..6dfb506c 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/user/UserViewModel.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/user/UserViewModel.kt @@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData import com.orhanobut.logger.Logger import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.schedulers.Schedulers +import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.base.BaseViewModel import kr.co.vividnext.sodalive.common.SharedPreferenceManager +import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder import kr.co.vividnext.sodalive.report.ReportRepository import kr.co.vividnext.sodalive.report.ReportRequest import kr.co.vividnext.sodalive.report.ReportType @@ -48,7 +50,8 @@ class UserViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.msg_can_coupon_unknown_error) ) } } @@ -57,7 +60,8 @@ class UserViewModel( _isLoading.value = false it.message?.let { message -> Logger.e(message) } _toastLiveData.postValue( - "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + SodaLiveApplicationHolder.get() + .getString(R.string.msg_can_coupon_unknown_error) ) } ) @@ -81,14 +85,18 @@ class UserViewModel( _toastLiveData.postValue("차단하였습니다.") onSuccess() } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.msg_can_coupon_unknown_error) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.msg_can_coupon_unknown_error) + ) } ) ) @@ -111,14 +119,18 @@ class UserViewModel( _toastLiveData.postValue("차단이 해제 되었습니다.") onSuccess() } else { - val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요." + val message = it.message ?: SodaLiveApplicationHolder.get() + .getString(R.string.msg_can_coupon_unknown_error) _toastLiveData.postValue(message) } }, { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.msg_can_coupon_unknown_error) + ) } ) ) @@ -127,7 +139,8 @@ class UserViewModel( fun report( type: ReportType, userId: Long, - reason: String = "프로필 신고", + reason: String = SodaLiveApplicationHolder.get() + .getString(R.string.dialog_member_profile_report_profile), onSuccess: () -> Unit ) { _isLoading.value = true @@ -146,7 +159,8 @@ class UserViewModel( _toastLiveData.postValue(it.message) } else { _toastLiveData.postValue( - "신고가 접수되었습니다." + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) ) } @@ -156,7 +170,10 @@ class UserViewModel( { _isLoading.value = false it.message?.let { message -> Logger.e(message) } - _toastLiveData.postValue("신고가 접수되었습니다.") + _toastLiveData.postValue( + SodaLiveApplicationHolder.get() + .getString(R.string.character_comment_report_submitted) + ) onSuccess() } ) diff --git a/app/src/main/res/layout/activity_splash.xml b/app/src/main/res/layout/activity_splash.xml index ac4ddcb9..506dcf6f 100644 --- a/app/src/main/res/layout/activity_splash.xml +++ b/app/src/main/res/layout/activity_splash.xml @@ -31,7 +31,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:fontFamily="@font/pretendard_bold" - android:text="목소리로 만나는 새로운 세계" + android:text="@string/screen_splash_tagline" android:textColor="#263238" android:textSize="23sp" /> @@ -48,7 +48,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:fontFamily="@font/pretendard_bold" - android:text="소다라이브" + android:text="@string/screen_splash_brand_name" android:textColor="@color/white" android:textSize="21sp" app:layout_constraintBottom_toBottomOf="parent"