feat(i18n): 마이페이지 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -40,7 +40,7 @@ struct MyPageView: View {
|
||||
}
|
||||
.onError {
|
||||
DEBUG_LOG("onError: \($0)")
|
||||
viewModel.errorMessage = "본인인증 중 오류가 발생했습니다."
|
||||
viewModel.errorMessage = I18n.Main.Auth.authenticationError
|
||||
viewModel.isShowPopup = true
|
||||
viewModel.isShowAuthView = false
|
||||
}
|
||||
@@ -77,7 +77,7 @@ struct MyPageView: View {
|
||||
.padding(.horizontal, 24)
|
||||
} else {
|
||||
HStack {
|
||||
Text("LOGIN")
|
||||
Text(I18n.MyPage.Main.login)
|
||||
.appFont(size: 32, weight: .bold)
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
@@ -93,7 +93,7 @@ struct MyPageView: View {
|
||||
}
|
||||
|
||||
if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue {
|
||||
Text("내 채널 보기")
|
||||
Text(I18n.MyPage.Main.viewMyChannel)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
.foregroundColor(Color.white)
|
||||
.padding(.vertical, 12)
|
||||
@@ -229,7 +229,7 @@ struct UpdateBannerView: View {
|
||||
Spacer()
|
||||
|
||||
HStack(spacing: 2) {
|
||||
Text("자세히")
|
||||
Text(I18n.MyPage.Main.detail)
|
||||
.appFont(size: 16)
|
||||
.foregroundColor(Color(hex: "B0BEC5"))
|
||||
|
||||
@@ -273,7 +273,7 @@ struct ProfileSectionView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
Button("프로필 수정") {
|
||||
Button(I18n.MyPage.Main.editProfile) {
|
||||
if AppState.shared.roomId <= 0 {
|
||||
AppState.shared.setAppStep(step: .profileUpdate(refresh: refresh))
|
||||
}
|
||||
@@ -325,7 +325,7 @@ struct CanPointCardsView: View {
|
||||
Spacer()
|
||||
|
||||
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||
Button("캔 충전") {
|
||||
Button(I18n.MyPage.Can.chargeCansAction) {
|
||||
AppState.shared.setAppStep(step: .canCharge(refresh: refresh))
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
@@ -394,44 +394,44 @@ struct CategoryButtonsView: View {
|
||||
|
||||
var body: some View {
|
||||
LazyVGrid(columns: Array(repeating: GridItem(.flexible()), count: 4), spacing: 16) {
|
||||
CategoryButtonItem(icon: "ic_my_storage", title: "보관함") {
|
||||
CategoryButtonItem(icon: "ic_my_storage", title: I18n.MyPage.Category.storage) {
|
||||
AppState.shared.setAppStep(step: .myBox(currentTab: .orderlist))
|
||||
}
|
||||
|
||||
CategoryButtonItem(icon: "ic_my_block", title: "차단목록") {
|
||||
CategoryButtonItem(icon: "ic_my_block", title: I18n.MyPage.Category.blockList) {
|
||||
AppState.shared.setAppStep(step: .blockList)
|
||||
}
|
||||
|
||||
CategoryButtonItem(
|
||||
icon: "ic_my_coupon",
|
||||
title: "쿠폰등록"
|
||||
title: I18n.MyPage.Category.couponRegister
|
||||
) {
|
||||
if isAuthenticated {
|
||||
AppState.shared.setAppStep(step: .canCoupon(refresh: refresh))
|
||||
} else {
|
||||
showMessage("본인인증 후 등록합니다.")
|
||||
showMessage(I18n.MyPage.Auth.verifyRequiredBeforeCoupon)
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
isShowAuthView = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CategoryButtonItem(icon: "ic_my_notice", title: "공지사항") {
|
||||
CategoryButtonItem(icon: "ic_my_notice", title: I18n.MyPage.Category.notice) {
|
||||
AppState.shared.setAppStep(step: .notices)
|
||||
}
|
||||
|
||||
CategoryButtonItem(icon: "ic_my_event", title: "이벤트") {
|
||||
CategoryButtonItem(icon: "ic_my_event", title: I18n.MyPage.Category.event) {
|
||||
AppState.shared.setAppStep(step: .events)
|
||||
}
|
||||
|
||||
CategoryButtonItem(icon: "ic_my_service_center", title: "고객센터") {
|
||||
CategoryButtonItem(icon: "ic_my_service_center", title: I18n.MyPage.Category.customerCenter) {
|
||||
AppState.shared.setAppStep(step: .serviceCenter)
|
||||
}
|
||||
|
||||
if isKoreanCountry {
|
||||
CategoryButtonItem(
|
||||
icon: "ic_my_auth",
|
||||
title: isAuthenticated ? "인증완료" : "본인인증"
|
||||
title: isAuthenticated ? I18n.MyPage.Auth.verified : I18n.Main.Auth.dialogTitle
|
||||
) {
|
||||
if !isAuthenticated {
|
||||
isShowAuthView = true
|
||||
@@ -444,7 +444,7 @@ struct CategoryButtonsView: View {
|
||||
|
||||
struct CategoryButtonItem: View {
|
||||
let icon: String
|
||||
let title: LocalizedStringResource
|
||||
let title: String
|
||||
let onClick: () -> Void
|
||||
|
||||
var body: some View {
|
||||
@@ -475,7 +475,7 @@ struct RecentContentSection: View {
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 14) {
|
||||
HStack(spacing: 0) {
|
||||
Text("최근 들은 ")
|
||||
Text(I18n.MyPage.Main.recentlyListenedPrefix)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
.foregroundColor(Color(hex: "B0BEC5"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user