Skip to content

Commit

Permalink
[FIX/#85] 스트링 추출
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchbreeze committed Jan 12, 2024
1 parent 778d74c commit d24b7cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class NonDataBaseResponse<T>(
data class NonDataBaseResponse(
@SerialName("status")
val status: Int,
@SerialName("code")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ class OurTodoFragment() : BaseFragment<FragmentOurTodoBinding>(R.layout.fragment
binding.run {
tvOurTodoTitleUp.text = state.data.title
// TODO: 날짜 분기처리
tvOurTodoTitleDown.text = "여행일까지 %s일 남았어요!".format(state.data.day)
tvOurTodoTitleDown.text = getString(R.string.our_todo_title_down).format(state.data.day)
setDateTextColor()
tvOurTodoTitleDate.text = "%s - %s".format(convertDate(state.data.startDate), convertDate(state.data.endDate))
tvOurTodoTitleDate.text = getString(R.string.our_todo_date_form).format(convertDate(state.data.startDate), convertDate(state.data.endDate))
progressBarOurTodo.progress = state.data.progress
tvOurTripInfoPercent.text = state.data.progress.toString() + "%"
adapter.submitList(state.data.participants)
Expand All @@ -129,7 +129,7 @@ class OurTodoFragment() : BaseFragment<FragmentOurTodoBinding>(R.layout.fragment

private fun convertDate(date: String): String {
val splitDate = date.split(".")
return "${splitDate[1]}${splitDate[2]}"
return getString(R.string.our_todo_day_form).format(splitDate[1], splitDate[2])
}

override fun onDestroyView() {
Expand Down
3 changes: 3 additions & 0 deletions presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
<string name="our_todo_tv_trip_friend_title">여행 친구들</string>
<string name="our_todo_btn_invite_friend">초대</string>
<string name="our_todo_btn_add_todo">같이 할일</string>
<string name="our_todo_title_down">여행일까지 %s일 남았어요!</string>
<string name="our_todo_date_form">%s - %s</string>
<string name="our_todo_day_form">%s월 %s일</string>

<!--my_todo-->
<string name="my_todo_btn_add_todo">나의 할일</string>
Expand Down

0 comments on commit d24b7cb

Please sign in to comment.