feat(chat): 채팅 모듈 하드코딩 문구를 I18n 키로 통일한다

This commit is contained in:
Yu Sung
2026-03-31 16:30:48 +09:00
parent 222520d5e9
commit 47085dc1ca
27 changed files with 464 additions and 128 deletions

View File

@@ -58,7 +58,7 @@ struct OriginalWorkDetailHeaderView: View {
}
if item.isAdult {
Text("19+")
Text(I18n.Chat.Original.adultBadge)
.appFont(size: 14, weight: .regular)
.foregroundColor(Color(hex: "ff5c49"))
.padding(.horizontal, 7)

View File

@@ -151,7 +151,7 @@ struct OriginalWorkInfoView: View {
ZStack {
VStack(spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("작품 소개")
Text(I18n.Chat.Original.workIntroductionTitle)
.appFont(size: 16, weight: .bold)
.foregroundColor(.white)
@@ -170,7 +170,7 @@ struct OriginalWorkInfoView: View {
.cornerRadius(16)
VStack(alignment: .leading, spacing: 8) {
Text("원작 보러 가기")
Text(I18n.Chat.Original.viewOriginalLinksTitle)
.appFont(size: 16, weight: .bold)
.foregroundColor(Color(hex: "B0BEC5"))
@@ -197,26 +197,26 @@ struct OriginalWorkInfoView: View {
.cornerRadius(16)
VStack(alignment: .leading, spacing: 8) {
Text("상세 정보")
Text(I18n.Chat.Original.detailInfoTitle)
.appFont(size: 16, weight: .bold)
.foregroundColor(.white)
HStack(spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
if let _ = response.writer {
Text("작가")
Text(I18n.Chat.Original.writerLabel)
.appFont(size: 14, weight: .regular)
.foregroundColor(Color(hex: "B0BEC5"))
}
if let _ = response.studio {
Text("제작사")
Text(I18n.Chat.Original.studioLabel)
.appFont(size: 14, weight: .regular)
.foregroundColor(Color(hex: "B0BEC5"))
}
if let _ = response.originalWork {
Text("원작")
Text(I18n.Chat.Original.originalLabel)
.appFont(size: 14, weight: .regular)
.foregroundColor(Color(hex: "B0BEC5"))
}

View File

@@ -45,7 +45,7 @@ final class OriginalWorkDetailViewModel: ObservableObject {
case .failure(let error):
ERROR_LOG(error.localizedDescription)
self?.isLoading = false
self?.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self?.errorMessage = I18n.Common.commonError
self?.isShowPopup = true
}
} receiveValue: { [weak self] response in
@@ -61,14 +61,14 @@ final class OriginalWorkDetailViewModel: ObservableObject {
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
}
self.isShowPopup = true
self.isLoading = false
}
} catch {
self.isLoading = false
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
self.isShowPopup = true
}
}