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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user