feat(i18n): 콘텐츠 상세/댓글 하드코딩 문구를 I18n 키로 통일한다

This commit is contained in:
Yu Sung
2026-04-01 16:50:56 +09:00
parent a90996603b
commit c039931f34
30 changed files with 503 additions and 202 deletions

View File

@@ -37,7 +37,7 @@ struct ContentPlaylistItemView: View {
.lineLimit(1)
}
Text("\(item.contentCount)")
Text(I18n.Content.Playlist.itemCount(item.contentCount))
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.gray90)
.lineLimit(1)

View File

@@ -17,7 +17,7 @@ struct ContentPlaylistListView: View {
var body: some View {
BaseView(isLoading: $viewModel.isLoading) {
VStack(spacing: 13.3) {
Text("+ 새 재생목록 만들기")
Text(I18n.Content.Playlist.createNewAction)
.appFont(size: 14.7, weight: .bold)
.foregroundColor(Color.white)
.padding(.vertical, 13.3)
@@ -31,11 +31,11 @@ struct ContentPlaylistListView: View {
if viewModel.playlists.isEmpty {
VStack(spacing: 13.3) {
Text("재생목록이 비어있습니다.")
Text(I18n.Content.Playlist.emptyTitle)
.appFont(size: 14.7, weight: .bold)
.foregroundColor(Color.grayee)
Text("자주 듣는 콘텐츠를\n재생목록으로 만들어 보세요.")
Text(I18n.Content.Playlist.emptyDescription)
.appFont(size: 11, weight: .medium)
.foregroundColor(Color.grayee)
.multilineTextAlignment(.center)
@@ -45,11 +45,11 @@ struct ContentPlaylistListView: View {
.cornerRadius(4.7)
} else {
HStack(spacing: 5.3) {
Text("전체")
Text(I18n.Content.Playlist.totalLabel)
.appFont(size: 14.7, weight: .medium)
.foregroundColor(Color.white)
Text("\(viewModel.totalCount)")
Text("\(viewModel.totalCount)\(I18n.Content.Count.countUnit)")
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.gray90)

View File

@@ -41,18 +41,18 @@ final class ContentPlaylistListViewModel: ObservableObject {
self.totalCount = data.totalCount
self.playlists.append(contentsOf: data.items)
} else {
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
}
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = I18n.Common.commonError
}
self.isShowPopup = true
}
} catch {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.isShowPopup = true
}
} catch {
self.errorMessage = I18n.Common.commonError
self.isShowPopup = true
}
self.isLoading = false
}