feat(i18n): 오디션 화면 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -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