diff --git a/src/entities/common/ui/download-type-bottom-sheet.tsx b/src/entities/common/ui/download-type-bottom-sheet.tsx index 3fe6421..2e9942e 100644 --- a/src/entities/common/ui/download-type-bottom-sheet.tsx +++ b/src/entities/common/ui/download-type-bottom-sheet.tsx @@ -1,6 +1,7 @@ import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from '@/entities/common/model/constant'; import { IMAGE_ROOT } from '@/shared/constants/common'; import { motion } from 'framer-motion'; +import { useTranslation } from 'react-i18next'; export interface DownloadTypeBottomSheetProps { bottomSheetOn: boolean; @@ -13,6 +14,7 @@ export const DownloadTypeBottomSheet = ({ setBottomSheetOn, onSelectType }: DownloadTypeBottomSheetProps) => { + const { t } = useTranslation(); const onClickToClose = () => { setBottomSheetOn(false); @@ -37,14 +39,14 @@ export const DownloadTypeBottomSheet = ({ >
-

다운로드 방식을 선택하세요

+

{t('common.selectDownloadMethod')}

@@ -62,10 +64,10 @@ export const DownloadTypeBottomSheet = ({
이미지
- 이미지 저장 + {t('common.imageSave')}
메일 - 메일로 받기 + {t('common.receiveByEmail')} diff --git a/src/entities/common/ui/email-bottom-sheet.tsx b/src/entities/common/ui/email-bottom-sheet.tsx index 5e5e5c7..2a95a3a 100644 --- a/src/entities/common/ui/email-bottom-sheet.tsx +++ b/src/entities/common/ui/email-bottom-sheet.tsx @@ -5,6 +5,7 @@ import { motion } from 'framer-motion'; import { ChangeEvent, useState } from 'react'; import { toPng } from 'html-to-image'; import { snackBar } from '@/shared/lib'; +import { useTranslation } from 'react-i18next'; export interface EmailBottomSheetProps { bottomSheetOn: boolean; @@ -21,6 +22,7 @@ export const EmailBottomSheet = ({ sendEmail, sendRequest }: EmailBottomSheetProps) => { + const { t } = useTranslation(); const optionsEmails = useStore.getState().UserStore.selectOptionsEmails; const email = useStore.getState().UserStore.email; const [userEmail, setUserEmail] = useState(email); @@ -32,14 +34,14 @@ export const EmailBottomSheet = ({ sendRequest(userEmail); }; - const downloadImage = () => { + const downloadImage = () => { const app = document.getElementById('root') as HTMLElement; toPng(app).then((image) => { const link = document.createElement('a'); link.download = 'downloadImage.png'; link.href = image; link.click(); - snackBar('이미지가 요청 되었습니다.'); + snackBar(t('common.imageRequested')); }); }; const onDownloadImage = () => { @@ -63,14 +65,14 @@ export const EmailBottomSheet = ({ >
-

이메일 주소를 선택하세요

+

{t('common.selectEmailAddress')}

@@ -80,18 +82,18 @@ export const EmailBottomSheet = ({
{ !!imageSave && -
- 이미지
- 이미지 저장 + {t('common.imageSave')}
} { !!sendEmail && @@ -99,12 +101,12 @@ export const EmailBottomSheet = ({
- 메일
- 메일로 받기 + {t('common.receiveByEmail')}
@@ -136,10 +138,10 @@ export const EmailBottomSheet = ({
+ >{t('common.request')}
diff --git a/src/locales/en.json b/src/locales/en.json index 86fb9a0..91bfd68 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -27,7 +27,15 @@ "fri": "Fri", "sat": "Sat" }, - "currencyUnit": "" + "currencyUnit": "", + "selectEmailAddress": "Select Email Address", + "imageSave": "Save as Image", + "receiveByEmail": "Receive by Email", + "mail": "Mail", + "image": "Image", + "request": "Request", + "imageRequested": "Image has been requested.", + "selectDownloadMethod": "Select Download Method" }, "menu": { "home": "Home",