feat(i18n): 시리즈/재생목록 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -125,13 +125,13 @@ struct ContentPlaylistDetailView: View {
|
||||
}
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("만든 날짜 \(response.createdDate)")
|
||||
Text(I18n.Content.Playlist.createdDate(response.createdDate))
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.gray90)
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("\(response.contentCount)개")
|
||||
Text(I18n.Content.Playlist.contentCount(response.contentCount))
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
@@ -141,7 +141,7 @@ struct ContentPlaylistDetailView: View {
|
||||
HStack(spacing: 5.3) {
|
||||
Image("ic_playlist_play")
|
||||
|
||||
Text("Play")
|
||||
Text(I18n.Content.Playlist.play)
|
||||
.appFont(size: 14.7, weight: .bold)
|
||||
.foregroundColor(Color.white)
|
||||
}
|
||||
@@ -159,7 +159,7 @@ struct ContentPlaylistDetailView: View {
|
||||
HStack(spacing: 5.3) {
|
||||
Image("ic_playlist_shuffle")
|
||||
|
||||
Text("Shuffle")
|
||||
Text(I18n.Content.Playlist.shuffle)
|
||||
.appFont(size: 14.7, weight: .bold)
|
||||
.foregroundColor(Color.white)
|
||||
}
|
||||
@@ -255,7 +255,7 @@ struct ContentPlaylistDetailView: View {
|
||||
Spacer()
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
Text("삭제")
|
||||
Text(I18n.Common.delete)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
|
||||
@@ -50,13 +50,13 @@ final class ContentPlaylistDetailViewModel: 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
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ final class ContentPlaylistDetailViewModel: ObservableObject {
|
||||
let decoded = try jsonDecoder.decode(ApiResponseWithoutData.self, from: responseData)
|
||||
|
||||
if decoded.success {
|
||||
self.errorMessage = "삭제되었습니다."
|
||||
self.errorMessage = I18n.Playlist.deleteCompleted
|
||||
self.isShowPopup = true
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
@@ -94,13 +94,13 @@ final class ContentPlaylistDetailViewModel: 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
|
||||
}
|
||||
|
||||
|
||||
@@ -27,14 +27,14 @@ struct ContentPlaylistModifyView: View {
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text("재생목록 수정")
|
||||
Text(I18n.Content.Playlist.modifyTitle)
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("수정")
|
||||
Text(I18n.Content.Playlist.modifyAction)
|
||||
.appFont(size: 14.7, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(minHeight: 48)
|
||||
@@ -51,7 +51,7 @@ struct ContentPlaylistModifyView: View {
|
||||
.background(Color.black)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("재생목록 제목")
|
||||
Text(I18n.Content.Playlist.titleLabel)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
@@ -84,7 +84,7 @@ struct ContentPlaylistModifyView: View {
|
||||
.padding(.horizontal, 13.3)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("재생목록 설명을 입력해 주세요")
|
||||
Text(I18n.Content.Playlist.descriptionLabel)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
@@ -119,7 +119,7 @@ struct ContentPlaylistModifyView: View {
|
||||
HStack(spacing: 8) {
|
||||
Image("btn_plus_round")
|
||||
|
||||
Text("새로운 콘텐츠 추가/제거")
|
||||
Text(I18n.Content.Playlist.addContentAction)
|
||||
.appFont(size: 14.7, weight: .bold)
|
||||
.foregroundColor(Color.button)
|
||||
}
|
||||
|
||||
@@ -57,13 +57,13 @@ final class ContentPlaylistModifyViewModel: 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
|
||||
}
|
||||
|
||||
@@ -112,13 +112,13 @@ final class ContentPlaylistModifyViewModel: 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
|
||||
}
|
||||
@@ -129,13 +129,13 @@ final class ContentPlaylistModifyViewModel: 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user