feat(i18n): 시리즈/재생목록 하드코딩 문구를 I18n 키로 통일한다

This commit is contained in:
Yu Sung
2026-04-01 17:33:13 +09:00
parent c039931f34
commit 1ec56a1f15
27 changed files with 253 additions and 160 deletions

View File

@@ -26,14 +26,14 @@ struct ContentPlaylistCreateView: View {
.resizable()
.frame(width: 20, height: 20)
Text("새 재생목록 만들기")
Text(I18n.Content.Playlist.createTitle)
.appFont(size: 18.3, weight: .bold)
.foregroundColor(Color.grayee)
}
Spacer()
Text("저장")
Text(I18n.Content.Playlist.createSave)
.appFont(size: 14.7, weight: .medium)
.foregroundColor(Color.grayee)
.frame(minHeight: 48)
@@ -50,7 +50,7 @@ struct ContentPlaylistCreateView: View {
.background(Color.black)
HStack(spacing: 0) {
Text("재생목록 제목")
Text(I18n.Content.Playlist.titleLabel)
.appFont(size: 16.7, weight: .bold)
.foregroundColor(Color.grayee)
@@ -83,7 +83,7 @@ struct ContentPlaylistCreateView: View {
.padding(.horizontal, 13.3)
HStack(spacing: 0) {
Text("재생목록 설명을 입력해 주세요")
Text(I18n.Content.Playlist.descriptionLabel)
.appFont(size: 16.7, weight: .bold)
.foregroundColor(Color.grayee)
@@ -118,7 +118,7 @@ struct ContentPlaylistCreateView: View {
HStack(spacing: 8) {
Image("btn_plus_round")
Text("새로운 콘텐츠 추가/제거")
Text(I18n.Content.Playlist.addContentAction)
.appFont(size: 14.7, weight: .bold)
.foregroundColor(Color.button)
}

View File

@@ -57,13 +57,13 @@ final class ContentPlaylistCreateViewModel: 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
self.isLoading = false
}
@@ -74,13 +74,13 @@ final class ContentPlaylistCreateViewModel: ObservableObject {
private func validate() -> Bool {
if (title.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || title.count < 3) {
errorMessage = "제목을 3자 이상 입력하세요"
errorMessage = I18n.Content.Playlist.titleValidation
isShowPopup = true
return false
}
if (contentList.isEmpty) {
errorMessage = "콘텐츠를 1개 이상 추가하세요"
errorMessage = I18n.Content.Playlist.contentValidation
isShowPopup = true
return false
}

View File

@@ -17,14 +17,14 @@ struct PlaylistAddContentView: View {
var body: some View {
VStack(alignment: .leading, spacing: 13.3) {
ZStack {
Text("새로운 콘텐츠 추가/제거")
Text(I18n.Content.Playlist.addContentAction)
.appFont(size: 18.3, weight: .bold)
.foregroundColor(Color.grayee)
HStack(spacing: 0) {
Spacer()
Text("닫기")
Text(I18n.Content.Playlist.close)
.appFont(size: 14.7, weight: .medium)
.foregroundColor(Color.grayee)
.frame(minHeight: 48)
@@ -36,11 +36,11 @@ struct PlaylistAddContentView: View {
.background(Color.black)
HStack(alignment: .center, spacing: 5.3) {
Text("전체")
Text(I18n.Content.Playlist.totalLabel)
.appFont(size: 14.7, weight: .medium)
.foregroundColor(Color.white)
Text("\(viewModel.totalCount)")
Text(I18n.Content.Playlist.selectionCount(viewModel.totalCount))
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.gray90)
}