쿠폰 및 공지 화면 다국어 적용

This commit is contained in:
Yu Sung
2025-12-19 19:20:28 +09:00
parent ee4b7c9a79
commit a406935e4f
6 changed files with 222 additions and 68 deletions

View File

@@ -17,16 +17,16 @@ struct CanCouponView: View {
BaseView(isLoading: $viewModel.isLoading) {
GeometryReader { proxy in
VStack(spacing: 0) {
DetailNavigationBar(title: "쿠폰등록")
DetailNavigationBar(title: I18n.CanCoupon.title)
ScrollView(.vertical, showsIndicators: false) {
VStack(spacing: 0) {
Text("쿠폰번호 입력")
Text(I18n.CanCoupon.inputTitle)
.font(.custom(Font.bold.rawValue, size: 16.7))
.foregroundColor(Color(hex: "eeeeee"))
.frame(maxWidth: .infinity, alignment: .leading)
TextField("쿠폰번호를 입력하세요", text: $viewModel.couponNumber)
TextField(I18n.CanCoupon.inputPlaceholder, text: $viewModel.couponNumber)
.autocapitalization(.allCharacters) // Force uppercase keyboard
.textContentType(.none)
.disableAutocorrection(true)
@@ -45,7 +45,7 @@ struct CanCouponView: View {
}
}
Text("등록하기")
Text(I18n.CanCoupon.submit)
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(.white)
.padding(.vertical, 16)
@@ -58,17 +58,17 @@ struct CanCouponView: View {
}
VStack(alignment: .leading, spacing: 0) {
Text("[등록 및 사용안내]")
Text(I18n.CanCoupon.guideHeader)
.font(.custom(Font.bold.rawValue, size: 13.3))
.foregroundColor(.grayee)
CanCouponNoticeItemView(notice: "공백없이 쿠폰번호 12자리를 입력해주세요.")
CanCouponNoticeItemView(notice: I18n.CanCoupon.guide1)
.padding(.top, 8)
CanCouponNoticeItemView(notice: "충전된 캔 또는 포인트는 해당 충전현황에서 확인할 수 있습니다")
CanCouponNoticeItemView(notice: I18n.CanCoupon.guide2)
.padding(.top, 4)
CanCouponNoticeItemView(notice: "쿠폰으로 충전된 캔은 사용 전까지 소멸되지 않으며, 포인트는 충전 후 72시간 이내에 사용하지 않으면 자동 소멸됩니다.")
CanCouponNoticeItemView(notice: I18n.CanCoupon.guide3)
.padding(.top, 4)
Rectangle()
@@ -77,23 +77,23 @@ struct CanCouponView: View {
.background(Color.gray55)
.padding(.vertical, 26.7)
Text("[주의사항]")
Text(I18n.CanCoupon.cautionHeader)
.font(.custom(Font.bold.rawValue, size: 13.3))
.foregroundColor(.grayee)
CanCouponNoticeItemView(notice: "이벤트 쿠폰을 통해 충전한 캔이나 포인트는 환불되지 않습니다.")
CanCouponNoticeItemView(notice: I18n.CanCoupon.caution1)
.padding(.top, 8)
CanCouponNoticeItemView(notice: "쿠폰은 상업적 용도로 사용하거나 매매할 수 없습니다.")
CanCouponNoticeItemView(notice: I18n.CanCoupon.caution2)
.padding(.top, 4)
CanCouponNoticeItemView(notice: "한번 등록한 쿠폰은 재사용이 불가합니다.")
CanCouponNoticeItemView(notice: I18n.CanCoupon.caution3)
.padding(.top, 4)
CanCouponNoticeItemView(notice: "연령 제한 정책에 따라 쿠폰이용은 본인인증한 회원만 이용 가능합니다.")
CanCouponNoticeItemView(notice: I18n.CanCoupon.caution4)
.padding(.top, 4)
Text("※ 쿠폰 등록 및 이용에 문제가 발생한 경우 '고객센터'로 문의주시기 바랍니다.")
Text(I18n.CanCoupon.contactHelp)
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(.grayee)
.fixedSize(horizontal: false, vertical: true)

View File

@@ -42,7 +42,7 @@ final class CanCouponViewModel: ObservableObject {
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = "쿠폰 사용이 완료되었습니다."
self.errorMessage = I18n.CanCoupon.useCompleted
}
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
@@ -53,13 +53,13 @@ final class CanCouponViewModel: 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
}
}