Skip to content

Feat/review translation design - #532

Merged
chlwhdtn03 merged 3 commits into
feat/ai-review-translatefrom
feat/review-translation-design
Jul 24, 2026
Merged

Feat/review translation design#532
chlwhdtn03 merged 3 commits into
feat/ai-review-translatefrom
feat/review-translation-design

Conversation

@jelleoo

@jelleoo jelleoo commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

리뷰 번역 기능의 상태별 UI와 디자인 보완

  • 번역 전, 로딩, 번역 완료, 원문 보기, 번역 실패 상태 추가
  • 번역 안내 및 실패 사유 툴팁 추가
  • 리뷰 프로필, 메뉴 칩, 간격 등 디자인 수정

Describe your changes

  • Translate 버튼과 Translating... 로딩 상태 추가
  • 번역 완료 시 Translated from Korean by AI · Show original UI 추가
  • 번역 실패 시 Translation unavailable 상태 추가
  • 안내 아이콘 선택 시 번역 정확 여부 및 실패 안내 툴팁 노출
  • 화면 스크롤 시 열린 툴팁이 자동으로 닫히도록 처리
  • 프로필 이미지 크기, 메뉴 칩 높이, 리뷰 내부 여백을 디자인에 맞게 조정
  • 번역 관련 접근성 문구와 4개 언어 리소스 추가

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a review translation feature, adding the necessary data models, repository methods, use cases, and UI components to translate reviews into English. It also updates localization files for English, Japanese, and Vietnamese. The review feedback highlights several areas for improvement, including fixing encoding corruption (Mojibake) in test descriptions, addressing missing or awkward translations in Vietnamese and Japanese resources, correcting a potential layout issue in the sign-out activity, replacing hardcoded tooltip offsets with a more robust solution, and refining the translation action visibility logic to ensure it only triggers for Korean text.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +123 to +127

`when`("repository媛€ 由щ럭 踰덉뿭 寃곌낵瑜?諛섑솚?섎㈃") {
coEvery { reviewRepository.getReviewTranslation(1L, "EN") } returns translation

then("?숈씪 寃곌낵瑜?諛섑솚?쒕떎") {

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.

medium

테스트 설명에 인코딩 깨짐 현상(Mojibake)이 발생하여 한글이 올바르게 표시되지 않고 있습니다. 가독성과 유지보수성을 위해 올바른 한글 텍스트로 수정하는 것이 좋습니다.\n\n* repository媛� 由щ럭 踰덉뿭 寃곌낵瑜?諛섑솚?섎㈃ -> repository가 리뷰 번역 결과를 반환하면\n* ?숈씪 寃곌낵瑜?諛섑솚?쒕떎 -> 동일 결과를 반환한다

        `when`("repository가 리뷰 번역 결과를 반환하면") {
            coEvery { reviewRepository.getReviewTranslation(1L, "EN") } returns translation

            then("동일 결과를 반환한다") {

Comment on lines +211 to +213
<string name="mypage_push_activity_section_title">Notifications and Activity</string>
<string name="mypage_service_section_title">Service Info</string>
<string name="mypage_etc_section_title">và vân vân</string>

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.

medium

베트남어 번역 파일(values-vi/strings.xml)에서 일부 번역 누락 및 어색한 표현이 발견되었습니다.\n\n1. mypage_push_activity_section_titlemypage_service_section_title이 영어로 방치되어 있습니다. 베트남어로 번역이 필요합니다.\n2. mypage_etc_section_titlevà vân vân은 문장 끝에 쓰이는 '등등'의 직역 표현으로, 앱 메뉴의 '기타(Etc.)' 섹션 타이틀로는 매우 어색합니다. 'Khác'이 더 자연스럽습니다.\n\n추천 번역:\n* Notifications and Activity -> Thông báo và Hoạt động\n* Service Info -> Thông tin dịch vụ\n* và vân vân -> Khác

Suggested change
<string name="mypage_push_activity_section_title">Notifications and Activity</string>
<string name="mypage_service_section_title">Service Info</string>
<string name="mypage_etc_section_title">và vân vân</string>
<string name="mypage_push_activity_section_title">Thông báo và Hoạt động</string>
<string name="mypage_service_section_title">Thông tin dịch vụ</string>
<string name="mypage_etc_section_title">Khác</string>

Comment on lines +211 to +212
<string name="mypage_push_activity_section_title">Notifications and Activity</string>
<string name="mypage_service_section_title">Service Info</string>

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.

medium

일본어 번역 파일(values-ja/strings.xml)에서 일부 타이틀이 영어로 누락되어 있습니다. 일관된 다국어 지원을 위해 일본어로 번역하는 것을 권장합니다.\n\n* Notifications and Activity -> 通知と活動 또는 お知らせと活動\n* Service Info -> サービス情報

Suggested change
<string name="mypage_push_activity_section_title">Notifications and Activity</string>
<string name="mypage_service_section_title">Service Info</string>
<string name="mypage_push_activity_section_title">通知と活動</string>
<string name="mypage_service_section_title">サービス情報</string>

Comment on lines +23 to +26
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="24dp"

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.

medium

tv_sign_out_description 텍스트뷰의 가로 너비가 match_parent로 변경되고 layout_marginStart="24dp"가 추가되었으나, layout_marginEnd가 누락되어 있습니다. 이로 인해 텍스트가 우측 화면 가장자리에 완전히 밀착되어 비대칭적이고 답답한 레이아웃이 될 수 있습니다. 좌우 대칭을 위해 android:layout_marginEnd="24dp"를 추가하는 것이 좋습니다.

Suggested change
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="24dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"

Comment on lines +283 to +291
DropdownMenu(
expanded = showTooltip,
onDismissRequest = onTooltipDismiss,
offset = DpOffset(x = (-220).dp, y = (-72).dp),
shape = RoundedCornerShape(2.dp),
containerColor = White,
border = BorderStroke(1.dp, Gray300),
shadowElevation = 2.dp,
modifier = Modifier.widthIn(max = 280.dp),

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.

medium

툴팁 구현을 위해 DropdownMenu를 사용하면서 하드코딩된 매직 오프셋(offset = DpOffset(x = (-220).dp, y = (-72).dp))을 적용하고 있습니다. \n\n이 방식은 화면 크기가 작거나 레이아웃 배치가 달라질 경우 툴팁이 화면 밖으로 벗어나거나 잘리는 등 오작동할 위험이 큽니다. \n\nDropdownMenu 대신 Jetpack Compose의 공식 TooltipBox (또는 BasicTooltipBox)를 사용하거나, 커스텀 PopupPositionProvider를 구현하여 동적으로 안전하게 위치를 계산하도록 개선하는 것을 권장합니다.

Comment on lines +13 to +19
fun shouldShowReviewTranslationAction(
targetLanguage: String?,
isLoggedIn: Boolean,
content: String,
): Boolean = isLoggedIn &&
targetLanguage == ENGLISH_TARGET_LANGUAGE &&
content.any { it.isLetter() && it.code > ASCII_MAX_CODE }

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.

medium

현재 shouldShowReviewTranslationAction은 ASCII 범위를 벗어나는 모든 문자(비ASCII 문자)가 포함되어 있으면 번역 버튼을 노출하도록 구현되어 있습니다. 이로 인해 일본어, 베트남어 등 한국어가 아닌 리뷰에서도 번역 버튼이 활성화됩니다.\n\n하지만 UI에 표시되는 안내 문구(review_translated_by_ai)는 **"Translated from Korean by AI" (AI가 한국어에서 번역함)로 한국어 번역임을 명시하고 있어, 타 언어 리뷰에서 이 문구가 노출되면 어색하고 오해의 소지가 있습니다.\n\n 해결 방안 1 (한국어 전용 번역인 경우): 아래와 같이 한국어(한글) 유니코드 범위만 체크하도록 조건을 좁힙니다.\n 해결 방안 2 (다국어 번역 지원인 경우): 번역 안내 문구를 "Translated by AI" 등으로 일반화하고, 다국어 감지 로직을 보완해야 합니다.

Suggested change
fun shouldShowReviewTranslationAction(
targetLanguage: String?,
isLoggedIn: Boolean,
content: String,
): Boolean = isLoggedIn &&
targetLanguage == ENGLISH_TARGET_LANGUAGE &&
content.any { it.isLetter() && it.code > ASCII_MAX_CODE }
fun shouldShowReviewTranslationAction(
targetLanguage: String?,
isLoggedIn: Boolean,
content: String,
): Boolean = isLoggedIn &&
targetLanguage == ENGLISH_TARGET_LANGUAGE &&
content.any { it.code in 0xAC00..0xD7A3 || it.code in 0x1100..0x11FF || it.code in 0x3130..0x318F }

@jelleoo
jelleoo force-pushed the feat/review-translation-design branch from 88ffb29 to 9c590b4 Compare July 21, 2026 17:02
@jelleoo
jelleoo changed the base branch from develop to feat/ai-review-translate July 21, 2026 17:10
@jelleoo
jelleoo force-pushed the feat/review-translation-design branch from 9c590b4 to 73d4978 Compare July 22, 2026 00:23
@chlwhdtn03
chlwhdtn03 merged commit 1cbd195 into feat/ai-review-translate Jul 24, 2026
@chlwhdtn03
chlwhdtn03 deleted the feat/review-translation-design branch July 24, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants