feat(i18n): 탐색 프로필 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -45,7 +45,7 @@ struct CreatorCommunityCommentItemView: View {
|
||||
.foregroundColor(Color.gray90)
|
||||
|
||||
if commentItem.isSecret {
|
||||
Text("비밀댓글")
|
||||
Text(I18n.Explorer.secretComment)
|
||||
.appFont(size: 11, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
.padding(.horizontal, 4)
|
||||
@@ -72,7 +72,7 @@ struct CreatorCommunityCommentItemView: View {
|
||||
HStack(spacing: 0) {
|
||||
if isModeModify {
|
||||
HStack(spacing: 0) {
|
||||
TextField("댓글을 입력해 보세요.", text: $comment)
|
||||
TextField(I18n.Explorer.commentInputPlaceholder, text: $comment)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
@@ -119,7 +119,7 @@ struct CreatorCommunityCommentItemView: View {
|
||||
parentComment: commentItem
|
||||
)
|
||||
) {
|
||||
Text(commentItem.replyCount > 0 ? "답글 \(commentItem.replyCount)개" : "답글 쓰기")
|
||||
Text(commentItem.replyCount > 0 ? I18n.Explorer.replyCount(commentItem.replyCount) : I18n.Explorer.replyWrite)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.button)
|
||||
}
|
||||
@@ -140,7 +140,7 @@ struct CreatorCommunityCommentItemView: View {
|
||||
if isShowPopupMenu {
|
||||
VStack(spacing: 10) {
|
||||
if commentItem.writerId == UserDefaults.int(forKey: .userId) {
|
||||
Text("수정")
|
||||
Text(I18n.Explorer.edit)
|
||||
.appFont(size: 14, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.onTapGesture {
|
||||
@@ -152,7 +152,7 @@ struct CreatorCommunityCommentItemView: View {
|
||||
if creatorId == UserDefaults.int(forKey: .userId) ||
|
||||
commentItem.writerId == UserDefaults.int(forKey: .userId)
|
||||
{
|
||||
Text("삭제")
|
||||
Text(I18n.Common.delete)
|
||||
.appFont(size: 14, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.onTapGesture {
|
||||
|
||||
@@ -29,7 +29,7 @@ struct CreatorCommunityCommentListView: View {
|
||||
ZStack {
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 0) {
|
||||
Text("댓글")
|
||||
Text(I18n.RankingSort.comments)
|
||||
.appFont(size: 14.7, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
.padding(.leading, 13.3)
|
||||
@@ -65,7 +65,7 @@ struct CreatorCommunityCommentListView: View {
|
||||
viewModel.isSecret.toggle()
|
||||
}
|
||||
|
||||
Text("비밀댓글")
|
||||
Text(I18n.Explorer.secretComment)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(viewModel.isSecret ? Color.button : Color.grayee)
|
||||
.onTapGesture {
|
||||
@@ -84,7 +84,7 @@ struct CreatorCommunityCommentListView: View {
|
||||
.clipShape(Circle())
|
||||
|
||||
HStack(spacing: 0) {
|
||||
TextField("댓글을 입력해 보세요.", text: $viewModel.comment)
|
||||
TextField(I18n.Explorer.commentInputPlaceholder, text: $viewModel.comment)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
|
||||
@@ -60,13 +60,13 @@ final class CreatorCommunityCommentListViewModel: 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
|
||||
}
|
||||
|
||||
@@ -108,13 +108,13 @@ final class CreatorCommunityCommentListViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -129,13 +129,13 @@ final class CreatorCommunityCommentListViewModel: ObservableObject {
|
||||
isActive: Bool? = nil
|
||||
) {
|
||||
if comment == nil && isActive == nil {
|
||||
errorMessage = "변경사항이 없습니다."
|
||||
errorMessage = I18n.Explorer.noChanges
|
||||
isShowPopup = true
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if let comment = comment, comment.trimmingCharacters(in: .whitespaces).isEmpty {
|
||||
errorMessage = "내용을 입력하세요."
|
||||
errorMessage = I18n.Explorer.inputContentWithPeriod
|
||||
isShowPopup = true
|
||||
return
|
||||
}
|
||||
@@ -181,14 +181,14 @@ final class CreatorCommunityCommentListViewModel: ObservableObject {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} catch {
|
||||
self.isLoading = false
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ struct CreatorCommunityCommentReplyView: View {
|
||||
HStack(spacing: 6.7) {
|
||||
Image("ic_back")
|
||||
|
||||
Text("답글")
|
||||
Text(I18n.Explorer.replyTitle)
|
||||
.appFont(size: 14.7, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
|
||||
@@ -55,7 +55,7 @@ struct CreatorCommunityCommentReplyView: View {
|
||||
.clipShape(Circle())
|
||||
|
||||
HStack(spacing: 0) {
|
||||
TextField("댓글을 입력해 보세요.", text: $viewModel.comment)
|
||||
TextField(I18n.Explorer.commentInputPlaceholder, text: $viewModel.comment)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
|
||||
@@ -61,13 +61,13 @@ final class CreatorCommunityCommentReplyViewModel: 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
|
||||
}
|
||||
|
||||
@@ -108,13 +108,13 @@ final class CreatorCommunityCommentReplyViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -129,13 +129,13 @@ final class CreatorCommunityCommentReplyViewModel: ObservableObject {
|
||||
isActive: Bool? = nil
|
||||
) {
|
||||
if comment == nil && isActive == nil {
|
||||
errorMessage = "변경사항이 없습니다."
|
||||
errorMessage = I18n.Explorer.noChanges
|
||||
isShowPopup = true
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if let comment = comment, comment.trimmingCharacters(in: .whitespaces).isEmpty {
|
||||
errorMessage = "내용을 입력하세요."
|
||||
errorMessage = I18n.Explorer.inputContentWithPeriod
|
||||
isShowPopup = true
|
||||
return
|
||||
}
|
||||
@@ -181,14 +181,14 @@ final class CreatorCommunityCommentReplyViewModel: ObservableObject {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} catch {
|
||||
self.isLoading = false
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ struct CreatorCommunityCommentView: View {
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 11) {
|
||||
HStack(spacing: 5.3) {
|
||||
Text("댓글")
|
||||
Text(I18n.RankingSort.comments)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
|
||||
@@ -39,7 +39,7 @@ struct CreatorCommunityCommentView: View {
|
||||
isSecret.toggle()
|
||||
}
|
||||
|
||||
Text("비밀댓글")
|
||||
Text(I18n.Explorer.secretComment)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(isSecret ? Color.button : Color.grayee)
|
||||
.onTapGesture {
|
||||
@@ -81,7 +81,7 @@ struct CreatorCommunityCommentView: View {
|
||||
.clipShape(Circle())
|
||||
|
||||
HStack(spacing: 0) {
|
||||
TextField("댓글을 입력해 보세요.", text: $comment)
|
||||
TextField(I18n.Explorer.commentInputPlaceholder, text: $comment)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
|
||||
@@ -16,7 +16,7 @@ struct CreatorCommunityAllItemLockView: View {
|
||||
VStack(spacing: 26.7) {
|
||||
Image("ic_lock_bb")
|
||||
|
||||
Text("\(price)캔으로 게시글 보기")
|
||||
Text(I18n.Explorer.viewPostWithCans(price))
|
||||
.appFont(size: 12, weight: .bold)
|
||||
.foregroundColor(Color.button)
|
||||
.padding(.horizontal, 21)
|
||||
|
||||
@@ -31,7 +31,7 @@ struct CreatorCommunityAllView: View {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(
|
||||
title: "커뮤니티",
|
||||
title: I18n.Explorer.communityTitle,
|
||||
backAction: {
|
||||
if isGridMode {
|
||||
AppState.shared.back()
|
||||
|
||||
@@ -103,13 +103,13 @@ class CreatorCommunityAllViewModel: 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
|
||||
}
|
||||
|
||||
@@ -189,13 +189,13 @@ class CreatorCommunityAllViewModel: 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
|
||||
}
|
||||
|
||||
@@ -227,12 +227,12 @@ class CreatorCommunityAllViewModel: 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
|
||||
}
|
||||
}
|
||||
@@ -269,7 +269,7 @@ class CreatorCommunityAllViewModel: ObservableObject {
|
||||
let decoded = try jsonDecoder.decode(ApiResponseWithoutData.self, from: responseData)
|
||||
|
||||
if decoded.success {
|
||||
self.errorMessage = "삭제되었습니다"
|
||||
self.errorMessage = I18n.Explorer.deleted
|
||||
self.isShowPopup = true
|
||||
|
||||
self.page = 1
|
||||
@@ -279,19 +279,19 @@ class CreatorCommunityAllViewModel: 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 = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
self.isLoading = false
|
||||
}
|
||||
@@ -332,13 +332,13 @@ class CreatorCommunityAllViewModel: 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
|
||||
}
|
||||
|
||||
@@ -378,13 +378,13 @@ class CreatorCommunityAllViewModel: 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
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ struct CreatorCommunityMenuView: View {
|
||||
HStack(spacing: 13.3) {
|
||||
Image(isFixed ? "ic_pin_cancel" : "ic_pin")
|
||||
|
||||
Text(isFixed ? "고정 해제" : "최상단에 고정")
|
||||
Text(isFixed ? I18n.Explorer.pinRelease : I18n.Explorer.pinToTop)
|
||||
.appFont(size: 16.7, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
|
||||
@@ -50,7 +50,7 @@ struct CreatorCommunityMenuView: View {
|
||||
HStack(spacing: 13.3) {
|
||||
Image("ic_make_message")
|
||||
|
||||
Text("수정")
|
||||
Text(I18n.Explorer.edit)
|
||||
.appFont(size: 16.7, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
|
||||
@@ -67,7 +67,7 @@ struct CreatorCommunityMenuView: View {
|
||||
HStack(spacing: 13.3) {
|
||||
Image("ic_trash_can")
|
||||
|
||||
Text("삭제")
|
||||
Text(I18n.Common.delete)
|
||||
.appFont(size: 16.7, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
|
||||
@@ -82,7 +82,7 @@ struct CreatorCommunityMenuView: View {
|
||||
}
|
||||
} else {
|
||||
HStack(spacing: 0) {
|
||||
Text("신고")
|
||||
Text(I18n.Explorer.report)
|
||||
.appFont(size: 16.7, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ final class CreatorCommunityMediaPlayerManager: NSObject, ObservableObject {
|
||||
}
|
||||
|
||||
private func showError() {
|
||||
self.errorMessage = "오류가 발생했습니다. 다시 시도해 주세요."
|
||||
self.errorMessage = I18n.Message.Voice.Sound.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ struct CreatorCommunityMoreItemView: View {
|
||||
.resizable()
|
||||
.frame(width: 40, height: 40)
|
||||
|
||||
Text("더보기")
|
||||
Text(I18n.Explorer.viewMore)
|
||||
.appFont(size: 11, weight: .light)
|
||||
.foregroundColor(Color(hex: "bbbbbb"))
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@ struct CreatorCommunityNoPostsItemView: View {
|
||||
VStack(spacing: 10.3) {
|
||||
CreatorCommunityWriteItemView()
|
||||
|
||||
Text("게시물 등록")
|
||||
Text(I18n.Explorer.postRegister)
|
||||
.appFont(size: 14.7, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
Text("게시 후에 게시물이 여기에 표시되고\n커뮤니티에 공개됩니다.")
|
||||
|
||||
Text(I18n.Explorer.postRegisterDescription)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
||||
@@ -24,12 +24,12 @@ struct CreatorCommunityModifyView: View {
|
||||
GeometryReader { proxy in
|
||||
ZStack {
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: "게시글 수정")
|
||||
DetailNavigationBar(title: I18n.Explorer.postModifyTitle)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(spacing: 0) {
|
||||
VStack(spacing: 13.3) {
|
||||
Text("이미지")
|
||||
Text(I18n.Explorer.imageTitle)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
@@ -81,7 +81,7 @@ struct CreatorCommunityModifyView: View {
|
||||
viewModel.postImageData = data
|
||||
}
|
||||
} catch {
|
||||
viewModel.errorMessage = "이미지를 로드하지 못했습니다."
|
||||
viewModel.errorMessage = I18n.Explorer.imageLoadFailed
|
||||
viewModel.isShowPopup = true
|
||||
DEBUG_LOG("이미지 로드 실패: \(error)")
|
||||
}
|
||||
@@ -94,24 +94,24 @@ struct CreatorCommunityModifyView: View {
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
|
||||
Text("등록할 이미지가 없으면 이미지 없이 게시글만 등록 하셔도 됩니다.")
|
||||
Text(I18n.Explorer.imageOptionalNotice)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.top, 24)
|
||||
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("내용")
|
||||
Text(I18n.Explorer.contentTitle)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("\(viewModel.content.count)자")
|
||||
Text("\(viewModel.content.count)\(I18n.Explorer.contentCharacterUnit)")
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color(hex: "ff5c49"))
|
||||
Text(" / 최대 500자")
|
||||
Text(I18n.Explorer.max500Chars)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
}
|
||||
@@ -128,14 +128,14 @@ struct CreatorCommunityModifyView: View {
|
||||
.padding(.top, 13.3)
|
||||
|
||||
VStack(spacing: 13.3) {
|
||||
Text("댓글 가능 여부")
|
||||
Text(I18n.Explorer.commentAvailability)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
SelectButtonView(
|
||||
title: "댓글 가능",
|
||||
title: I18n.CreateContent.commentAllowed,
|
||||
isChecked: viewModel.isAvailableComment
|
||||
) {
|
||||
if !viewModel.isAvailableComment {
|
||||
@@ -144,7 +144,7 @@ struct CreatorCommunityModifyView: View {
|
||||
}
|
||||
|
||||
SelectButtonView(
|
||||
title: "댓글 불가",
|
||||
title: I18n.CreateContent.commentNotAllowed,
|
||||
isChecked: !viewModel.isAvailableComment
|
||||
) {
|
||||
if viewModel.isAvailableComment {
|
||||
@@ -156,14 +156,14 @@ struct CreatorCommunityModifyView: View {
|
||||
.padding(.top, 26.7)
|
||||
|
||||
VStack(spacing: 13.3) {
|
||||
Text("연령 제한")
|
||||
Text(I18n.Explorer.ageRestriction)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
SelectButtonView(
|
||||
title: "전체 연령",
|
||||
title: I18n.CreateContent.allAges,
|
||||
isChecked: !viewModel.isAdult
|
||||
) {
|
||||
if viewModel.isAdult {
|
||||
@@ -172,7 +172,7 @@ struct CreatorCommunityModifyView: View {
|
||||
}
|
||||
|
||||
SelectButtonView(
|
||||
title: "19세 이상",
|
||||
title: I18n.CreateContent.over19,
|
||||
isChecked: viewModel.isAdult
|
||||
) {
|
||||
if !viewModel.isAdult {
|
||||
@@ -187,7 +187,7 @@ struct CreatorCommunityModifyView: View {
|
||||
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 13.3) {
|
||||
Text("닫기")
|
||||
Text(I18n.Explorer.close)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color(hex: "3BB9F1"))
|
||||
.frame(maxWidth: .infinity)
|
||||
@@ -203,7 +203,7 @@ struct CreatorCommunityModifyView: View {
|
||||
AppState.shared.back()
|
||||
}
|
||||
|
||||
Text("수정")
|
||||
Text(I18n.Explorer.modify)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color.white)
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
@@ -24,7 +24,7 @@ final class CreatorCommunityModifyViewModel: ObservableObject {
|
||||
@Published var postImageUrl: String? = nil
|
||||
@Published private(set) var communityPost: GetCommunityPostListResponse?
|
||||
|
||||
var placeholder = "내용을 입력하세요"
|
||||
var placeholder = I18n.Explorer.inputContent
|
||||
var postId = 0
|
||||
|
||||
func getCommunityPostDetail(onFailure: (() -> Void)? = nil) {
|
||||
@@ -58,7 +58,7 @@ final class CreatorCommunityModifyViewModel: ObservableObject {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
} else {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
}
|
||||
|
||||
self.isShowPopup = true
|
||||
@@ -67,7 +67,7 @@ final class CreatorCommunityModifyViewModel: ObservableObject {
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
if let onFailure = onFailure {
|
||||
onFailure()
|
||||
@@ -126,7 +126,7 @@ final class CreatorCommunityModifyViewModel: ObservableObject {
|
||||
let decoded = try jsonDecoder.decode(ApiResponseWithoutData.self, from: responseData)
|
||||
|
||||
if decoded.success {
|
||||
self.errorMessage = "게시물이 수정되었습니다."
|
||||
self.errorMessage = I18n.Explorer.postUpdated
|
||||
self.isShowPopup = true
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
@@ -136,19 +136,19 @@ final class CreatorCommunityModifyViewModel: 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 = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
self.isLoading = false
|
||||
}
|
||||
@@ -157,7 +157,7 @@ final class CreatorCommunityModifyViewModel: ObservableObject {
|
||||
|
||||
private func validateData() -> Bool {
|
||||
if content.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || content.count < 5 {
|
||||
errorMessage = "내용을 5자 이상 입력해 주세요."
|
||||
errorMessage = I18n.Explorer.minContentLength(5)
|
||||
isShowPopup = true
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ struct CreatorCommunityRecordingVoiceView: View {
|
||||
VStack {
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 0) {
|
||||
Text("음성녹음")
|
||||
Text(I18n.Explorer.recordingTitle)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
|
||||
@@ -77,7 +77,7 @@ struct CreatorCommunityRecordingVoiceView: View {
|
||||
HStack(spacing: 0) {
|
||||
Spacer()
|
||||
|
||||
Text("삭제")
|
||||
Text(I18n.Common.delete)
|
||||
.appFont(size: 15.3, weight: .medium)
|
||||
.foregroundColor(Color.graybb.opacity(0))
|
||||
|
||||
@@ -100,7 +100,7 @@ struct CreatorCommunityRecordingVoiceView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("삭제")
|
||||
Text(I18n.Common.delete)
|
||||
.appFont(size: 15.3, weight: .medium)
|
||||
.foregroundColor(Color.graybb)
|
||||
.onTapGesture {
|
||||
@@ -114,7 +114,7 @@ struct CreatorCommunityRecordingVoiceView: View {
|
||||
.padding(.vertical, 52.3)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
Text("다시 녹음")
|
||||
Text(I18n.Explorer.recordAgain)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color.button)
|
||||
.frame(width: (proxy.size.width - 40) / 3, height: 50)
|
||||
@@ -130,7 +130,7 @@ struct CreatorCommunityRecordingVoiceView: View {
|
||||
soundManager.recordMode = .RECORD
|
||||
}
|
||||
|
||||
Text("녹음완료")
|
||||
Text(I18n.Explorer.recordingComplete)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
.frame(width: (proxy.size.width - 40) * 2 / 3, height: 50)
|
||||
@@ -143,7 +143,7 @@ struct CreatorCommunityRecordingVoiceView: View {
|
||||
self.fileName = tempFileName
|
||||
self.isShowing = false
|
||||
} catch {
|
||||
errorMessage = "녹음파일을 생성하지 못했습니다.\n다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
errorMessage = I18n.Explorer.recordingFileCreateFailed
|
||||
isShowPopup = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,14 +44,14 @@ class CreatorCommunitySoundManager: NSObject, ObservableObject {
|
||||
audioSession.requestRecordPermission() { [weak self] allowed in
|
||||
DispatchQueue.main.async {
|
||||
if !allowed {
|
||||
self?.errorMessage = "권한을 허용하지 않으시면 음성녹음을 하실 수 없습니다."
|
||||
self?.errorMessage = I18n.Explorer.recordingPermissionDenied
|
||||
self?.isShowPopup = true
|
||||
self?.onClose = true
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
errorMessage = "오류가 발생했습니다. 다시 시도해 주세요."
|
||||
errorMessage = I18n.Message.Voice.Sound.commonError
|
||||
isShowPopup = true
|
||||
onClose = true
|
||||
}
|
||||
@@ -84,7 +84,7 @@ class CreatorCommunitySoundManager: NSObject, ObservableObject {
|
||||
|
||||
startTimer()
|
||||
} catch {
|
||||
errorMessage = "오류가 발생했습니다. 다시 시도해 주세요."
|
||||
errorMessage = I18n.Message.Voice.Sound.commonError
|
||||
isShowPopup = true
|
||||
}
|
||||
isLoading = false
|
||||
@@ -117,7 +117,7 @@ class CreatorCommunitySoundManager: NSObject, ObservableObject {
|
||||
self.player?.delegate = self
|
||||
self.player?.prepareToPlay()
|
||||
} catch {
|
||||
self.errorMessage = "오류가 발생했습니다. 다시 시도해 주세요."
|
||||
self.errorMessage = I18n.Message.Voice.Sound.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
|
||||
@@ -142,7 +142,9 @@ class CreatorCommunitySoundManager: NSObject, ObservableObject {
|
||||
func deleteAudioFile() {
|
||||
do {
|
||||
try FileManager.default.removeItem(at: getAudioFileURL())
|
||||
} catch {}
|
||||
} catch {
|
||||
DEBUG_LOG("오디오 파일 삭제 실패: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
func getAudioFileURL() -> URL {
|
||||
|
||||
@@ -19,7 +19,7 @@ struct CreatorCommunityWriteView: View {
|
||||
@State private var isImageLoading = false
|
||||
|
||||
@State private var isShowRecordingVoiceView = false
|
||||
@State private var fileName: String = "녹음"
|
||||
@State private var fileName: String = I18n.Explorer.recordingDefaultFileName
|
||||
|
||||
private let imagePreviewSize: CGFloat = 110
|
||||
|
||||
@@ -30,12 +30,12 @@ struct CreatorCommunityWriteView: View {
|
||||
GeometryReader { proxy in
|
||||
ZStack {
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: "게시글 등록")
|
||||
DetailNavigationBar(title: I18n.Explorer.postWriteTitle)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(spacing: 0) {
|
||||
VStack(spacing: 13.3) {
|
||||
Text("이미지")
|
||||
Text(I18n.Explorer.imageTitle)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
@@ -75,7 +75,7 @@ struct CreatorCommunityWriteView: View {
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("등록할 이미지가 없으면 이미지 없이 게시글만 등록 하셔도 됩니다.")
|
||||
Text(I18n.Explorer.imageOptionalNotice)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
@@ -85,7 +85,7 @@ struct CreatorCommunityWriteView: View {
|
||||
if let _ = viewModel.postImageData {
|
||||
VStack(spacing: 13.3) {
|
||||
HStack(spacing: 0) {
|
||||
Text("오디오 녹음")
|
||||
Text(I18n.Explorer.audioRecordingTitle)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
@@ -107,7 +107,7 @@ struct CreatorCommunityWriteView: View {
|
||||
.onTapGesture { isShowRecordingVoiceView = true }
|
||||
|
||||
|
||||
Text("※ 오디오 녹음은 최대 3분입니다")
|
||||
Text(I18n.Explorer.audioRecordingMax3Minutes)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
@@ -115,16 +115,16 @@ struct CreatorCommunityWriteView: View {
|
||||
}
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("내용")
|
||||
Text(I18n.Explorer.contentTitle)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("\(viewModel.content.count)자")
|
||||
Text("\(viewModel.content.count)\(I18n.Explorer.contentCharacterUnit)")
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.mainRed)
|
||||
Text(" / 최대 500자")
|
||||
Text(I18n.Explorer.max500Chars)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
@@ -141,14 +141,14 @@ struct CreatorCommunityWriteView: View {
|
||||
.padding(.top, 13.3)
|
||||
|
||||
VStack(spacing: 13.3) {
|
||||
Text("댓글 가능 여부")
|
||||
Text(I18n.Explorer.commentAvailability)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
SelectButtonView(
|
||||
title: "댓글 가능",
|
||||
title: I18n.CreateContent.commentAllowed,
|
||||
isChecked: viewModel.isAvailableComment
|
||||
) {
|
||||
if !viewModel.isAvailableComment {
|
||||
@@ -157,7 +157,7 @@ struct CreatorCommunityWriteView: View {
|
||||
}
|
||||
|
||||
SelectButtonView(
|
||||
title: "댓글 불가",
|
||||
title: I18n.CreateContent.commentNotAllowed,
|
||||
isChecked: !viewModel.isAvailableComment
|
||||
) {
|
||||
if viewModel.isAvailableComment {
|
||||
@@ -170,14 +170,14 @@ struct CreatorCommunityWriteView: View {
|
||||
|
||||
if UserDefaults.bool(forKey: .auth) {
|
||||
VStack(spacing: 13.3) {
|
||||
Text("연령 제한")
|
||||
Text(I18n.Explorer.ageRestriction)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
SelectButtonView(
|
||||
title: "전체 연령",
|
||||
title: I18n.CreateContent.allAges,
|
||||
isChecked: !viewModel.isAdult
|
||||
) {
|
||||
if viewModel.isAdult {
|
||||
@@ -186,7 +186,7 @@ struct CreatorCommunityWriteView: View {
|
||||
}
|
||||
|
||||
SelectButtonView(
|
||||
title: "19세 이상",
|
||||
title: I18n.CreateContent.over19,
|
||||
isChecked: viewModel.isAdult
|
||||
) {
|
||||
if !viewModel.isAdult {
|
||||
@@ -200,14 +200,14 @@ struct CreatorCommunityWriteView: View {
|
||||
|
||||
if let _ = viewModel.postImageData {
|
||||
VStack(spacing: 13.3) {
|
||||
Text("가격 설정")
|
||||
Text(I18n.Explorer.priceSetting)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
SelectButtonView(
|
||||
title: "무료",
|
||||
title: I18n.CreateContent.free,
|
||||
isChecked: viewModel.isPriceFree
|
||||
) {
|
||||
if !viewModel.isPriceFree {
|
||||
@@ -216,7 +216,7 @@ struct CreatorCommunityWriteView: View {
|
||||
}
|
||||
|
||||
SelectButtonView(
|
||||
title: "유료",
|
||||
title: I18n.CreateContent.paid,
|
||||
isChecked: !viewModel.isPriceFree
|
||||
) {
|
||||
if viewModel.isPriceFree {
|
||||
@@ -238,7 +238,7 @@ struct CreatorCommunityWriteView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("캔")
|
||||
Text(I18n.Explorer.canUnitCompact)
|
||||
.appFont(size: 14.7, weight: .medium)
|
||||
.foregroundColor(Color.button)
|
||||
}
|
||||
@@ -259,7 +259,7 @@ struct CreatorCommunityWriteView: View {
|
||||
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 13.3) {
|
||||
Text("닫기")
|
||||
Text(I18n.Explorer.close)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color.button)
|
||||
.frame(maxWidth: .infinity)
|
||||
@@ -275,7 +275,7 @@ struct CreatorCommunityWriteView: View {
|
||||
AppState.shared.back()
|
||||
}
|
||||
|
||||
Text("등록")
|
||||
Text(I18n.Explorer.register)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color.white)
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
@@ -47,7 +47,7 @@ final class CreatorCommunityWriteViewModel: ObservableObject {
|
||||
@Published var price = 0
|
||||
@Published var soundData: Data? = nil
|
||||
|
||||
var placeholder = "내용을 입력하세요"
|
||||
var placeholder = I18n.Explorer.inputContent
|
||||
|
||||
func setPostImage(_ image: UIImage) {
|
||||
postImage = image
|
||||
@@ -99,7 +99,7 @@ final class CreatorCommunityWriteViewModel: ObservableObject {
|
||||
case .failure(let error):
|
||||
ERROR_LOG(error.localizedDescription)
|
||||
self.isLoading = false
|
||||
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
}
|
||||
} receiveValue: { [unowned self] response in
|
||||
@@ -111,7 +111,7 @@ final class CreatorCommunityWriteViewModel: ObservableObject {
|
||||
let decoded = try jsonDecoder.decode(ApiResponseWithoutData.self, from: responseData)
|
||||
|
||||
if decoded.success {
|
||||
self.errorMessage = "게시물이 등록되었습니다."
|
||||
self.errorMessage = I18n.Explorer.postCreated
|
||||
self.isShowPopup = true
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
@@ -121,19 +121,19 @@ final class CreatorCommunityWriteViewModel: 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 = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||
self.errorMessage = I18n.Common.commonError
|
||||
self.isShowPopup = true
|
||||
self.isLoading = false
|
||||
}
|
||||
@@ -142,13 +142,13 @@ final class CreatorCommunityWriteViewModel: ObservableObject {
|
||||
|
||||
private func validateData() -> Bool {
|
||||
if content.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || content.count < 5 {
|
||||
errorMessage = "내용을 5자 이상 입력해 주세요."
|
||||
errorMessage = I18n.Explorer.minContentLength(5)
|
||||
isShowPopup = true
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
if !isPriceFree && price < 5 {
|
||||
errorMessage = "최소금액은 5캔 입니다."
|
||||
errorMessage = I18n.Explorer.minPriceFiveCans
|
||||
isShowPopup = true
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user