feat(i18n): 마이페이지 그룹 3~5 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -17,20 +17,20 @@ struct LiveReservationCancelView: View {
|
||||
var body: some View {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: viewModel.isCancelComplete ? "예약취소 확인" : "예약취소")
|
||||
DetailNavigationBar(title: viewModel.isCancelComplete ? I18n.MyPage.Reservation.Cancel.completedTitle : I18n.MyPage.Reservation.Cancel.title)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(spacing: 0) {
|
||||
if let item = viewModel.selectedReservationStatusItem {
|
||||
if viewModel.isCancelComplete {
|
||||
Text("예약취소가 완료되었습니다.")
|
||||
Text(I18n.MyPage.Reservation.Cancel.completedMessage)
|
||||
.appFont(size: 20, weight: .bold)
|
||||
.foregroundColor(Color(hex: "a285eb"))
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
if item.price > 0 {
|
||||
Text("결제한 \(item.price)캔이\n환불처리 되었습니다.")
|
||||
Text(I18n.MyPage.Reservation.Cancel.refundedCanMessage(item.price))
|
||||
.appFont(size: 20, weight: .medium)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
@@ -38,7 +38,7 @@ struct LiveReservationCancelView: View {
|
||||
}
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
Text("다른 라이브 예약하기")
|
||||
Text(I18n.MyPage.Reservation.Cancel.reserveAnotherLiveAction)
|
||||
.appFont(size: 15, weight: .medium)
|
||||
.foregroundColor(Color.button)
|
||||
.padding(.vertical, 16)
|
||||
@@ -56,7 +56,7 @@ struct LiveReservationCancelView: View {
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
}
|
||||
|
||||
Text("캔내역 확인하기")
|
||||
Text(I18n.MyPage.Reservation.Cancel.checkCanHistoryAction)
|
||||
.appFont(size: 15, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
.padding(.vertical, 16)
|
||||
@@ -105,8 +105,8 @@ struct LiveReservationCancelView: View {
|
||||
|
||||
Text(
|
||||
item.price > 0 ?
|
||||
"\(item.price)캔" :
|
||||
"무료"
|
||||
I18n.MyPage.Reservation.cansUnit(item.price) :
|
||||
I18n.MyPage.Reservation.LiveStatus.free
|
||||
)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "e2e2e2").opacity(0.4))
|
||||
@@ -124,12 +124,12 @@ struct LiveReservationCancelView: View {
|
||||
.padding(.top, 13.3)
|
||||
|
||||
VStack(spacing: 13.3) {
|
||||
Text("예약을 취소하시겠습니까?")
|
||||
Text(I18n.MyPage.Reservation.Cancel.confirmQuestion)
|
||||
.appFont(size: 20, weight: .bold)
|
||||
.foregroundColor(Color(hex: "a285eb"))
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
|
||||
Text("예약취소 이유를 선택해주세요. 서비스 개선에 중요한 자료로 활용하겠습니다.")
|
||||
Text(I18n.MyPage.Reservation.Cancel.reasonDescription)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
@@ -154,7 +154,7 @@ struct LiveReservationCancelView: View {
|
||||
|
||||
if index == viewModel.cancelReasons.count - 1 {
|
||||
VStack(spacing: 6.7) {
|
||||
TextField("입력해주세요", text: $viewModel.reason)
|
||||
TextField(I18n.MyPage.Reservation.Cancel.reasonPlaceholder, text: $viewModel.reason)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
@@ -180,12 +180,12 @@ struct LiveReservationCancelView: View {
|
||||
.foregroundColor(Color(hex: "232323"))
|
||||
.padding(.vertical, 20)
|
||||
|
||||
Text("취소요청시, 차감했던 캔은 환불처리 됩니다. 수다방 참여인원 제한에 따라 재예약이 불가할 수 있습니다.")
|
||||
Text(I18n.MyPage.Reservation.Cancel.notice)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "ff5c49"))
|
||||
.frame(width: screenSize().width - 53.4, alignment: .leading)
|
||||
|
||||
Text("예약취소")
|
||||
Text(I18n.MyPage.Reservation.Cancel.requestCancelAction)
|
||||
.appFont(size: 15, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
.padding(.vertical, 16)
|
||||
@@ -206,7 +206,7 @@ struct LiveReservationCancelView: View {
|
||||
.sodaToast(isPresented: $viewModel.isShowPopup, message: viewModel.errorMessage, autohideIn: 1)
|
||||
.onAppear {
|
||||
if reservationId <= 0 {
|
||||
viewModel.errorMessage = "잘못된 예약정보 입니다."
|
||||
viewModel.errorMessage = I18n.MyPage.Reservation.Cancel.invalidReservationInfo
|
||||
viewModel.isShowPopup = true
|
||||
} else {
|
||||
viewModel.getReservation(reservationId: reservationId)
|
||||
|
||||
@@ -50,8 +50,8 @@ struct LiveReservationStatusItemView: View {
|
||||
HStack(spacing: 0) {
|
||||
Text(
|
||||
item.price > 0 ?
|
||||
"\(item.price)캔" :
|
||||
"무료"
|
||||
I18n.MyPage.Reservation.cansUnit(item.price) :
|
||||
I18n.MyPage.Reservation.LiveStatus.free
|
||||
)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "e2e2e2").opacity(0.4))
|
||||
@@ -59,7 +59,7 @@ struct LiveReservationStatusItemView: View {
|
||||
Spacer()
|
||||
|
||||
if !item.cancelable {
|
||||
Text("예약 취소 불가")
|
||||
Text(I18n.MyPage.Reservation.LiveStatus.cancelUnavailable)
|
||||
.appFont(size: 10.7, weight: .light)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
}
|
||||
@@ -72,7 +72,7 @@ struct LiveReservationStatusItemView: View {
|
||||
if item.cancelable {
|
||||
Spacer()
|
||||
|
||||
Text("예약\n취소")
|
||||
Text(I18n.MyPage.Reservation.LiveStatus.cancelAction)
|
||||
.appFont(size: 12, weight: .bold)
|
||||
.foregroundColor(Color(hex: "9970ff"))
|
||||
.padding(10.7)
|
||||
|
||||
@@ -14,7 +14,7 @@ struct LiveReservationStatusView: View {
|
||||
var body: some View {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: "라이브 예약 현황")
|
||||
DetailNavigationBar(title: I18n.MyPage.Reservation.LiveStatus.title)
|
||||
|
||||
if viewModel.reservationStatusItems.count > 0 {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
@@ -26,7 +26,7 @@ struct LiveReservationStatusView: View {
|
||||
.padding(.vertical, 13.3)
|
||||
}
|
||||
} else {
|
||||
Text("예약한 라이브가 없습니다.")
|
||||
Text(I18n.MyPage.Reservation.LiveStatus.emptyMessage)
|
||||
.appFont(size: 15, weight: .medium)
|
||||
.foregroundColor(Color(hex: "bbbbbb"))
|
||||
.frame(maxHeight: .infinity)
|
||||
|
||||
@@ -20,7 +20,13 @@ final class LiveReservationStatusViewModel: ObservableObject {
|
||||
@Published var reservationStatusItems = [GetLiveReservationResponse]()
|
||||
@Published var selectedReservationStatusItem: GetLiveReservationResponse?
|
||||
|
||||
let cancelReasons = ["중요한 개인일정이 생겨서", "다른 라이브에 참여하고 싶어서", "라이브 참여자 중 불편한 사람이 있어서", "참여비용이 부담되서", "기타"]
|
||||
let cancelReasons = [
|
||||
I18n.MyPage.Reservation.Cancel.reasonPersonalSchedule,
|
||||
I18n.MyPage.Reservation.Cancel.reasonOtherLive,
|
||||
I18n.MyPage.Reservation.Cancel.reasonUncomfortableParticipant,
|
||||
I18n.MyPage.Reservation.Cancel.reasonPriceBurden,
|
||||
I18n.MyPage.Reservation.Cancel.reasonEtc
|
||||
]
|
||||
@Published var cancelReasonSelectedIndex = -1
|
||||
@Published var reason = ""
|
||||
|
||||
@@ -51,13 +57,13 @@ final class LiveReservationStatusViewModel: ObservableObject {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} catch {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
@@ -89,13 +95,13 @@ final class LiveReservationStatusViewModel: ObservableObject {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} catch {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
@@ -104,7 +110,7 @@ final class LiveReservationStatusViewModel: ObservableObject {
|
||||
|
||||
func cancelReservation(reservationId: Int) {
|
||||
if cancelReasonSelectedIndex < 0 || (cancelReasonSelectedIndex == self.cancelReasons.count - 1 && self.reason.trimmingCharacters(in: .whitespaces).count <= 0) {
|
||||
self.errorMessage = "취소이유를 선택해주세요."
|
||||
self.errorMessage = I18n.MyPage.Reservation.Cancel.reasonRequired
|
||||
self.isShowPopup = true
|
||||
return
|
||||
}
|
||||
@@ -134,13 +140,13 @@ final class LiveReservationStatusViewModel: ObservableObject {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} catch {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user