feat(i18n): 마이페이지 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -25,7 +25,7 @@ struct CanChargeView: View {
|
||||
var body: some View {
|
||||
BaseView(isLoading: $storeManager.isLoading) {
|
||||
VStack(spacing: 13.3) {
|
||||
DetailNavigationBar(title: "충전하기")
|
||||
DetailNavigationBar(title: I18n.MyPage.Can.chargeTitle)
|
||||
|
||||
if UserDefaults.bool(forKey: .auth) {
|
||||
CanChargeTabView(currentTab: $currentTab)
|
||||
@@ -121,16 +121,7 @@ struct CanPgItemView: View {
|
||||
|
||||
// MARK: - Localize "캔" unit inside arbitrary text based on current app language
|
||||
fileprivate func localizeCanWord(in text: String) -> String {
|
||||
let unit: String
|
||||
switch LanguageHeaderProvider.current {
|
||||
case "ko":
|
||||
unit = "캔"
|
||||
case "ja":
|
||||
unit = "can"
|
||||
default:
|
||||
unit = "cans"
|
||||
}
|
||||
return text.replacingOccurrences(of: "캔", with: unit)
|
||||
text.replacingOccurrences(of: I18n.MyPage.Can.koreanUnitToken, with: I18n.MyPage.Can.localizedUnit)
|
||||
}
|
||||
|
||||
struct CanChargeTabView: View {
|
||||
|
||||
@@ -43,13 +43,13 @@ final class CanChargeViewModel: 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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import SwiftUI
|
||||
struct CanChargeCouponButtonView: View {
|
||||
var body: some View {
|
||||
HStack(spacing: 5.3) {
|
||||
Text("쿠폰 등록")
|
||||
Text(I18n.MyPage.Can.couponRegisterButton)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ struct CanPaymentView: View {
|
||||
|
||||
GeometryReader { proxy in
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: "결제하기")
|
||||
DetailNavigationBar(title: I18n.MyPage.Can.Payment.title)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(spacing: 0) {
|
||||
@@ -63,7 +63,7 @@ struct CanPaymentView: View {
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text("구매조건 확인 및 결제 진행 동의")
|
||||
Text(I18n.MyPage.Can.Payment.termsAgreement)
|
||||
.appFont(size: 14.7, weight: .medium)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
}
|
||||
@@ -79,7 +79,7 @@ struct CanPaymentView: View {
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
|
||||
Text("결제 취소는 결제 후 7일 이내에만 할 수 있습니다.\n단, 캔의 일부를 사용하면 결제 취소를 할 수 없습니다.")
|
||||
Text(I18n.MyPage.Can.Payment.noticeCancellationPolicy)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -91,7 +91,7 @@ struct CanPaymentView: View {
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
|
||||
Text("광고성 이벤트 등 회사가 무료로 지급한 포인트는 환불되지 않습니다.")
|
||||
Text(I18n.MyPage.Can.Payment.noticeEventPointNoRefund)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -103,7 +103,7 @@ struct CanPaymentView: View {
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
|
||||
Text("자세한 내용은 보이스온 이용약관에서 확인할 수 있습니다.")
|
||||
Text(I18n.MyPage.Can.Payment.noticeTermsReference)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -118,7 +118,7 @@ struct CanPaymentView: View {
|
||||
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("결제금액")
|
||||
Text(I18n.MyPage.Can.Payment.amountTitle)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
@@ -131,7 +131,7 @@ struct CanPaymentView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("결제하기")
|
||||
Text(I18n.MyPage.Can.Payment.payAction)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
.padding(.vertical, 16)
|
||||
@@ -144,7 +144,7 @@ struct CanPaymentView: View {
|
||||
storeManager.payment(product: product, chargeId: chargeId)
|
||||
}
|
||||
} else {
|
||||
viewModel.errorMessage = "결제진행에 동의하셔야 결제가 가능합니다."
|
||||
viewModel.errorMessage = I18n.MyPage.Can.Payment.agreementRequired
|
||||
viewModel.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,13 +49,13 @@ final class CanPaymentViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -86,13 +86,13 @@ final class CanPaymentViewModel: 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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ struct CanPgPaymentView: View {
|
||||
.onError {
|
||||
DEBUG_LOG("onError: \($0)")
|
||||
viewModel.isShowPaymentView = false
|
||||
viewModel.errorMessage = "결제 중 오류가 발생했습니다."
|
||||
viewModel.errorMessage = I18n.MyPage.Can.Payment.inProgressError
|
||||
viewModel.isShowPopup = true
|
||||
}
|
||||
.onDone {
|
||||
@@ -72,7 +72,7 @@ struct CanPgPaymentView: View {
|
||||
.ignoresSafeArea(edges: .bottom)
|
||||
HStack(spacing: 8) {
|
||||
Button(action: { showExitConfirm = true }) {
|
||||
Text("닫기")
|
||||
Text(I18n.MyPage.Can.Payment.closeAction)
|
||||
.appFont(size: 14, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
.padding(.horizontal, 12)
|
||||
@@ -86,21 +86,21 @@ struct CanPgPaymentView: View {
|
||||
}
|
||||
}
|
||||
.background(Color.black.ignoresSafeArea())
|
||||
.alert("결제를 종료할까요?", isPresented: $showExitConfirm) {
|
||||
Button("계속", role: .cancel) { }
|
||||
Button("종료", role: .destructive) {
|
||||
.alert(I18n.MyPage.Can.Payment.exitConfirmTitle, isPresented: $showExitConfirm) {
|
||||
Button(I18n.MyPage.Can.Payment.continueAction, role: .cancel) { }
|
||||
Button(I18n.MyPage.Can.Payment.exitAction, role: .destructive) {
|
||||
DEBUG_LOG("Payverse: user requested to exit")
|
||||
viewModel.isShowPayversePaymentView = false
|
||||
// 필요 시 상위로 복귀
|
||||
AppState.shared.back()
|
||||
}
|
||||
} message: {
|
||||
Text("진행 중인 결제를 중단하고 이전 화면으로 돌아갑니다.")
|
||||
Text(I18n.MyPage.Can.Payment.exitConfirmMessage)
|
||||
}
|
||||
} else {
|
||||
GeometryReader { proxy in
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: "결제하기")
|
||||
DetailNavigationBar(title: I18n.MyPage.Can.Payment.title)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(spacing: 0) {
|
||||
@@ -129,14 +129,14 @@ struct CanPgPaymentView: View {
|
||||
.frame(width: screenSize().width)
|
||||
.padding(.top, 13.3)
|
||||
|
||||
Text("결제 수단 선택")
|
||||
Text(I18n.MyPage.Can.Payment.selectMethod)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
.padding(.top, 26.7)
|
||||
|
||||
HStack(spacing: 16.7) {
|
||||
Text("통합 결제")
|
||||
Text(I18n.MyPage.Can.Payment.unifiedMethod)
|
||||
.appFont(size: 16.7, weight: viewModel.paymentMethod == .unified ? .bold : .medium)
|
||||
.foregroundColor(viewModel.paymentMethod == .unified ? Color.button : Color.grayee)
|
||||
.frame(maxWidth: .infinity)
|
||||
@@ -179,7 +179,7 @@ struct CanPgPaymentView: View {
|
||||
}
|
||||
}
|
||||
|
||||
Text("휴대폰 결제")
|
||||
Text(I18n.MyPage.Can.Payment.phoneMethod)
|
||||
.appFont(size: 16.7, weight: viewModel.paymentMethod == .phone ? .bold : .medium)
|
||||
.foregroundColor(viewModel.paymentMethod == .phone ? Color.button : Color.grayee)
|
||||
.frame(maxWidth: .infinity)
|
||||
@@ -209,7 +209,7 @@ struct CanPgPaymentView: View {
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text("구매조건 확인 및 결제 진행 동의")
|
||||
Text(I18n.MyPage.Can.Payment.termsAgreement)
|
||||
.appFont(size: 14.7, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
@@ -225,7 +225,7 @@ struct CanPgPaymentView: View {
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("충전된 캔의 유효기간은 충전 후 5년 입니다.")
|
||||
Text(I18n.MyPage.Can.Payment.noticeCanExpiry)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -238,7 +238,7 @@ struct CanPgPaymentView: View {
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("결제 취소는 결제 후 7일 이내에만 할 수 있습니다.\n단, 캔의 일부를 사용하면 결제 취소를 할 수 없습니다.")
|
||||
Text(I18n.MyPage.Can.Payment.noticeCancellationPolicy)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -250,7 +250,7 @@ struct CanPgPaymentView: View {
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("광고성 이벤트 등 회사가 무료로 지급한 포인트는 환불되지 않습니다.")
|
||||
Text(I18n.MyPage.Can.Payment.noticeEventPointNoRefund)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -262,7 +262,7 @@ struct CanPgPaymentView: View {
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("자세한 내용은 보이스온 이용약관에서 확인할 수 있습니다.")
|
||||
Text(I18n.MyPage.Can.Payment.noticeTermsReference)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -276,7 +276,7 @@ struct CanPgPaymentView: View {
|
||||
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("결제금액")
|
||||
Text(I18n.MyPage.Can.Payment.amountTitle)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
@@ -289,7 +289,7 @@ struct CanPgPaymentView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("결제하기")
|
||||
Text(I18n.MyPage.Can.Payment.payAction)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
.padding(.vertical, 16)
|
||||
@@ -298,10 +298,10 @@ struct CanPgPaymentView: View {
|
||||
.cornerRadius(10)
|
||||
.onTapGesture {
|
||||
if viewModel.paymentMethod == nil {
|
||||
viewModel.errorMessage = "결제수단을 선택해 주세요."
|
||||
viewModel.errorMessage = I18n.MyPage.Can.Payment.methodRequired
|
||||
viewModel.isShowPopup = true
|
||||
} else if !viewModel.isTermsAgree {
|
||||
viewModel.errorMessage = "결제진행에 동의하셔야 결제가 가능합니다."
|
||||
viewModel.errorMessage = I18n.MyPage.Can.Payment.agreementRequired
|
||||
viewModel.isShowPopup = true
|
||||
} else {
|
||||
if viewModel.paymentMethod == .unified {
|
||||
@@ -317,7 +317,7 @@ struct CanPgPaymentView: View {
|
||||
|
||||
viewModel.isShowPaymentView = true
|
||||
} else {
|
||||
viewModel.errorMessage = "결제도중 오류가 발생했습니다.\n고객센터로 문의주시기 바랍니다."
|
||||
viewModel.errorMessage = I18n.MyPage.Can.Payment.failedWithSupport
|
||||
viewModel.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,13 +78,13 @@ final class CanPgPaymentViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ final class CanPgPaymentViewModel: ObservableObject {
|
||||
let decoded = try jsonDecoder.decode(ApiResponseWithoutData.self, from: responseData)
|
||||
|
||||
if decoded.success {
|
||||
self.errorMessage = "캔이 충전되었습니다"
|
||||
self.errorMessage = I18n.MyPage.Can.Payment.chargeCompleted
|
||||
self.isShowPopup = true
|
||||
|
||||
onSuccess()
|
||||
@@ -125,20 +125,20 @@ final class CanPgPaymentViewModel: 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
|
||||
}
|
||||
}
|
||||
.store(in: &subscription)
|
||||
} else {
|
||||
isLoading = false
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
isShowPopup = true
|
||||
}
|
||||
}
|
||||
@@ -171,7 +171,7 @@ final class CanPgPaymentViewModel: ObservableObject {
|
||||
self.payversePayloadJson = String(data: merged, encoding: .utf8)!
|
||||
self.isShowPayversePaymentView = true
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
return
|
||||
}
|
||||
@@ -179,13 +179,13 @@ final class CanPgPaymentViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,7 @@ final class CanPgPaymentViewModel: ObservableObject {
|
||||
|
||||
func handleVerifyOpenURL(_ url: URL) {
|
||||
guard let comps = URLComponents(url: url, resolvingAgainstBaseURL: false) else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
return
|
||||
}
|
||||
@@ -208,7 +208,7 @@ final class CanPgPaymentViewModel: ObservableObject {
|
||||
resultStatus == "DECLINE" ||
|
||||
orderId == nil || orderId?.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty == true ||
|
||||
tid == nil || tid?.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty == true {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
AppState.shared.back()
|
||||
@@ -265,13 +265,13 @@ final class CanPgPaymentViewModel: 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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ struct CanPaymentTempView: View {
|
||||
.onError {
|
||||
DEBUG_LOG("onError: \($0)")
|
||||
viewModel.isShowPaymentView = false
|
||||
viewModel.errorMessage = "결제 중 오류가 발생했습니다."
|
||||
viewModel.errorMessage = I18n.MyPage.Can.Payment.inProgressError
|
||||
viewModel.isShowPopup = true
|
||||
}
|
||||
.onDone {
|
||||
@@ -65,7 +65,7 @@ struct CanPaymentTempView: View {
|
||||
} else {
|
||||
GeometryReader { proxy in
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: "결제하기")
|
||||
DetailNavigationBar(title: I18n.MyPage.Can.Payment.title)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(spacing: 0) {
|
||||
@@ -77,7 +77,7 @@ struct CanPaymentTempView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("\(self.can * 110) 원")
|
||||
Text(I18n.MyPage.Can.Payment.wonAmount(self.can * 110))
|
||||
.appFont(size: 15.3, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
@@ -89,7 +89,7 @@ struct CanPaymentTempView: View {
|
||||
.frame(width: screenSize().width)
|
||||
.padding(.top, 13.3)
|
||||
|
||||
Text("결제 수단 선택")
|
||||
Text(I18n.MyPage.Can.Payment.selectMethod)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
@@ -97,7 +97,7 @@ struct CanPaymentTempView: View {
|
||||
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
Text("카드")
|
||||
Text(I18n.MyPage.Can.Payment.cardMethod)
|
||||
.appFont(size: 16.7, weight: viewModel.paymentMethod == .card ? .bold : .medium)
|
||||
.foregroundColor(viewModel.paymentMethod == .card ? Color.button : Color.grayee)
|
||||
.frame(width: (screenSize().width - 40) / 2)
|
||||
@@ -120,7 +120,7 @@ struct CanPaymentTempView: View {
|
||||
}
|
||||
|
||||
|
||||
Text("계좌이체")
|
||||
Text(I18n.MyPage.Can.Payment.bankTransferMethod)
|
||||
.appFont(size: 16.7, weight: viewModel.paymentMethod == .bank ? .bold : .medium)
|
||||
.foregroundColor(viewModel.paymentMethod == .bank ? Color.button : Color.grayee)
|
||||
.frame(width: (screenSize().width - 40) / 2)
|
||||
@@ -146,7 +146,7 @@ struct CanPaymentTempView: View {
|
||||
.padding(.top, 16.7)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
Text("휴대폰 결제")
|
||||
Text(I18n.MyPage.Can.Payment.phoneMethod)
|
||||
.appFont(size: 16.7, weight: viewModel.paymentMethod == .phone ? .bold : .medium)
|
||||
.foregroundColor(viewModel.paymentMethod == .phone ? Color.button : Color.grayee)
|
||||
.frame(width: (screenSize().width - 40) / 2)
|
||||
@@ -178,7 +178,7 @@ struct CanPaymentTempView: View {
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text("구매조건 확인 및 결제 진행 동의")
|
||||
Text(I18n.MyPage.Can.Payment.termsAgreement)
|
||||
.appFont(size: 14.7, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
@@ -194,12 +194,12 @@ struct CanPaymentTempView: View {
|
||||
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("결제금액")
|
||||
Text(I18n.MyPage.Can.Payment.amountTitle)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("\(self.can * 110) 원")
|
||||
Text(I18n.MyPage.Can.Payment.wonAmount(self.can * 110))
|
||||
.appFont(size: 23.3, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
@@ -207,7 +207,7 @@ struct CanPaymentTempView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("결제하기")
|
||||
Text(I18n.MyPage.Can.Payment.payAction)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
.padding(.vertical, 16)
|
||||
@@ -216,10 +216,10 @@ struct CanPaymentTempView: View {
|
||||
.cornerRadius(10)
|
||||
.onTapGesture {
|
||||
if viewModel.paymentMethod == nil {
|
||||
viewModel.errorMessage = "결제수단을 선택해 주세요."
|
||||
viewModel.errorMessage = I18n.MyPage.Can.Payment.methodRequired
|
||||
viewModel.isShowPopup = true
|
||||
} else if !viewModel.isTermsAgree {
|
||||
viewModel.errorMessage = "결제진행에 동의하셔야 결제가 가능합니다."
|
||||
viewModel.errorMessage = I18n.MyPage.Can.Payment.agreementRequired
|
||||
viewModel.isShowPopup = true
|
||||
} else {
|
||||
viewModel.chargeCan(can: can, paymentGateway: .PG){
|
||||
|
||||
@@ -65,13 +65,13 @@ final class CanPaymentTempViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -109,20 +109,20 @@ final class CanPaymentTempViewModel: 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
|
||||
}
|
||||
}
|
||||
.store(in: &subscription)
|
||||
} else {
|
||||
isLoading = false
|
||||
errorMessage = "본인인증 중 오류가 발생했습니다."
|
||||
errorMessage = I18n.Main.Auth.authenticationError
|
||||
isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ struct CanStatusView: View {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
GeometryReader { proxy in
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: String(localized: "캔내역")) {
|
||||
DetailNavigationBar(title: I18n.MyPage.Can.statusTitle) {
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ struct CanStatusView: View {
|
||||
|
||||
HStack(spacing: 26.7) {
|
||||
VStack(spacing: 10) {
|
||||
Text("결제 캔")
|
||||
Text(I18n.MyPage.Can.paidCan)
|
||||
.appFont(size: 12, weight: .light)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
|
||||
@@ -44,7 +44,7 @@ struct CanStatusView: View {
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
Text(" 캔")
|
||||
Text(" \(I18n.MyPage.Can.localizedUnit)")
|
||||
.appFont(size: 10.7, weight: .medium)
|
||||
.foregroundColor(Color(hex: "bbbbbb"))
|
||||
}
|
||||
@@ -56,7 +56,7 @@ struct CanStatusView: View {
|
||||
.foregroundColor(Color(hex: "909090").opacity(0.5))
|
||||
|
||||
VStack(spacing: 10) {
|
||||
Text("리워드 캔")
|
||||
Text(I18n.MyPage.Can.rewardCan)
|
||||
.appFont(size: 12, weight: .light)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
|
||||
@@ -65,7 +65,7 @@ struct CanStatusView: View {
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
Text(" 캔")
|
||||
Text(" \(I18n.MyPage.Can.localizedUnit)")
|
||||
.appFont(size: 10.7, weight: .medium)
|
||||
.foregroundColor(Color(hex: "bbbbbb"))
|
||||
}
|
||||
@@ -82,7 +82,7 @@ struct CanStatusView: View {
|
||||
HStack(spacing: 0) {
|
||||
VStack(spacing: 0) {
|
||||
Spacer()
|
||||
Text("충전내역")
|
||||
Text(I18n.MyPage.Can.chargeHistory)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(
|
||||
Color(hex: viewModel.currentTab == .charge ? "eeeeee" : "777777")
|
||||
@@ -104,7 +104,7 @@ struct CanStatusView: View {
|
||||
|
||||
VStack(spacing: 0) {
|
||||
Spacer()
|
||||
Text("사용내역")
|
||||
Text(I18n.MyPage.Can.useHistory)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(
|
||||
Color(hex: viewModel.currentTab == .use ? "eeeeee" : "777777")
|
||||
@@ -142,7 +142,7 @@ struct CanStatusView: View {
|
||||
.resizable()
|
||||
.frame(width: 26.7, height: 26.7)
|
||||
|
||||
Text("충전하기")
|
||||
Text(I18n.MyPage.Can.chargeAction)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color(hex: "1313bc"))
|
||||
}
|
||||
|
||||
@@ -52,13 +52,13 @@ final class CanStatusViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -90,13 +90,13 @@ final class CanStatusViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -128,13 +128,13 @@ final class CanStatusViewModel: 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