feat(i18n): 탐색 프로필 하드코딩 문구를 I18n 키로 통일한다

This commit is contained in:
Yu Sung
2026-04-01 14:40:37 +09:00
parent bceec46ebc
commit 038d66e363
39 changed files with 599 additions and 247 deletions

View File

@@ -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 {

View File

@@ -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)

View File

@@ -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
}
}

View File

@@ -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)

View File

@@ -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
}
}

View File

@@ -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)