feat(i18n): 오디션 화면 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -28,7 +28,7 @@ struct AuditionDetailRoleItemView: View {
|
||||
.opacity(item.isComplete ? 0.7 : 0.0)
|
||||
)
|
||||
|
||||
Text(item.isComplete ? "모집완료" : "모집중")
|
||||
Text(item.isComplete ? I18n.Audition.Detail.recruitmentClosed : I18n.Audition.Detail.recruiting)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.white)
|
||||
.padding(.horizontal, 9)
|
||||
|
||||
@@ -45,7 +45,7 @@ struct AuditionRoleDetailView: View {
|
||||
|
||||
HStack(spacing: 14) {
|
||||
if let url = URL(string: roleDetail.originalWorkUrl), UIApplication.shared.canOpenURL(url) {
|
||||
Text("원작 보러가기")
|
||||
Text(I18n.Audition.Detail.viewOriginalWork)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
.foregroundColor(Color.button)
|
||||
.padding(.vertical, 12)
|
||||
@@ -59,7 +59,7 @@ struct AuditionRoleDetailView: View {
|
||||
}
|
||||
|
||||
if let url = URL(string: roleDetail.auditionScriptUrl), UIApplication.shared.canOpenURL(url) {
|
||||
Text("오디션 대본 확인")
|
||||
Text(I18n.Audition.Detail.checkScript)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
.foregroundColor(Color.button)
|
||||
.padding(.vertical, 12)
|
||||
@@ -74,7 +74,7 @@ struct AuditionRoleDetailView: View {
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 13.3) {
|
||||
Text("오디션 캐릭터 정보")
|
||||
Text(I18n.Audition.Detail.characterInfo)
|
||||
.appFont(size: 14.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
@@ -83,13 +83,13 @@ struct AuditionRoleDetailView: View {
|
||||
}
|
||||
|
||||
if viewModel.applicantList.isEmpty {
|
||||
Text("지원자가 없습니다.")
|
||||
Text(I18n.Audition.Detail.noApplicants)
|
||||
.appFont(size: 13, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
.padding(.top, 15)
|
||||
} else {
|
||||
HStack(spacing: 0) {
|
||||
Text("참여자")
|
||||
Text(I18n.Audition.Detail.participants)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.graybb)
|
||||
|
||||
@@ -98,13 +98,13 @@ struct AuditionRoleDetailView: View {
|
||||
.foregroundColor(Color.button)
|
||||
.padding(.leading, 2.3)
|
||||
|
||||
Text("명")
|
||||
Text(I18n.Audition.Detail.personUnit)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.graybb)
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("최신순")
|
||||
Text(I18n.Audition.Detail.sortNewest)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(
|
||||
viewModel.sortType == .NEWEST ? Color.button : Color.graybb
|
||||
@@ -113,7 +113,7 @@ struct AuditionRoleDetailView: View {
|
||||
viewModel.setSortType(sortType: .NEWEST)
|
||||
}
|
||||
|
||||
Text("좋아요순")
|
||||
Text(I18n.Audition.Detail.sortLikes)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(
|
||||
viewModel.sortType == .LIKES ? Color.button : Color.graybb
|
||||
@@ -161,7 +161,7 @@ struct AuditionRoleDetailView: View {
|
||||
}
|
||||
|
||||
if let roleDetail = viewModel.auditionRoleDetail {
|
||||
Text(roleDetail.isAlreadyApplicant ? "오디션 재지원" : "오디션 지원")
|
||||
Text(roleDetail.isAlreadyApplicant ? I18n.Audition.Apply.reapply : I18n.Audition.Apply.apply)
|
||||
.appFont(size: 15.3, weight: .bold)
|
||||
.foregroundColor(Color.white)
|
||||
.padding(14)
|
||||
@@ -241,9 +241,9 @@ struct AuditionRoleDetailView: View {
|
||||
|
||||
if isShowNoticeReapply {
|
||||
SodaDialog(
|
||||
title: "재지원 안내",
|
||||
desc: "재지원 시 이전 지원 내역은 삭제되며 받은 투표수는 무효 처리됩니다.",
|
||||
confirmButtonTitle: "확인"
|
||||
title: I18n.Audition.Apply.reapplyNoticeTitle,
|
||||
desc: I18n.Audition.Apply.reapplyNoticeDesc,
|
||||
confirmButtonTitle: I18n.Common.confirm
|
||||
) {
|
||||
isShowNoticeReapply = false
|
||||
isShowApplyMethodView = true
|
||||
@@ -252,9 +252,9 @@ struct AuditionRoleDetailView: View {
|
||||
|
||||
if isShowNoticeAuthView {
|
||||
SodaDialog(
|
||||
title: "- 본인인증 -",
|
||||
desc: "마이페이지에서 '본인인증'을 하고 다시 오디션에 지원해 주세요.",
|
||||
confirmButtonTitle: "확인"
|
||||
title: I18n.Audition.Apply.authRequiredTitle,
|
||||
desc: I18n.Audition.Apply.authRequiredDesc,
|
||||
confirmButtonTitle: I18n.Common.confirm
|
||||
) {
|
||||
isShowNoticeAuthView = false
|
||||
}
|
||||
@@ -264,7 +264,7 @@ struct AuditionRoleDetailView: View {
|
||||
SodaDialog(
|
||||
title: viewModel.dialogTitle,
|
||||
desc: viewModel.dialogDesc,
|
||||
confirmButtonTitle: "확인"
|
||||
confirmButtonTitle: I18n.Common.confirm
|
||||
) {
|
||||
viewModel.isShowVoteCompleteView = false
|
||||
viewModel.isShowNotifyVote = false
|
||||
@@ -300,17 +300,17 @@ struct AuditionRoleDetailView: View {
|
||||
viewModel.fileName = fileUrl.lastPathComponent
|
||||
isShowApplyView = true
|
||||
} else {
|
||||
viewModel.errorMessage = "콘텐츠 파일을 불러오지 못했습니다.\n다시 선택해 주세요"
|
||||
viewModel.errorMessage = I18n.Audition.Apply.fileLoadFailed
|
||||
viewModel.isShowPopup = true
|
||||
}
|
||||
} else {
|
||||
viewModel.errorMessage = "콘텐츠 파일을 불러오지 못했습니다.\n다시 선택해 주세요"
|
||||
viewModel.errorMessage = I18n.Audition.Apply.fileLoadFailed
|
||||
viewModel.isShowPopup = true
|
||||
}
|
||||
|
||||
case .failure(let error):
|
||||
DEBUG_LOG("error: \(error.localizedDescription)")
|
||||
viewModel.errorMessage = "콘텐츠 파일을 불러오지 못했습니다.\n다시 선택해 주세요"
|
||||
viewModel.errorMessage = I18n.Audition.Apply.fileLoadFailed
|
||||
viewModel.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||
@Published var totalCount = 0
|
||||
@Published var applicantList = [GetAuditionRoleApplicantItem]()
|
||||
|
||||
@Published var name = "보이스온"
|
||||
@Published var name = I18n.Audition.defaultTitle
|
||||
@Published var auditionRoleDetail: GetAuditionRoleDetailResponse? = nil
|
||||
|
||||
@Published private(set) var sortType = AuditionApplicantSortType.NEWEST {
|
||||
@@ -93,13 +93,13 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||
if let message = roleDetailDecoded.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
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||
if let message = applicantListDecoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
@@ -127,7 +127,7 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
||||
self.onFailure()
|
||||
@@ -172,13 +172,13 @@ final class AuditionRoleDetailViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -188,13 +188,13 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||
|
||||
func applyAudition(onSuccess: @escaping () -> Void) {
|
||||
if phoneNumber.count != 11 {
|
||||
errorMessage = "잘못된 연락처 입니다.\n다시 입력해 주세요."
|
||||
errorMessage = I18n.Audition.Apply.invalidContact
|
||||
isShowPopup = true
|
||||
return
|
||||
}
|
||||
|
||||
guard let soundData = soundData else {
|
||||
errorMessage = "잘못된 녹음 파일 입니다.\n다시 선택해 주세요."
|
||||
errorMessage = I18n.Audition.Apply.invalidRecordingFile
|
||||
isShowPopup = true
|
||||
return
|
||||
}
|
||||
@@ -248,19 +248,19 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "오디션 지원을 완료하지 못했습니다.\n다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Audition.Apply.applyFailed
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} catch {
|
||||
self.errorMessage = "오디션 지원을 완료하지 못했습니다.\n다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Audition.Apply.applyFailed
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
.store(in: &subscription)
|
||||
} else {
|
||||
self.errorMessage = "오디션 지원을 완료하지 못했습니다.\n다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Audition.Apply.applyFailed
|
||||
self.isShowPopup = true
|
||||
self.isLoading = false
|
||||
}
|
||||
@@ -287,8 +287,8 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||
|
||||
if decoded.success {
|
||||
if self.isShowNotifyVote {
|
||||
self.dialogTitle = "[오디션 응원]"
|
||||
self.dialogDesc = "오디션을 응원하셨습니다\n(무료응원 : 1계정당 1일 1회)\n1캔으로 추가 응원을 해보세요."
|
||||
self.dialogTitle = I18n.Audition.Vote.cheerTitle
|
||||
self.dialogDesc = I18n.Audition.Vote.cheerDescription
|
||||
self.isShowVoteCompleteView = true
|
||||
}
|
||||
|
||||
@@ -302,20 +302,20 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||
} else {
|
||||
if let message = decoded.message {
|
||||
if message.contains("오늘 응원은 여기까지") {
|
||||
self.dialogTitle = "[오늘 응원 제한]"
|
||||
self.dialogDesc = "오늘 응원은 여기까지!\n하루 최대 10회까지 이용이 가능합니다.\n내일 다시 이용해주세요."
|
||||
self.dialogTitle = I18n.Audition.Vote.limitTitle
|
||||
self.dialogDesc = I18n.Audition.Vote.limitDescription
|
||||
self.isShowVoteCompleteView = true
|
||||
} else {
|
||||
self.errorMessage = message
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} else {
|
||||
self.errorMessage = "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
self.errorMessage = I18n.Audition.Vote.unknownError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
self.errorMessage = "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
self.errorMessage = I18n.Audition.Vote.unknownError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user