feat(i18n): 마이페이지 그룹 3~5 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -16,16 +16,16 @@ struct NicknameUpdateView: View {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
GeometryReader { proxy in
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: "프로필 수정")
|
||||
DetailNavigationBar(title: I18n.MyPage.Main.editProfile)
|
||||
|
||||
Text("닉네임 변경으로 인해 피해를 입는 사용자가 지속적으로 발생하여 닉네임 변경을 부득이하게 유료로 전환합니다.")
|
||||
Text(I18n.MyPage.Nickname.paidChangeNotice)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.frame(width: screenSize().width - 40, alignment: .leading)
|
||||
.padding(.top, 40)
|
||||
|
||||
Text("최초 1회에 한해서 무료로 변경이 가능하고, 그 이후부터는 유료로 전환됩니다.")
|
||||
Text(I18n.MyPage.Nickname.firstFreeNotice)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color(hex: "dd4500"))
|
||||
@@ -40,7 +40,7 @@ struct NicknameUpdateView: View {
|
||||
.frame(width: screenSize().width - 40)
|
||||
.padding(.top, 40)
|
||||
|
||||
Text("중복확인")
|
||||
Text(I18n.MyPage.Nickname.duplicateCheckAction)
|
||||
.appFont(size: 13.3, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.frame(width: screenSize().width - 40)
|
||||
@@ -57,7 +57,7 @@ struct NicknameUpdateView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text(viewModel.price > 0 ? "\(viewModel.price)캔으로 닉네임 변경하기" : "닉네임 변경하기")
|
||||
Text(viewModel.price > 0 ? I18n.MyPage.Nickname.changeActionWithCans(viewModel.price) : I18n.MyPage.Nickname.changeAction)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color.white)
|
||||
.padding(.vertical, 16)
|
||||
|
||||
@@ -56,14 +56,14 @@ final class NicknameUpdateViewModel: ObservableObject {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} catch {
|
||||
ERROR_LOG(error.localizedDescription)
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
@@ -92,25 +92,25 @@ final class NicknameUpdateViewModel: ObservableObject {
|
||||
|
||||
if decoded.success {
|
||||
self.isCheckedNickname = true
|
||||
self.errorMessage = "사용가능한 닉네임 입니다."
|
||||
self.errorMessage = I18n.MyPage.Nickname.available
|
||||
self.isShowPopup = true
|
||||
} else {
|
||||
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 {
|
||||
self.errorMessage = "닉네임을 입력하세요."
|
||||
self.errorMessage = I18n.MyPage.Nickname.empty
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ final class NicknameUpdateViewModel: ObservableObject {
|
||||
|
||||
if decoded.success {
|
||||
UserDefaults.set(nickname, forKey: .nickname)
|
||||
self.errorMessage = "닉네임이 변경되었습니다."
|
||||
self.errorMessage = I18n.MyPage.Nickname.changed
|
||||
self.isShowPopup = true
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
@@ -148,20 +148,20 @@ final class NicknameUpdateViewModel: 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 {
|
||||
self.errorMessage = "닉네임 중복체크를 해주세요."
|
||||
self.errorMessage = I18n.MyPage.Nickname.duplicateCheckRequired
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user