diff --git a/SodaLive/Sources/Home/HomeCreatorRankingItemView.swift b/SodaLive/Sources/Home/HomeCreatorRankingItemView.swift index aab418b..5147a29 100644 --- a/SodaLive/Sources/Home/HomeCreatorRankingItemView.swift +++ b/SodaLive/Sources/Home/HomeCreatorRankingItemView.swift @@ -45,7 +45,7 @@ struct HomeCreatorRankingItemView: View { Spacer() if item.id != UserDefaults.int(forKey: .userId) { - Text(item.follow ? "팔로잉" : "팔로우") + Text(item.follow ? I18n.LiveRoom.following : I18n.LiveRoom.follow) .appFont(size: 14, weight: .regular) .padding(.vertical, 4) .frame(maxWidth: .infinity) diff --git a/SodaLive/Sources/Home/HomeLatestContentView.swift b/SodaLive/Sources/Home/HomeLatestContentView.swift index 1b4eaed..1813eec 100644 --- a/SodaLive/Sources/Home/HomeLatestContentView.swift +++ b/SodaLive/Sources/Home/HomeLatestContentView.swift @@ -23,13 +23,13 @@ struct HomeLatestContentView: View { var body: some View { HStack(spacing: 0) { - Text("최신 콘텐츠") + Text(I18n.Common.latestContent) .appFont(size: 24, weight: .bold) .foregroundColor(.white) Spacer() - Text("전체보기") + Text(I18n.Common.viewAll) .appFont(size: 14, weight: .regular) .foregroundColor(.init(hex: "78909C")) .onTapGesture { onClickMore() } diff --git a/SodaLive/Sources/Home/HomeTabView.swift b/SodaLive/Sources/Home/HomeTabView.swift index 989d552..a4fb4d6 100644 --- a/SodaLive/Sources/Home/HomeTabView.swift +++ b/SodaLive/Sources/Home/HomeTabView.swift @@ -120,7 +120,7 @@ struct HomeTabView: View { VStack(alignment: .leading, spacing: 48) { if !viewModel.liveList.isEmpty { VStack(alignment: .leading, spacing: 16) { - Text("지금 라이브중") + Text(I18n.Home.liveNowSectionTitle) .appFont(size: 24, weight: .bold) .foregroundColor(.white) .padding(.horizontal, 24) @@ -144,7 +144,7 @@ struct HomeTabView: View { if !viewModel.creatorRanking.isEmpty { VStack(alignment: .leading, spacing: 16) { - Text("인기 크리에이터") + Text(I18n.Home.popularCreatorSectionTitle) .appFont(size: 24, weight: .bold) .foregroundColor(.white) .padding(.horizontal, 24) @@ -212,13 +212,13 @@ struct HomeTabView: View { if !viewModel.originalAudioDramaList.isEmpty { VStack(alignment: .leading, spacing: 16) { HStack(spacing: 0) { - Text("오직 보이스온에서만") + Text(I18n.Home.onlyOnVoiceOnSectionTitle) .appFont(size: 24, weight: .bold) .foregroundColor(.white) Spacer() - Text("전체보기") + Text(I18n.Common.viewAll) .appFont(size: 14, weight: .regular) .foregroundColor(.init(hex: "78909C")) .onTapGesture { @@ -260,10 +260,10 @@ struct HomeTabView: View { // 인기 캐릭터 섹션 if !viewModel.popularCharacters.isEmpty { CharacterSectionView( - title: "인기 캐릭터 채팅", + title: I18n.Home.popularCharacterChatSectionTitle, items: viewModel.popularCharacters, isShowRank: true, - trailingTitle: "전체보기", + trailingTitle: I18n.Common.viewAll, onTapTrailing: { if let onTapPopularCharacterAllView = onTapPopularCharacterAllView { onTapPopularCharacterAllView() @@ -281,7 +281,7 @@ struct HomeTabView: View { if !viewModel.recommendChannelList.isEmpty { VStack(alignment: .leading, spacing: 16) { - Text("추천 채널") + Text(I18n.Home.recommendChannelSectionTitle) .appFont(size: 24, weight: .bold) .foregroundColor(.white) .padding(.horizontal, 24) @@ -300,13 +300,13 @@ struct HomeTabView: View { if !viewModel.freeContentList.isEmpty { VStack(alignment: .leading, spacing: 16) { HStack(spacing: 0) { - Text("무료 콘텐츠") + Text(I18n.Home.freeContentSectionTitle) .appFont(size: 24, weight: .bold) .foregroundColor(.white) Spacer() - Text("전체보기") + Text(I18n.Common.viewAll) .appFont(size: 14, weight: .regular) .foregroundColor(.init(hex: "78909C")) .onTapGesture { @@ -330,13 +330,13 @@ struct HomeTabView: View { if !viewModel.pointAvailableContentList.isEmpty { VStack(alignment: .leading, spacing: 16) { HStack(spacing: 0) { - Text("포인트 대여 콘텐츠") + Text(I18n.Home.pointRentalContentSectionTitle) .appFont(size: 24, weight: .bold) .foregroundColor(.white) Spacer() - Text("전체보기") + Text(I18n.Common.viewAll) .appFont(size: 14, weight: .regular) .foregroundColor(.init(hex: "78909C")) .onTapGesture { @@ -360,7 +360,7 @@ struct HomeTabView: View { if !viewModel.recommendContentList.isEmpty { VStack(alignment: .leading, spacing: 16) { HStack { - Text("추천 콘텐츠") + Text(I18n.Home.recommendContentSectionTitle) .appFont(size: 24, weight: .bold) .foregroundColor(.white) @@ -397,21 +397,7 @@ struct HomeTabView: View { } } - Text(""" - - 회사명 : 주식회사 소다라이브 - - - 대표자 : 이재형 - - - 주소 : 경기도 성남시 분당구 황새울로335번길 10, 5층 563A호 - - - 사업자등록번호 : 870-81-03220 - - - 통신판매업신고 : 제2024-성남분당B-1012호 - - - 고객센터 : 02.2055.1477 (이용시간 10:00~19:00) - - - 대표 이메일 : sodalive.official@gmail.com - """) + Text(I18n.Settings.companyInfo) .appFont(size: 11, weight: .regular) .foregroundColor(Color.gray77) .padding(.horizontal, 13.3) @@ -425,8 +411,8 @@ struct HomeTabView: View { Image("ic_thumb_play") .resizable() .frame(width: 20, height: 20) - - Text("콘텐츠 업로드") + + Text(I18n.CreateContent.uploadAction) .appFont(size: 13.3, weight: .bold) .foregroundColor(.white) } @@ -442,15 +428,14 @@ struct HomeTabView: View { if isShowAuthConfirmView { SodaDialog( - title: "본인인증", - desc: "보이스온의 오픈월드 캐릭터톡은\n청소년 보호를 위해 본인인증한\n성인만 이용이 가능합니다.\n" + - "캐릭터톡 서비스를 이용하시려면\n본인인증을 하고 이용해주세요.", - confirmButtonTitle: "본인인증 하러가기", + title: I18n.Chat.Auth.dialogTitle, + desc: I18n.Chat.Auth.dialogDescription, + confirmButtonTitle: I18n.Chat.Auth.goToVerification, confirmButtonAction: { isShowAuthConfirmView = false isShowAuthView = true }, - cancelButtonTitle: "취소", + cancelButtonTitle: I18n.Common.cancel, cancelButtonAction: { isShowAuthConfirmView = false pendingAction = nil @@ -517,7 +502,7 @@ struct HomeTabView: View { isShowAuthView = false } .onError { _ in - AppState.shared.errorMessage = "본인인증 중 오류가 발생했습니다." + AppState.shared.errorMessage = I18n.Chat.Auth.authenticationError AppState.shared.isShowErrorPopup = true isShowAuthView = false } diff --git a/SodaLive/Sources/Home/HomeWeeklyChartView.swift b/SodaLive/Sources/Home/HomeWeeklyChartView.swift index 1f7556b..9c15371 100644 --- a/SodaLive/Sources/Home/HomeWeeklyChartView.swift +++ b/SodaLive/Sources/Home/HomeWeeklyChartView.swift @@ -31,7 +31,7 @@ struct HomeWeeklyChartView: View { var body: some View { VStack(spacing: 16) { HStack(spacing: 0) { - Text("보온 주간 차트") + Text(I18n.Home.weeklyChartSectionTitle) .appFont(size: 24, weight: .bold) .foregroundColor(.white) diff --git a/SodaLive/Sources/Home/RecommendChannel/RecommendChannelItemView.swift b/SodaLive/Sources/Home/RecommendChannel/RecommendChannelItemView.swift index e295a2b..758b1ad 100644 --- a/SodaLive/Sources/Home/RecommendChannel/RecommendChannelItemView.swift +++ b/SodaLive/Sources/Home/RecommendChannel/RecommendChannelItemView.swift @@ -29,7 +29,7 @@ struct RecommendChannelItemView: View { .foregroundColor(.white) HStack(spacing: 4) { - Text("콘텐츠") + Text(I18n.Home.RecommendChannel.contentLabel) .appFont(size: 18, weight: .regular) .foregroundColor(.white) diff --git a/SodaLive/Sources/I18n/I18n.swift b/SodaLive/Sources/I18n/I18n.swift index 5ced527..2872c5b 100644 --- a/SodaLive/Sources/I18n/I18n.swift +++ b/SodaLive/Sources/I18n/I18n.swift @@ -1800,6 +1800,7 @@ enum I18n { static var selectTheme: String { pick(ko: "테마 선택", en: "Select theme", ja: "テーマ選択") } static var uploadContentDescriptionHint: String { pick(ko: "내용을 입력하세요", en: "Enter the details.", ja: "内容を入力してください") } static var uploadTitle: String { pick(ko: "콘텐츠 업로드", en: "Content upload", ja: "コンテンツ投稿") } + static var uploadAction: String { pick(ko: "콘텐츠 업로드", en: "Upload content", ja: "コンテンツを投稿") } static var uploadDescription: String { pick( ko: "등록한 콘텐츠가 업로드 중입니다.\n콘텐츠 등록이 완료되면 알림을 보내드립니다.\n이 페이지를 나가도 콘텐츠는 자동으로 등록됩니다.", @@ -2178,6 +2179,50 @@ If you block this user, the following features will be restricted. } } + enum Home { + static var liveNowSectionTitle: String { + pick(ko: "지금 라이브중", en: "Live now", ja: "ライブ配信中") + } + + static var popularCreatorSectionTitle: String { + pick(ko: "인기 크리에이터", en: "Popular creators", ja: "人気クリエイター") + } + + static var onlyOnVoiceOnSectionTitle: String { + pick(ko: "오직 보이스온에서만", en: "Only on VoiceOn", ja: "VoiceOnだけで") + } + + static var popularCharacterChatSectionTitle: String { + pick(ko: "인기 캐릭터 채팅", en: "Popular character chats", ja: "人気キャラクターチャット") + } + + static var recommendChannelSectionTitle: String { + pick(ko: "추천 채널", en: "Recommended channels", ja: "おすすめチャンネル") + } + + static var freeContentSectionTitle: String { + pick(ko: "무료 콘텐츠", en: "Free content", ja: "無料コンテンツ") + } + + static var pointRentalContentSectionTitle: String { + pick(ko: "포인트 대여 콘텐츠", en: "Point rental content", ja: "ポイントレンタルコンテンツ") + } + + static var recommendContentSectionTitle: String { + pick(ko: "추천 콘텐츠", en: "Recommended content", ja: "おすすめコンテンツ") + } + + static var weeklyChartSectionTitle: String { + pick(ko: "보온 주간 차트", en: "VoiceOn weekly chart", ja: "ボイスオン週間チャート") + } + + enum RecommendChannel { + static var contentLabel: String { + pick(ko: "콘텐츠", en: "Content", ja: "コンテンツ") + } + } + } + enum Dialog { enum ApplyAuditionComplete { static var thankYouDescription: String { diff --git a/docs/20260331_하드코딩텍스트_I18n통일계획.md b/docs/20260331_하드코딩텍스트_I18n통일계획.md index 418dc40..c2111a8 100644 --- a/docs/20260331_하드코딩텍스트_I18n통일계획.md +++ b/docs/20260331_하드코딩텍스트_I18n통일계획.md @@ -301,15 +301,15 @@ ### Home (9) #### Group 1 (1-9) -- [ ] `SodaLive/Sources/Home/HomeAuditionView.swift` -- [ ] `SodaLive/Sources/Home/HomeCreatorRankingItemView.swift` -- [ ] `SodaLive/Sources/Home/HomeLatestContentView.swift` -- [ ] `SodaLive/Sources/Home/HomeLiveItemView.swift` -- [ ] `SodaLive/Sources/Home/HomeTabView.swift` -- [ ] `SodaLive/Sources/Home/HomeWeeklyChartItemView.swift` -- [ ] `SodaLive/Sources/Home/HomeWeeklyChartView.swift` -- [ ] `SodaLive/Sources/Home/RecommendChannel/RecommendChannelContentItemView.swift` -- [ ] `SodaLive/Sources/Home/RecommendChannel/RecommendChannelItemView.swift` +- [x] `SodaLive/Sources/Home/HomeAuditionView.swift` +- [x] `SodaLive/Sources/Home/HomeCreatorRankingItemView.swift` +- [x] `SodaLive/Sources/Home/HomeLatestContentView.swift` +- [x] `SodaLive/Sources/Home/HomeLiveItemView.swift` +- [x] `SodaLive/Sources/Home/HomeTabView.swift` +- [x] `SodaLive/Sources/Home/HomeWeeklyChartItemView.swift` +- [x] `SodaLive/Sources/Home/HomeWeeklyChartView.swift` +- [x] `SodaLive/Sources/Home/RecommendChannel/RecommendChannelContentItemView.swift` +- [x] `SodaLive/Sources/Home/RecommendChannel/RecommendChannelItemView.swift` ### IAP (1) - [x] `SodaLive/Sources/IAP/StoreManager.swift` @@ -866,3 +866,29 @@ - LSP 진단: SourceKit 단독 해석 환경에서 외부 모듈/프로젝트 심볼 미해결 오류(`Kingfisher`, `RichText`, `AppState` 등)가 보고되나, 동일 변경셋은 `xcodebuild` 실컴파일 통과로 검증 완료. - 빌드 검증: `SodaLive`, `SodaLive-dev` Debug 빌드 모두 성공(`** BUILD SUCCEEDED **`). - 테스트 검증: 두 스킴 모두 `Scheme ... is not currently configured for the test action.`로 테스트 액션 미구성 확인(코드 실패 아님, 스킴 제약). + +### 17차 구현 (Home 모듈 Group 1, 9개 파일 처리, 2026-04-01) +- 무엇/왜/어떻게: + - 무엇: `변경 대상 파일 전체 목록`의 `Home` Group 1(9개 파일)을 전수 점검하고, 런타임 사용자 노출 하드코딩 문구를 `I18n.*` 참조로 전환했다. + - 왜: 홈 탭의 섹션 헤더/버튼/본인인증 다이얼로그/오류 문구가 하드코딩 상태여서 모듈 간 i18n 접근 방식이 일관되지 않았기 때문이다. + - 어떻게: explore/librarian 병렬 탐색 + `grep`/`ast_grep_search`/`read` 직접 검증으로 런타임 문자열과 Preview 샘플 문자열을 분리한 뒤, `I18n.swift`에 `I18n.Home` 네임스페이스를 추가하고 호출부를 치환했다. +- 실행 명령/도구: + - `task(subagent_type="explore", ...)` x2 (`bg_7a1064e4`, `bg_2856a903`) + - `task(subagent_type="librarian", ...)` x1 (`bg_2220e841`) + - `background_output(task_id=...)` x3 (위 3개 task 결과 수집) + - `grep("\"[^\"]*[가-힣][^\"]*\"", include=*.swift, path=SodaLive/Sources/Home)` + - `grep("I18n\\.|String\\(localized:|NSLocalizedString\\(|LocalizedStringKey\\(", include=*.swift, path=SodaLive/Sources/Home)` + - `ast_grep_search(pattern="Text(\"$TEXT\")", lang=swift, paths=[SodaLive/Sources/Home])` + - `bash: rg -n ...` (`command not found` 확인) + - `lsp_diagnostics(filePath=변경 파일 전체)` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test` +- 결과: + - `I18n.swift`에 `I18n.Home` 키셋 추가: `liveNowSectionTitle`, `popularCreatorSectionTitle`, `onlyOnVoiceOnSectionTitle`, `popularCharacterChatSectionTitle`, `recommendChannelSectionTitle`, `freeContentSectionTitle`, `pointRentalContentSectionTitle`, `recommendContentSectionTitle`, `weeklyChartSectionTitle`, `RecommendChannel.contentLabel`. + - 치환 완료 파일(실치환 5개): `HomeCreatorRankingItemView.swift`, `HomeLatestContentView.swift`, `HomeTabView.swift`, `HomeWeeklyChartView.swift`, `RecommendChannelItemView.swift`. + - 점검만 수행(실치환 없음 4개): `HomeAuditionView.swift`, `HomeLiveItemView.swift`, `HomeWeeklyChartItemView.swift`, `RecommendChannelContentItemView.swift` (잔여 한글은 Preview 샘플 데이터만 존재). + - 공통 키 재사용 정리: `I18n.Common.viewAll`, `I18n.Common.latestContent`, `I18n.Settings.companyInfo`, `I18n.Chat.Auth.*`, `I18n.LiveRoom.follow/following` 적용. + - Oracle 후속 보정: 홈 FAB 버튼 문구를 제목형 키(`uploadTitle`)에서 CTA 전용 키(`I18n.CreateContent.uploadAction`)로 분리해 영문/일문 의미를 버튼 행동과 일치시킴. + - Home Group 1 체크박스 9개 `- [x]` 완료 반영.