Skip to content

[FEAT] 홈/통계/타임사이드바 다국어(i18n) 텍스트 매핑 추가#113

Merged
kimminna merged 6 commits into
developfrom
feat/web/112-i18n-locale-mapping
Jul 8, 2026
Merged

[FEAT] 홈/통계/타임사이드바 다국어(i18n) 텍스트 매핑 추가#113
kimminna merged 6 commits into
developfrom
feat/web/112-i18n-locale-mapping

Conversation

@kimminna

@kimminna kimminna commented Jul 7, 2026

Copy link
Copy Markdown
Member

ISSUE 🔗

close #112



What is this PR? 🔍

홈, 통계, 타임 사이드바 화면에서 하드코딩돼 있던 한글 텍스트(요일/태그/우선순위/월 이름/버튼 라벨)를 next-intl 기반으로 다국어 매핑했습니다.

배경

  • 기존 구조: 요일/태그/우선순위/뷰 옵션 같은 텍스트가 컴포넌트에 직접 한글로 박혀 있었고, 요일 계산 로직은 home/_utils/date.tsTimeSidebarHeader.tsx(Intl.DateTimeFormat("ko-KR", ...)) 두 곳에 서로 다른 방식으로 중복 구현돼 있었습니다.
  • 발생 문제: 로케일을 영어로 바꿔도 요일/태그/우선순위/월 이름이 그대로 한글로 남았고, 요일 로직이 두 곳에 나뉘어 있어 하나만 고치면 다른 화면은 그대로 한글로 남는 상태였습니다.
  • 해결 방향: 여러 화면에서 재사용되는 값(요일/태그/우선순위)은 Common 네임스페이스로, 홈페이지 전용 텍스트(오늘/기본/7일/할 일 추가)는 Home 네임스페이스로 나눠 정리하고, 요일 계산은 공용 유틸 getDayOfWeekKey 하나로 통일했습니다.

홈 헤더 (오늘 / 기본 / 7일)

  • 변경 요약: HomeHeaderContainer의 "오늘"/"기본"/"7일" 텍스트를 Home 네임스페이스로 옮겼습니다.
  • 이유: 기존에는 VIEW_OPTIONS = ["기본", "7일"]처럼 표시 문자열 자체가 선택 상태값으로 쓰이고 있어서, 그대로 번역 문자열로 바꾸면 로케일 전환 시 선택된 값이 어느 옵션인지 어긋날 수 있었습니다.
  • 구현 방식: 뷰 옵션 상태를 문자열 대신 isWeekView(boolean)로 바꾸고, 화면에 보여줄 라벨만 t("viewBasic")/t("viewWeek")로 계산해 넘깁니다. Header.TodayButton에도 label prop을 추가해 t("today")를 전달합니다.

AddTaskButton

  • 변경 요약: 플레이스홀더 텍스트("영문영문영문")를 t("addTask")로 교체하고, 플러스 아이콘을 텍스트와 같은 톤인 PlusGrayIcon(#9F9F9F, gray-700)으로 바꿨습니다.
  • 이유: 기존 PlusIcon#3F3F3F(gray-900) 고정이라 옆 텍스트(text-timo-gray-700)와 색 톤이 달라 보였습니다.
  • 구현 방식: 디자인 시스템에 이미 동일한 색으로 생성돼 있던 PlusGrayIcon을 그대로 사용했습니다. Tailwind [&>path]:fill-*로 기존 아이콘 색을 오버라이드하는 방식도 검토했으나, 이미 존재하는 아이콘을 쓰는 쪽이 더 적합해 채택하지 않았습니다.

홈 투두 카드 (태그 · 우선순위)

  • 변경 요약: TodoTag.name을 자유 문자열에서 TodoTagName(DAILY_LIFE/WORK/EXERCISE/ASSIGNMENT/ADDITIONAL) 유니온으로 좁히고, mock 데이터와 카드 렌더링을 이 값 기준으로 번역하도록 바꿨습니다. 우선순위도 같은 방식으로 Common.priority.*에 매핑했습니다.
  • 이유: 기존 mock 데이터가 "루틴", "자기계발"처럼 화면에 노출하기로 정한 5개 태그(일상/업무/운동/과제/기타) 밖의 임의 문자열을 쓰고 있어서 그대로는 번역 key로 매핑할 수 없었습니다. 우선순위는 색상 아이콘만 있고 텍스트/접근성 라벨이 없었습니다.
  • 구현 방식: HomeTodoContainer에서 TAG_LABEL_KEY/PRIORITY_LABEL_KEYRecord 상수로 도메인 값 → 번역 key를 매핑하고, tCommon(\tag.${...}`)/tCommon(`priority.${...}`)로 변환한 문자열을 HomeTodoCard에 내려줍니다. 우선순위는 화면에 노출되는 텍스트가 없어서, PriorityIconlabelprop을 추가해aria-label`로만 노출했습니다(시각적으로는 기존과 동일).
  • 경계 · 제약: mock의 "루틴"/"자기계발"은 각각 EXERCISE/ADDITIONAL로 임의 매핑했습니다. 실제 태그 체계가 백엔드/기획에서 확정되면 이 매핑을 다시 맞춰야 합니다.

요일 표시 통일

  • 변경 요약: 요일 계산 로직을 home/_utils/date.ts에서 공용 유틸 apps/timo-web/utils/get-day-of-week-key.ts로 옮기고, 번역 사전도 Home.weekday에서 Common.weekday로 이동했습니다. TimeSidebarHeader가 쓰던 Intl.DateTimeFormat("ko-KR", ...) 하드코딩도 이 공용 유틸 + 사전 조합으로 교체했습니다.
  • 이유: 같은 "요일 표시"가 홈 카드와 타임 사이드바 헤더에서 서로 다른 방식(번역 사전 vs Intl 포맷)으로 구현돼 있어, 하나를 고쳐도 다른 하나는 그대로 한글로 남는 구조였습니다.
  • 구현 방식: getDayOfWeekKey(date)"sunday"~"saturday" key를 반환하면, 두 컴포넌트 모두 useTranslations("Common")으로 t(\weekday.${key}`)`를 호출해 같은 사전을 공유합니다.

통계 헤더 월 라벨

  • 변경 요약: StatisticsHeaderContainer의 월 라벨 포맷을 Intl.DateTimeFormat("ko-KR", { year: "numeric", month: "long" })에서 Intl.DateTimeFormat("en-US", { month: "long" })으로 바꿔, "July"처럼 로케일과 무관하게 항상 영어 월 이름만 표시하도록 했습니다.
  • 이유: 이 화면은 로케일에 따라 한/영을 다르게 보여주는 대신, 두 로케일 모두 동일하게 영어 월 이름만 보여달라는 요구사항이었습니다.



To Reviewers

  • 태그 5종(일상/업무/운동/과제/기타) 중 mock 데이터의 "루틴"→EXERCISE, "자기계발"→ADDITIONAL 매핑은 실제 기획 확정 전 제 임의 판단입니다. 다르면 todo-mock.ts/TAG_LABEL_KEY만 고치면 됩니다.
  • PriorityIcon에 추가한 label prop은 시각적으로는 변화가 없고 aria-label만 붙습니다(스크린리더 전용 개선).



Screenshot 📷



Test Checklist ✔

  • pnpm check-types 통과
  • pnpm lint 통과
  • 브라우저에서 로케일(ko/en) 전환 후 실제 화면 확인 — 미실행
  • pnpm build — 미실행

kimminna added 2 commits July 8, 2026 00:10
- TodayButton, DropdownView에 label/placeholder 오버라이드용 prop을 추가했습니다
- PriorityIcon에 접근성용 label prop을 추가해 스크린리더에서 우선순위를 읽을 수 있게 했습니다
- AddTaskButton의 플러스 아이콘을 텍스트 색상과 일치하는 PlusGrayIcon으로 교체했습니다
- 홈 헤더의 오늘/기본/7일/할 일 추가 텍스트를 Home 네임스페이스로 매핑했습니다
- 홈 투두 카드의 태그·우선순위 값을 고정 유니온 타입으로 정규화하고 Common 네임스페이스로 매핑했습니다
- 요일 표시를 Common.weekday 사전과 공용 getDayOfWeekKey 유틸로 통일했습니다
- 통계 헤더의 월 라벨을 로케일과 무관하게 영어 월 이름만 표시하도록 수정했습니다
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
timo Ready Ready Preview, Comment Jul 8, 2026 7:43am

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kimminna, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e715be2b-cdde-426e-89a4-baca2c3dd09b

📥 Commits

Reviewing files that changed from the base of the PR and between 35a8d22 and a3ee14f.

📒 Files selected for processing (1)
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/HomeTodoContainer.tsx

Walkthrough

홈, 통계, 타임 사이드바 화면의 하드코딩된 한글 텍스트를 next-intl 기반 Common/Home 번역 네임스페이스로 교체했습니다. 요일 키 조회 유틸을 신규 추가하고, TodoTagName 타입을 도입했으며, PriorityIcon에 접근성 라벨을 추가했습니다. 일부 디자인 시스템 컴포넌트의 스타일과 아이콘도 함께 조정되었습니다.

Changes

i18n 매핑 및 관련 UI 정합성

Layer / File(s) Summary
번역 리소스 및 요일 키 유틸
apps/timo-web/messages/en.json, apps/timo-web/messages/ko.json, apps/timo-web/utils/get-day-of-week-key.ts
Common(weekday/tag/priority) 및 Home 번역 키가 추가되고, 날짜로부터 요일 키(sunday~saturday)를 반환하는 getDayOfWeekKey 유틸이 신규 추가됨.
Todo 태그 타입 및 목데이터 정비
.../_types/todo-type.ts, .../_utils/date.ts, .../_mocks/todo-mock.ts
TodoTagName 유니온 타입 도입 및 TodoTag.name 타입 제한, 기존 convertDateToDayOfWeek/DAY_OF_WEEK_LABELS 삭제, 목데이터 tag.name 값을 한글에서 상수 키(WORK, ASSIGNMENT 등)로 변경.
PriorityIcon 라벨/접근성 지원
PriorityIcon.tsx, HomeTodoCard.tsx
PriorityIconPropslabel이 추가되어 존재 시 role="img"/aria-label을, 없으면 aria-hidden을 설정. HomeTodoCardpriorityLabel을 받아 전달.
HomeTodoContainer 번역 매핑
.../_containers/HomeTodoContainer.tsx
TAG_LABEL_KEY/PRIORITY_LABEL_KEY 매핑과 useTranslations로 tagName, priorityLabel, dayOfWeek, addTask 텍스트를 번역 기반으로 전환.
HomeHeaderContainer 뷰 전환 번역화
.../_containers/HomeHeaderContainer.tsx
ViewOption 상수 기반 로직을 isWeekView boolean과 번역 라벨(viewBasic/viewWeek) 기반으로 변경.
TimeSidebarHeader 요일 표기 번역화
TimeSidebarHeader.tsx
Intl.DateTimeFormat 대신 useTranslations("Common") + getDayOfWeekKey로 요일 표기.
통계 헤더 월 라벨 로케일 고정
StatisticsHeaderContainer.tsx
MONTH_LABEL_FORMATTER 로케일을 ko-KR에서 en-US로 변경.
디자인 시스템 스타일/아이콘 조정
AddTaskButton.tsx, TodayButton.tsx, DropdownView.tsx, Header.tsx
PlusIconPlusGrayIcon 교체, 버튼/드롭다운/라벨 span의 Tailwind 클래스 조정.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • Team-Timo/Timo-client#49: PriorityIcon 컴포넌트의 최초 도입과 이번 PR의 label/priorityLabel 확장이 동일 컴포넌트를 다룸.
  • Team-Timo/Timo-client#89: Header 컴포지트 컴포넌트(TodayButton/ViewDropdown)의 신규 구현과 이번 PR의 사용 방식 변경이 직접 연결됨.
  • Team-Timo/Timo-client#105: next-intl 라우팅/메시지 로딩 설정과 이번 PR의 messages/{en,ko}.json 확장이 직접 의존 관계에 있음.

Suggested reviewers: ehye1, yumin-kim2, jjangminii

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning 대부분의 i18n 매핑은 반영됐지만, #112의 Today 탭 타임 사이드바 size를 lg로 렌더링하는 변경은 확인되지 않습니다. Today 탭 선택 시 타임 사이드바에 lg size가 적용되도록 렌더링 조건을 추가하고, 해당 동작을 화면에서 확인해 주세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 홈/통계/타임사이드바 i18n 매핑 추가라는 핵심 변경을 잘 요약합니다.
Description check ✅ Passed 설명이 변경 범위와 배경을 구체적으로 설명해 PR 내용과 잘 맞습니다.
Out of Scope Changes check ✅ Passed 변경된 아이콘과 레이아웃 수정은 홈·통계·사이드바 텍스트 매핑 목적과 자연스럽게 연결됩니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/web/112-i18n-locale-mapping

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added ⏰ Timo-web Timo 웹 서비스 ⌚ Timo-Design-system Timo 디자인 시스템 labels Jul 7, 2026
@github-actions github-actions Bot added ✨ Feature 새로운 기능(기능성) 구현 ♦️ 민아 민아상 labels Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Storybook Preview

항목 링크
Storybook 열기
Chromatic 빌드 확인

마지막 업데이트: 2026-07-08 07:42 UTC

- 리팩터링 과정에서 실수로 빠졌던 Header.SidebarButton과 useNavigationSidebar wiring을 다시 추가했습니다
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Timo Performance Report

Bundle Size — timo-web
라우트 크기 First Load JS
/[locale] 0 B 🟡 205.79 kB
/[locale]/focus 0 B 🟡 205.79 kB
/[locale]/home 0 B 🟡 205.79 kB
/[locale]/onboarding 0 B 🟡 205.79 kB
/[locale]/settings 0 B 🟡 205.79 kB
/[locale]/settings/account 0 B 🟡 205.79 kB
/[locale]/settings/policy 0 B 🟡 205.79 kB
/[locale]/statistics 0 B 🟡 205.79 kB
/[locale]/today 0 B 🟡 205.79 kB

공유 번들: 205.79 kB
🟢 < 200kB  |  🟡 < 350kB  |  🔴 ≥ 350kB (First Load JS · gzip)

Lighthouse — timo-web

⚠️ Lighthouse 결과를 가져오지 못했습니다.

Image Optimization — timo-web

public/ 디렉토리에 이미지가 없습니다.

측정 커밋: 0bb865c

- WeeklyNav 라벨 너비를 w-25에서 w-17로 좁혀 화살표 버튼과의 간격을 맞췄습니다

@ehye1 ehye1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 보면서 다국어 매핑 구조 어떻게 하는지 이해햇습니다,,
굿굿 !! 수고하셨습니다

@jjangminii jjangminii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요일 계산이 date.ts와 TimeSidebarHeader.tsx에서 서로 다르게 구현되어 있던 걸 getDayOfWeekKey 공용 유틸로 통합해주셨네요. 단순 텍스트 번역이 아니라 "하나만 고치면 다른 화면은 한글로 남는" 근본 원인부터 해결해주신 점이 좋았습니당 😊 재사용 값은 Common, 홈 전용은 Home으로 나눈 기준도 명확해서 다른 화면에서도 그대로 재사용 가능할 것 같아요. 고생하셨습니다!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/timo-web/app/`[locale]/(main)/(with-time-sidebar)/home/_containers/HomeTodoContainer.tsx:
- Line 19: `HomeTodoContainer`에서 새로 추가된 `TagLabelKey`와 `PriorityLabelKey` 타입 별칭의
접미사가 규칙과 달라 기존 `TodoPriorityTypes`와 일관되지 않습니다. 이 두 `type` alias의 이름을 경로 지침에 맞게
`Types` 접미사로 통일하고, 해당 타입을 사용하는 선언/참조도 함께 새 이름으로 맞춰서 `TodoPriorityTypes`와 같은 네이밍
규칙을 유지하세요.

In `@apps/timo-web/messages/ko.json`:
- Line 27: The Korean label for veryImportant is missing a space and should be
updated for consistency with the English label; adjust the translation entry in
ko.json for the veryImportant key to use the natural phrasing “매우 중요” instead of
“매우중요”. Use the veryImportant key in the messages file to locate the string and
keep the rest of the translation file unchanged.

In `@packages/timo-design-system/src/components/dropdown-view/DropdownView.tsx`:
- Around line 23-27: `DropdownView` is no longer preserving a stable default
width when only `className` is passed to the `Dropdown` root, so callers like
`Header.ViewDropdown` may collapse to content width. Update `DropdownView` to
keep the default `w-18.5` on the root by merging it with any incoming
`className` using `cn("w-18.5", className)`, and keep the rest of the dropdown
structure unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3d2acc35-b175-4c0b-bc3f-e66dc91b6e3f

📥 Commits

Reviewing files that changed from the base of the PR and between dd7de8c and 35a8d22.

📒 Files selected for processing (16)
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_components/HomeTodoCard.tsx
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/HomeHeaderContainer.tsx
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/HomeTodoContainer.tsx
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_mocks/todo-mock.ts
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_types/todo-type.ts
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_utils/date.ts
  • apps/timo-web/app/[locale]/(main)/statistics/_containers/StatisticsHeaderContainer.tsx
  • apps/timo-web/components/layout/header/Header.tsx
  • apps/timo-web/components/layout/sidebar/time/TimeSidebarHeader.tsx
  • apps/timo-web/messages/en.json
  • apps/timo-web/messages/ko.json
  • apps/timo-web/utils/get-day-of-week-key.ts
  • packages/timo-design-system/src/components/button/add-task-button/AddTaskButton.tsx
  • packages/timo-design-system/src/components/button/today-button/TodayButton.tsx
  • packages/timo-design-system/src/components/dropdown-view/DropdownView.tsx
  • packages/timo-design-system/src/components/priority/priority-icon/PriorityIcon.tsx
💤 Files with no reviewable changes (1)
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_utils/date.ts

Comment thread apps/timo-web/messages/ko.json
- TagLabelKey, PriorityLabelKey 타입 별칭명을 TagLabelKeyTypes, PriorityLabelKeyTypes로 변경했습니다
@kimminna kimminna merged commit 694b312 into develop Jul 8, 2026
12 checks passed
@kimminna kimminna deleted the feat/web/112-i18n-locale-mapping branch July 8, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능(기능성) 구현 ⌚ Timo-Design-system Timo 디자인 시스템 ⏰ Timo-web Timo 웹 서비스 ♦️ 민아 민아상

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 홈/통계/타임사이드바 다국어(i18n) 텍스트 매핑 추가

3 participants