From 07bb14944471ebbfe219e6d5627f7f67e5b814b3 Mon Sep 17 00:00:00 2001 From: Jay Sheen Date: Thu, 30 Oct 2025 18:12:18 +0900 Subject: [PATCH] Add i18n localization to home entity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add translation keys to home namespace: - home.banner.doNotShowToday: Banner "don't show today" button - home.banner.close: Banner close button - home.biometricRegistration.*: Biometric registration dialog - home.notice.goTo: Notice item navigation label - Localize 3 UI components: - ui/home-bottom-banner.tsx: Banner bottom sheet buttons - ui/home-notice-item.tsx: Notice item alt text - ui/auth-reguster.tsx: Biometric registration dialog - All other home components already localized ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/entities/home/ui/auth-reguster.tsx | 32 ++++++++++++--------- src/entities/home/ui/home-bottom-banner.tsx | 8 ++++-- src/entities/home/ui/home-notice-item.tsx | 6 ++-- src/locales/en.json | 15 +++++++++- src/locales/ko.json | 15 +++++++++- 5 files changed, 55 insertions(+), 21 deletions(-) diff --git a/src/entities/home/ui/auth-reguster.tsx b/src/entities/home/ui/auth-reguster.tsx index 9ff2ed8..d9db7f8 100644 --- a/src/entities/home/ui/auth-reguster.tsx +++ b/src/entities/home/ui/auth-reguster.tsx @@ -3,12 +3,14 @@ import { AuthRegisterProps } from '../model/types'; import { motion } from 'framer-motion'; import { useAppBridge } from '@/hooks/useAppBridge'; import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from '@/entities/common/model/constant'; +import { useTranslation } from 'react-i18next'; export const AuthRegister = ({ setAuthRegisterOn, authRegisterOn, }: AuthRegisterProps) => { const { registerBiometric, closeBiometricRegistrationPopup } = useAppBridge(); + const { t } = useTranslation(); const onClickToClose = () => { closeBiometricRegistrationPopup(); @@ -33,14 +35,14 @@ export const AuthRegister = ({ >
-

๊ฐ„ํŽธ ์ธ์ฆ ๋“ฑ๋ก

- @@ -49,22 +51,26 @@ export const AuthRegister = ({
- ๊ฐ„ํŽธ ์ธ์ฆ ๋“ฑ๋ก ํ•œ๋ฒˆ์œผ๋กœ,
- ๋น„๋ฐ€๋ฒˆํ˜ธ ์—†์ด ํŽธ๋ฆฌํ•˜๊ฒŒ ๋กœ๊ทธ์ธํ•˜์„ธ์š”. + {t('home.biometricRegistration.description').split('\n').map((line, index) => ( + + {line} + {index === 0 &&
} +
+ ))}
- - + + >{t('home.biometricRegistration.registerNow')}
diff --git a/src/entities/home/ui/home-bottom-banner.tsx b/src/entities/home/ui/home-bottom-banner.tsx index bf54b59..c01a53a 100644 --- a/src/entities/home/ui/home-bottom-banner.tsx +++ b/src/entities/home/ui/home-bottom-banner.tsx @@ -11,6 +11,7 @@ import { useEffect, useState } from 'react'; import { Swiper, SwiperSlide } from 'swiper/react'; import 'swiper/css'; import { Autoplay, Pagination } from 'swiper/modules'; +import { useTranslation } from 'react-i18next'; export const HomeBottomBanner = ({ setBottomBannerOn, @@ -18,7 +19,8 @@ export const HomeBottomBanner = ({ bannerList }: HomeBottomBannerProps) => { const { navigate } = useNavigate(); - + const { t } = useTranslation(); + const [isFirstOpen, setIsFirstOpen] = useState(false); const [currentSlide, setCurrentSlide] = useState(1); @@ -109,8 +111,8 @@ export const HomeBottomBanner = ({
- onClickToCloseDay() }>์˜ค๋Š˜ ํ•˜๋ฃจ ๋ณด์ง€ ์•Š๊ธฐ - onClickToClose() }>๋‹ซ๊ธฐ + onClickToCloseDay() }>{t('home.banner.doNotShowToday')} + onClickToClose() }>{t('home.banner.close')}
diff --git a/src/entities/home/ui/home-notice-item.tsx b/src/entities/home/ui/home-notice-item.tsx index cd84e3a..0cbe040 100644 --- a/src/entities/home/ui/home-notice-item.tsx +++ b/src/entities/home/ui/home-notice-item.tsx @@ -34,9 +34,9 @@ export const HomeNoticeItem = ({
{ t(`support.notice.categories.${informCl}`) }{ moment(regDt).format('YY๋…„ MM์›” DD์ผ') }
- ๊ณต์ง€์‚ฌํ•ญ ๋ฐ”๋กœ๊ฐ€๊ธฐ
diff --git a/src/locales/en.json b/src/locales/en.json index 3a8b631..853b9a3 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -325,7 +325,20 @@ "topSalesDays": "Top Sales Days", "topSalesHours": "Top Sales Hours", "topPaymentMethods": "Top Payment Methods", - "noticesAndUpdates": "Notices & Updates" + "noticesAndUpdates": "Notices & Updates", + "banner": { + "doNotShowToday": "Don't show today", + "close": "Close" + }, + "biometricRegistration": { + "title": "Biometric Authentication Setup", + "description": "Register biometric authentication once,\nand log in conveniently without a password.", + "later": "Later", + "registerNow": "Register Now" + }, + "notice": { + "goTo": "Go to Notice" + } }, "settlement": { "title": "Settlement", diff --git a/src/locales/ko.json b/src/locales/ko.json index 0e9ca23..e5a73d8 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -329,7 +329,20 @@ "topSalesDays": "๋งค์ถœ์ด ๊ฐ€์žฅ ๋†’์€ ์š”์ผ", "topSalesHours": "๋งค์ถœ์ด ๊ฐ€์žฅ ๋†’์€ ์‹œ๊ฐ„", "topPaymentMethods": "๊ฐ€์žฅ ๋งŽ์ด์“ฐ์ธ ๊ฒฐ์ œ ์ˆ˜๋‹จ", - "noticesAndUpdates": "๊ณต์ง€ & ์ตœ์‹ ์ •๋ณด" + "noticesAndUpdates": "๊ณต์ง€ & ์ตœ์‹ ์ •๋ณด", + "banner": { + "doNotShowToday": "์˜ค๋Š˜ ํ•˜๋ฃจ ๋ณด์ง€ ์•Š๊ธฐ", + "close": "๋‹ซ๊ธฐ" + }, + "biometricRegistration": { + "title": "๊ฐ„ํŽธ ์ธ์ฆ ๋“ฑ๋ก", + "description": "๊ฐ„ํŽธ ์ธ์ฆ ๋“ฑ๋ก ํ•œ๋ฒˆ์œผ๋กœ,\n๋น„๋ฐ€๋ฒˆํ˜ธ ์—†์ด ํŽธ๋ฆฌํ•˜๊ฒŒ ๋กœ๊ทธ์ธํ•˜์„ธ์š”.", + "later": "๋‹ค์Œ์—", + "registerNow": "์ง€๊ธˆ ๋“ฑ๋กํ•˜๊ธฐ" + }, + "notice": { + "goTo": "๊ณต์ง€์‚ฌํ•ญ ๋ฐ”๋กœ๊ฐ€๊ธฐ" + } }, "settlement": { "title": "์ •์‚ฐ์กฐํšŒ",