feat(i18n): 사용자 화면 문구를 I18n 키로 통일한다

This commit is contained in:
Yu Sung
2026-03-31 17:37:29 +09:00
parent b2f66cf408
commit 8e4fe7a534
18 changed files with 551 additions and 256 deletions

View File

@@ -23,11 +23,11 @@ struct SignUpView: View {
BaseView(isLoading: $viewModel.isLoading) {
GeometryReader { proxy in
VStack(spacing: 0) {
DetailNavigationBar(title: "회원가입")
DetailNavigationBar(title: I18n.SignUp.title)
ScrollView(.vertical, showsIndicators: false) {
VStack(spacing: 0) {
TextField("이메일", text: $viewModel.email)
TextField(I18n.User.emailPlaceholder, text: $viewModel.email)
.submitLabel(.next)
.focused($focusedField, equals: .email)
.autocapitalization(.none)
@@ -51,9 +51,9 @@ struct SignUpView: View {
HStack {
Group {
if isPasswordVisible {
TextField("비밀번호", text: $viewModel.password)
TextField(I18n.User.passwordPlaceholder, text: $viewModel.password)
} else {
SecureField("비밀번호", text: $viewModel.password)
SecureField(I18n.User.passwordPlaceholder, text: $viewModel.password)
}
}
.submitLabel(.done)
@@ -96,11 +96,11 @@ struct SignUpView: View {
}
HStack(spacing: 5) {
Text("이용약관")
Text(I18n.SignUp.terms)
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.grayee)
Text("(필수)")
Text(I18n.SignUp.required)
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.button)
}
@@ -129,11 +129,11 @@ struct SignUpView: View {
}
HStack(spacing: 5) {
Text("개인정보수집 및 이용동의")
Text(I18n.SignUp.privacyPolicy)
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.grayee)
Text("(필수)")
Text(I18n.SignUp.required)
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.button)
}
@@ -152,7 +152,7 @@ struct SignUpView: View {
.padding(.top, 20)
.padding(.horizontal, 13.3)
Text("회원가입")
Text(I18n.SignUp.submit)
.appFont(size: 18.3, weight: .bold)
.foregroundColor(Color.white)
.padding(.vertical, 16)

View File

@@ -67,13 +67,13 @@ final class SignUpViewModel: 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
}
}
@@ -83,25 +83,25 @@ final class SignUpViewModel: ObservableObject {
private func validate() -> Bool {
if email.trimmingCharacters(in: .whitespaces).isEmpty || !validateEmail() {
errorMessage = "올바른 이메일을 입력하세요"
errorMessage = I18n.User.emailInvalid
isShowPopup = true
return false
}
if password.trimmingCharacters(in: .whitespaces).isEmpty {
errorMessage = "비밀번호를 입력하세요"
errorMessage = I18n.User.passwordRequired
isShowPopup = true
return false
}
if !validatePassword() {
errorMessage = "영문, 숫자 포함 8자 이상의 비밀번호를 입력해 주세요."
errorMessage = I18n.ProfileUpdate.passwordRuleHint
isShowPopup = true
return false
}
if !isAgreeTerms || !isAgreePrivacyPolicy {
errorMessage = "약관에 동의하셔야 회원가입이 가능합니다."
errorMessage = I18n.SignUp.agreementRequired
isShowPopup = true
return false
}