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

@@ -23,11 +23,11 @@ struct UserProfileFanTalkAllView: View {
GeometryReader { proxy in
BaseView(isLoading: $viewModel.isLoading) {
VStack(spacing: 0) {
DetailNavigationBar(title: String(localized: "팬 Talk 전체보기"))
DetailNavigationBar(title: I18n.Explorer.fanTalkAllTitle)
VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 6.7) {
Text("응원")
Text(I18n.Explorer.cheerTitle)
.appFont(size: 14.7, weight: .medium)
.foregroundColor(Color.grayee)
@@ -43,7 +43,7 @@ struct UserProfileFanTalkAllView: View {
.padding(.top, 13.3)
HStack(spacing: 0) {
TextField("응원댓글을 입력하세요", text: $cheersContent)
TextField(I18n.Explorer.cheerInputPlaceholder, text: $cheersContent)
.autocapitalization(.none)
.disableAutocorrection(true)
.appFont(size: 13.3, weight: .medium)
@@ -115,7 +115,7 @@ struct UserProfileFanTalkAllView: View {
}
}
} else {
Text("응원이 없습니다.\n\n처음으로 응원을 해보세요!")
Text(I18n.Explorer.cheerEmpty)
.appFont(size: 13.3, weight: .light)
.foregroundColor(Color.graybb)
.multilineTextAlignment(.center)

View File

@@ -69,7 +69,7 @@ struct UserProfileFanTalkCheersItemView: View {
.foregroundColor(Color.button)
)
Text("수정")
Text(I18n.Explorer.modify)
.appFont(size: 14, weight: .bold)
.foregroundColor(Color.white)
.padding(13.3)
@@ -80,7 +80,7 @@ struct UserProfileFanTalkCheersItemView: View {
isModeModify = false
}
Text("취소")
Text(I18n.Common.cancel)
.appFont(size: 14, weight: .bold)
.foregroundColor(Color.button)
.padding(13.3)
@@ -102,7 +102,7 @@ struct UserProfileFanTalkCheersItemView: View {
if isShowInputReply {
HStack(spacing: 10) {
TextField("응원댓글에 답글을 남겨보세요!", text: $replyContent)
TextField(I18n.Explorer.cheerReplyPlaceholder, text: $replyContent)
.autocapitalization(.none)
.disableAutocorrection(true)
.appFont(size: 14, weight: .medium)
@@ -118,7 +118,7 @@ struct UserProfileFanTalkCheersItemView: View {
.foregroundColor(Color.button)
)
Text("등록")
Text(I18n.Explorer.register)
.appFont(size: 14, weight: .bold)
.foregroundColor(Color.white)
.padding(13.3)
@@ -136,7 +136,7 @@ struct UserProfileFanTalkCheersItemView: View {
} else {
if cheersItem.replyList.count <= 0 {
if userId == UserDefaults.int(forKey: .userId) {
Text("답글쓰기")
Text(I18n.Explorer.replyWrite)
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.button)
.padding(.top, 18.3)
@@ -164,7 +164,7 @@ struct UserProfileFanTalkCheersItemView: View {
.foregroundColor(Color.gray52)
if userId == UserDefaults.int(forKey: .userId) {
Text("답글 수정")
Text(I18n.Explorer.replyEdit)
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.button)
.onTapGesture {
@@ -196,7 +196,7 @@ struct UserProfileFanTalkCheersItemView: View {
if isShowPopupMenu {
VStack(spacing: 10) {
if cheersItem.memberId != UserDefaults.int(forKey: .userId) {
Text("신고하기")
Text(I18n.Explorer.reportAction)
.appFont(size: 14, weight: .medium)
.foregroundColor(Color.gray77)
.onTapGesture {
@@ -206,7 +206,7 @@ struct UserProfileFanTalkCheersItemView: View {
}
if cheersItem.memberId == UserDefaults.int(forKey: .userId) {
Text("수정")
Text(I18n.Explorer.edit)
.appFont(size: 14, weight: .medium)
.foregroundColor(Color.gray77)
.onTapGesture {
@@ -219,7 +219,7 @@ struct UserProfileFanTalkCheersItemView: View {
if userId == UserDefaults.int(forKey: .userId) ||
cheersItem.memberId == UserDefaults.int(forKey: .userId)
{
Text("삭제")
Text(I18n.Common.delete)
.appFont(size: 14, weight: .medium)
.foregroundColor(Color.gray77)
.onTapGesture {

View File

@@ -26,13 +26,13 @@ struct UserProfileFanTalkView: View {
var body: some View {
VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 0) {
Text("팬 Talk")
Text(I18n.Explorer.fanTalkTitle)
.appFont(size: 26, weight: .bold)
.foregroundColor(Color.white)
Spacer()
Text("전체보기")
Text(I18n.Common.viewAll)
.appFont(size: 14, weight: .light)
.foregroundColor(Color(hex: "78909C"))
.onTapGesture {
@@ -43,7 +43,7 @@ struct UserProfileFanTalkView: View {
VStack(alignment: .leading, spacing: 20) {
HStack(spacing: 6.7) {
Text("응원")
Text(I18n.Explorer.cheerTitle)
.appFont(size: 16, weight: .medium)
.foregroundColor(Color.grayee)
@@ -53,7 +53,7 @@ struct UserProfileFanTalkView: View {
}
HStack(spacing: 0) {
TextField("응원댓글을 입력하세요", text: $cheersContent)
TextField(I18n.Explorer.cheerInputPlaceholder, text: $cheersContent)
.autocapitalization(.none)
.disableAutocorrection(true)
.appFont(size: 14, weight: .medium)
@@ -111,7 +111,7 @@ struct UserProfileFanTalkView: View {
}
}
} else {
Text("응원이 없습니다.\n\n처음으로 응원을 해보세요!")
Text(I18n.Explorer.cheerEmpty)
.appFont(size: 13.3, weight: .light)
.foregroundColor(Color.graybb)
.multilineTextAlignment(.center)

View File

@@ -70,7 +70,7 @@ final class UserProfileFanTalkViewModel: ObservableObject {
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
}
if let errorPopup = errorPopup {
@@ -80,7 +80,7 @@ final class UserProfileFanTalkViewModel: ObservableObject {
}
}
} catch {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
if let errorPopup = errorPopup {
errorPopup(self.errorMessage)
} else {
@@ -95,9 +95,9 @@ final class UserProfileFanTalkViewModel: ObservableObject {
func writeCheersReply(parentCheersId: Int, creatorId: Int, cheersReplyContent: String) {
if cheersReplyContent.trimmingCharacters(in: .whitespaces).isEmpty {
if let errorPopup = errorPopup {
errorPopup("내용을 입력하세요")
errorPopup(I18n.Explorer.inputContent)
} else {
errorMessage = "내용을 입력하세요"
errorMessage = I18n.Explorer.inputContent
isShowPopup = true
}
@@ -137,7 +137,7 @@ final class UserProfileFanTalkViewModel: ObservableObject {
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
}
if let errorPopup = errorPopup {
@@ -147,7 +147,7 @@ final class UserProfileFanTalkViewModel: ObservableObject {
}
}
} catch {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
if let errorPopup = errorPopup {
errorPopup(self.errorMessage)
} else {
@@ -161,9 +161,9 @@ final class UserProfileFanTalkViewModel: ObservableObject {
func writeCheers(creatorId: Int, cheersContent: String) {
if cheersContent.trimmingCharacters(in: .whitespaces).isEmpty {
if let errorPopup = errorPopup {
errorPopup("내용을 입력하세요")
errorPopup(I18n.Explorer.inputContent)
} else {
errorMessage = "내용을 입력하세요"
errorMessage = I18n.Explorer.inputContent
isShowPopup = true
}
@@ -203,7 +203,7 @@ final class UserProfileFanTalkViewModel: ObservableObject {
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
}
if let errorPopup = errorPopup {
@@ -213,7 +213,7 @@ final class UserProfileFanTalkViewModel: ObservableObject {
}
}
} catch {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
if let errorPopup = errorPopup {
errorPopup(self.errorMessage)
} else {
@@ -227,18 +227,18 @@ final class UserProfileFanTalkViewModel: ObservableObject {
func modifyCheers(cheersId: Int, creatorId: Int, cheersContent: String? = nil, isActive: Bool? = nil) {
if cheersContent == nil && isActive == nil {
if let errorPopup = errorPopup {
errorPopup("변경사항이 없습니다.")
errorPopup(I18n.Explorer.noChanges)
} else {
errorMessage = "변경사항이 없습니다."
errorMessage = I18n.Explorer.noChanges
isShowPopup = true
}
}
if let cheersContent = cheersContent, cheersContent.trimmingCharacters(in: .whitespaces).isEmpty {
if let errorPopup = errorPopup {
errorPopup("내용을 입력하세요")
errorPopup(I18n.Explorer.inputContent)
} else {
errorMessage = "내용을 입력하세요"
errorMessage = I18n.Explorer.inputContent
isShowPopup = true
}
@@ -278,20 +278,20 @@ final class UserProfileFanTalkViewModel: 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)
}
func report(type: ReportType, reason: String = "프로필 신고") {
func report(type: ReportType, reason: String = I18n.Dialog.MemberProfile.reportProfile) {
isLoading = true
let request = ReportRequest(type: type, reason: reason, reportedMemberId: nil, cheersId: reportCheersId > 0 && type == .CHEERS ? reportCheersId : nil, audioContentId: nil)
@@ -316,12 +316,12 @@ final class UserProfileFanTalkViewModel: 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
}
}