Files
sodalive-ios/docs/20260331_Chat모듈_I18n전환계획.md

3.4 KiB

20260331 Chat 모듈 I18n 전환 계획

작업 체크리스트

  • Chat 모듈 28개 파일의 사용자 노출 하드코딩 문자열 전수 스캔
  • I18n.swiftI18n.Chat 네임스페이스 키 보강
  • Chat 모듈 28개 파일 호출부를 I18n.Chat.*로 치환
  • 문서(20260331_하드코딩텍스트_I18n통일계획.md) Chat 섹션 체크박스 반영
  • 검증 수행: LSP 진단, SodaLive/SodaLive-dev Debug 빌드, 테스트 액션 확인

수용 기준

  • Chat 모듈 대상 파일에서 사용자 노출 하드코딩 문자열이 I18n.* 참조로 전환된다.
  • 신규 키는 역할 중심 네이밍을 따르고 I18n.Chat 계층에 배치된다.
  • SodaLiveSodaLive-dev Debug 빌드가 성공한다.
  • 테스트 스킴 제약 여부를 포함해 실행 결과가 문서 하단 검증 기록에 남는다.

검증 기록

Chat 모듈 구현/검증 (2026-03-31)

  • 무엇/왜/어떻게:
    • 무엇: Chat 대상 28개 파일을 기준으로 사용자 노출 하드코딩 문구를 I18n.Chat.*I18n.Common.commonError로 전환.
    • 왜: Chat 영역에서 String(localized:)/직접 리터럴/반복 오류 문구가 혼재되어 언어 일관성과 유지보수성이 저하되어 있었음.
    • 어떻게: explore/librarian/oracle 병렬 조사 + grep/ast_grep_search/rg(미설치 확인) 직접 검증을 병행해 런타임 문구만 치환하고 Preview 샘플은 예외로 유지.
  • 실행 명령/도구:
    • task(subagent_type="explore", ...) x2 (bg_c33457a5, bg_e543550a)
    • task(subagent_type="librarian", ...) x2 (bg_47a108d5, bg_91c00954)
    • task(subagent_type="oracle", ...) x1 (bg_a6465165)
    • grep("\"[^\"]*[가-힣][^\"]*\"", include=*.swift, path=SodaLive/Sources/Chat)
    • ast_grep_search(pattern="Text(\"$TEXT\")", lang=swift, paths=[SodaLive/Sources/Chat])
    • 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" -configuration Debug build (Oracle 피드백 반영 후 재검증)
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build (Oracle 피드백 반영 후 재검증)
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test
  • 결과:
    • I18n.swiftI18n.Chat(Auth/Character/Original/Talk/Room) 키셋 추가.
    • Chat 호출부 24개 파일 실치환 + Preview/비노출(샘플 데이터 등) 4개 파일 예외 유지로 28개 전수 처리 완료.
    • Chat 모듈의 String(localized:) 직접 참조 제거 확인.
    • Oracle 후속 보정: Bootpay 입력값(payload.pg/payload.method/payload.orderName)을 고정값으로 복원, characterType.rawValue 직접 출력 제거, 전송 실패 시 error.localizedDescription 사용자 노출 제거(I18n.Common.commonError), 최근 대화 헤더 trailing space 제거.
    • 하드코딩 한글 재검증 결과, 남은 문자열은 Preview 샘플/SDK 입력값/비노출 분기 로직만 존재.
    • 빌드 검증: SodaLive, SodaLive-dev Debug 빌드 모두 ** BUILD SUCCEEDED **.
    • 테스트 검증: 두 스킴 모두 Scheme ... is not currently configured for the test action. (스킴 제약, 코드 실패 아님).