Skip to content

Commit

Permalink
#8 [REFACTOR] 스트링 추출
Browse files Browse the repository at this point in the history
  • Loading branch information
gaeulzzang committed Jan 4, 2025
1 parent 83e9a8c commit 76b6237
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ fun AppointmentScreen(
showDialog = false
onSubmitButtonClick(groupId, appointmentsId, appointmentName)
},
description = "이미 일정을 등록하지 않았어요!\n일정을 등록하러 가볼까요?",
dismissText = "나중에 등록하기",
confirmButtonText = "가능일정 등록하기"
description = stringResource(R.string.dialog_appointment_description),
dismissText = stringResource(R.string.dialog_appointment_dismiss),
confirmButtonText = stringResource(R.string.dialog_appointment_confirm)
)
}
Row(
Expand Down Expand Up @@ -243,7 +243,7 @@ fun RecommendationHeaderItem(
) {
Text(
modifier = Modifier.padding(bottom = 6.dp),
text = "Best$priority",
text = stringResource(R.string.text_appointment_priority, priority),
color = when (selectedItemIndex) {
-1 -> NoostakTheme.colors.black
priority -> NoostakTheme.colors.blue700
Expand All @@ -262,7 +262,12 @@ fun RecommendationHeaderItem(
}
)
) {
append("${availableMembersCount}")
append(
stringResource(
R.string.tv_appointment_availableMembersCount,
availableMembersCount
)
)
}
withStyle(
style = SpanStyle(
Expand All @@ -273,7 +278,12 @@ fun RecommendationHeaderItem(
}
)
) {
append(" / ${totalMembersCount}")
append(
stringResource(
R.string.tv_appointment_totalMembersCount,
totalMembersCount
)
)
}
},
style = NoostakTheme.typography.b4SemiBold
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ fun AppointmentCheckScreen(
data = data,
modifier = Modifier
.constrainAs(timeTable) {
top.linkTo(title.bottom) // 제목 아래에 위치
top.linkTo(title.bottom)
start.linkTo(parent.start)
end.linkTo(parent.end)
bottom.linkTo(button.top) // 버튼 위에 위치
height = Dimension.fillToConstraints // 높이 제약 설정
bottom.linkTo(button.top)
height = Dimension.fillToConstraints
}
) {
selectedData = it
Expand All @@ -133,14 +133,14 @@ fun AppointmentCheckScreen(
NoostakButton(
modifier = Modifier
.constrainAs(button) {
bottom.linkTo(parent.bottom) // 하단 고정
bottom.linkTo(parent.bottom)
start.linkTo(parent.start)
end.linkTo(parent.end)
}
.padding(
top = 7.dp,
bottom = dimensionResource(id = R.dimen.vertical_padding)
), // 하단 여백
),
text = stringResource(R.string.btn_appointment_check),
onButtonClick = { onConfirmButtonClick(groupId, appointmentsId, appointmentName) },
isEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ fun AppointmentConfirmScreen(
.padding(dimensionResource(id = R.dimen.horizontal_padding))
) {
Text(
text = "이대로 약속을 확정 할까요?",
text = stringResource(R.string.title_appointment_confirm),
color = NoostakTheme.colors.black,
style = NoostakTheme.typography.h4Bold
)
Text(
modifier = Modifier.padding(top = 4.dp),
text = "한 번 확정된 약속은 수정이 어려워요!",
text = stringResource(R.string.subtitle_appointment_confirm),
color = NoostakTheme.colors.black,
style = NoostakTheme.typography.c3Regular
)
Text(
modifier = Modifier.padding(top = 20.dp, start = 3.dp, bottom = 12.dp),
text = "약속 정보",
text = stringResource(R.string.tv_appointment_confirm_info),
color = NoostakTheme.colors.black,
style = NoostakTheme.typography.t4Bold
)
Expand Down Expand Up @@ -188,7 +188,7 @@ fun AppointmentConfirmScreen(
}
Spacer(modifier = Modifier.weight(1f))
NoostakButton(
text = "완료",
text = stringResource(R.string.btn_appointment_confirm_complete),
onButtonClick = { onConfirmButtonClick(groupId) },
isEnabled = true
)
Expand Down
10 changes: 10 additions & 0 deletions presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,15 @@
<string name="btn_appointment_check">확인</string>
<string name="header_appointment_recommendation">추천 시간</string>
<string name="btn_appointment_total">전체보기</string>
<string name="title_appointment_confirm">이대로 약속을 확정 할까요?</string>
<string name="subtitle_appointment_confirm">한 번 확정된 약속은 수정이 어려워요!</string>
<string name="tv_appointment_confirm_info">약속 정보</string>
<string name="btn_appointment_confirm_complete">완료</string>
<string name="dialog_appointment_description">이미 일정을 등록하지 않았어요!\n일정을 등록하러 가볼까요?</string>
<string name="dialog_appointment_dismiss">나중에 등록하기</string>
<string name="dialog_appointment_confirm">가능일정 등록하기</string>
<string name="text_appointment_priority">Best%1$s</string>
<string name="tv_appointment_availableMembersCount">%1$s명</string>
<string name="tv_appointment_totalMembersCount">" / %1$s명"</string>

</resources>

0 comments on commit 76b6237

Please sign in to comment.