링크결제 신청 페이지 다국어 지원 추가
- 링크결제 신청, 확인, 완료 페이지 현지화 - 메시지 미리보기 텍스트 번역 - 에러 메시지 및 버튼 다국어 적용 - 한글/영문 번역 키 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1043,6 +1043,15 @@
|
|||||||
"applyTitle": "Link Payment Request",
|
"applyTitle": "Link Payment Request",
|
||||||
"messagePreview": "Message Preview",
|
"messagePreview": "Message Preview",
|
||||||
"separateApprovalTitle": "Separate Approval Detail",
|
"separateApprovalTitle": "Separate Approval Detail",
|
||||||
|
"previous": "Previous",
|
||||||
|
"next": "Next",
|
||||||
|
"requestProcessingError": "Unable to process request.",
|
||||||
|
"requestError": "An error occurred during request",
|
||||||
|
"confirmSendMessage": "Please confirm\nthe message to be sent",
|
||||||
|
"paymentRequestComplete": "Payment request has been completed.",
|
||||||
|
"merchantName": "Merchant Name",
|
||||||
|
"customerGreeting": "Hello, {buyerName}!",
|
||||||
|
"paymentGuideMessage": "NICEPAYMENTS Co., Ltd. is notifying you\nof the payment details.\nYou can check the details and proceed with payment by accessing the URL below.",
|
||||||
"resendSuccess": "Resend successful.",
|
"resendSuccess": "Resend successful.",
|
||||||
"resendFailed": "Resend failed.",
|
"resendFailed": "Resend failed.",
|
||||||
"resendError": "An error occurred during resend.",
|
"resendError": "An error occurred during resend.",
|
||||||
|
|||||||
@@ -1043,6 +1043,15 @@
|
|||||||
"applyTitle": "링크결제 신청",
|
"applyTitle": "링크결제 신청",
|
||||||
"messagePreview": "메시지 미리보기",
|
"messagePreview": "메시지 미리보기",
|
||||||
"separateApprovalTitle": "분리승인 상세",
|
"separateApprovalTitle": "분리승인 상세",
|
||||||
|
"previous": "이전",
|
||||||
|
"next": "다음",
|
||||||
|
"requestProcessingError": "요청을 처리할 수 없습니다.",
|
||||||
|
"requestError": "요청 중 오류가 발생했습니다",
|
||||||
|
"confirmSendMessage": "발송 메시지를\n최종 확인하세요",
|
||||||
|
"paymentRequestComplete": "결제 신청이 완료되었습니다.",
|
||||||
|
"merchantName": "가맹점 상호",
|
||||||
|
"customerGreeting": "{buyerName} 고객님, 안녕하세요?",
|
||||||
|
"paymentGuideMessage": "나이스페이먼츠 주식회사에서\n결제하실 내역 안내드립니다.\n아래 URL로 접속하시면 상세 내역 확인과 결제 진행이 가능합니다.",
|
||||||
"resendSuccess": "재발송을 성공하였습니다.",
|
"resendSuccess": "재발송을 성공하였습니다.",
|
||||||
"resendFailed": "재발송을 실패하였습니다.",
|
"resendFailed": "재발송을 실패하였습니다.",
|
||||||
"resendError": "재발송 중 오류가 발생했습니다.",
|
"resendError": "재발송 중 오류가 발생했습니다.",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
import { HeaderType } from '@/entities/common/model/types';
|
||||||
import { useSetFooterMode, useSetHeaderTitle, useSetHeaderType } from '@/widgets/sub-layout/use-sub-layout';
|
import { useSetFooterMode, useSetHeaderTitle, useSetHeaderType } from '@/widgets/sub-layout/use-sub-layout';
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
@@ -9,13 +10,14 @@ import { ExtensionLinkPayRequestParams, ExtensionLinkPayRequestResponse, LinkPay
|
|||||||
import { snackBar } from '@/shared/lib';
|
import { snackBar } from '@/shared/lib';
|
||||||
|
|
||||||
export const LinkPaymentApplyConfirmPage = () => {
|
export const LinkPaymentApplyConfirmPage = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
const formData: LinkPaymentFormData = location.state?.formData;
|
const formData: LinkPaymentFormData = location.state?.formData;
|
||||||
const { mutateAsync: linkPayRequest } = useExtensionLinkPayRequestMutation();
|
const { mutateAsync: linkPayRequest } = useExtensionLinkPayRequestMutation();
|
||||||
|
|
||||||
useSetHeaderTitle('메시지 미리보기');
|
useSetHeaderTitle(t('additionalService.linkPayment.messagePreview'));
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
useSetFooterMode(false);
|
useSetFooterMode(false);
|
||||||
|
|
||||||
@@ -53,16 +55,16 @@ export const LinkPaymentApplyConfirmPage = () => {
|
|||||||
navigate(PATHS.additionalService.linkPayment.confirmSuccess);
|
navigate(PATHS.additionalService.linkPayment.confirmSuccess);
|
||||||
} else {
|
} else {
|
||||||
// 일반 에러 메시지
|
// 일반 에러 메시지
|
||||||
const errorMessage = rs.error?.message || '요청을 처리할 수 없습니다.';
|
const errorMessage = rs.error?.message || t('additionalService.linkPayment.requestProcessingError');
|
||||||
snackBar(`[실패] ${errorMessage}`);
|
snackBar(`[${t('common.failed')}] ${errorMessage}`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
// 네트워크 에러 등 예외 상황
|
// 네트워크 에러 등 예외 상황
|
||||||
const errorMessage = error?.response?.data?.error?.message ||
|
const errorMessage = error?.response?.data?.error?.message ||
|
||||||
error?.message ||
|
error?.message ||
|
||||||
'요청 중 오류가 발생했습니다';
|
t('additionalService.linkPayment.requestError');
|
||||||
snackBar(`[실패] ${errorMessage}`);
|
snackBar(`[${t('common.failed')}] ${errorMessage}`);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -76,20 +78,18 @@ export const LinkPaymentApplyConfirmPage = () => {
|
|||||||
<div className="sub-wrap">
|
<div className="sub-wrap">
|
||||||
<div className="preview-body">
|
<div className="preview-body">
|
||||||
<div className="attention-icon" aria-hidden="true">
|
<div className="attention-icon" aria-hidden="true">
|
||||||
<img src={IMAGE_ROOT + '/ico_alert.svg'} alt="주의" />
|
<img src={IMAGE_ROOT + '/ico_alert.svg'} alt={t('common.confirm')} />
|
||||||
</div>
|
</div>
|
||||||
<h1 className="preview-title">발송 메시지를<br />최종 확인하세요</h1>
|
<h1 className="preview-title">{t('additionalService.linkPayment.confirmSendMessage')}</h1>
|
||||||
<div className="preview-result">
|
<div className="preview-result">
|
||||||
<p className="preview-text">
|
<p className="preview-text">
|
||||||
{formData.buyerName} 고객님, 안녕하세요?<br />
|
{t('additionalService.linkPayment.customerGreeting', { buyerName: formData.buyerName })}<br />
|
||||||
나이스페이먼츠 주식회사에서 <br />
|
{t('additionalService.linkPayment.paymentGuideMessage')}<br /><br />
|
||||||
결제하실 내역 안내드립니다.<br />
|
|
||||||
아래 URL로 접속하시면 상세 내역 확인과 결제 진행이 가능합니다.<br /><br />
|
|
||||||
!${pay_url}<br /><br />
|
!${pay_url}<br /><br />
|
||||||
<b>
|
<b>
|
||||||
가맹점 상호 : 나이스페이먼츠 주식회사<br />
|
{t('additionalService.linkPayment.merchantName')} : 나이스페이먼츠 주식회사<br />
|
||||||
상품명 : {formData.goodsName}<br />
|
{t('transaction.fields.productName')} : {formData.goodsName}<br />
|
||||||
금액 : {formData.amount.toLocaleString()}원
|
{t('transaction.fields.amount')} : {formData.amount.toLocaleString()}{t('common.currencyUnit')}
|
||||||
</b>
|
</b>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -100,11 +100,11 @@ export const LinkPaymentApplyConfirmPage = () => {
|
|||||||
<button
|
<button
|
||||||
className="btn-50 btn-darkgray flex-1"
|
className="btn-50 btn-darkgray flex-1"
|
||||||
onClick={() => onClickToBack()}
|
onClick={() => onClickToBack()}
|
||||||
>이전</button>
|
>{t('additionalService.linkPayment.previous')}</button>
|
||||||
<button
|
<button
|
||||||
className="btn-50 btn-blue flex-3"
|
className="btn-50 btn-blue flex-3"
|
||||||
onClick={() => onClickToConfirm()}
|
onClick={() => onClickToConfirm()}
|
||||||
>결제 신청</button>
|
>{t('additionalService.linkPay.paymentRequest')}</button>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { LinkPaymentStep1 } from '@/entities/additional-service/ui/link-payment/apply/link-payment-step1';
|
import { LinkPaymentStep1 } from '@/entities/additional-service/ui/link-payment/apply/link-payment-step1';
|
||||||
import { LinkPaymentStep2 } from '@/entities/additional-service/ui/link-payment/apply/link-payment-step2';
|
import { LinkPaymentStep2 } from '@/entities/additional-service/ui/link-payment/apply/link-payment-step2';
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
import { HeaderType } from '@/entities/common/model/types';
|
||||||
@@ -14,6 +15,7 @@ import moment from 'moment';
|
|||||||
|
|
||||||
|
|
||||||
export const LinkPaymentApplyPage = () => {
|
export const LinkPaymentApplyPage = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
const midOptionsWithoutGids = useStore.getState().UserStore.selectOptionsMidsWithoutGids;
|
const midOptionsWithoutGids = useStore.getState().UserStore.selectOptionsMidsWithoutGids;
|
||||||
@@ -43,7 +45,7 @@ export const LinkPaymentApplyPage = () => {
|
|||||||
linkContentType: LinkContentType.BASIC
|
linkContentType: LinkContentType.BASIC
|
||||||
});
|
});
|
||||||
|
|
||||||
useSetHeaderTitle('링크결제 신청');
|
useSetHeaderTitle(t('additionalService.linkPayment.applyTitle'));
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
useSetFooterMode(false);
|
useSetFooterMode(false);
|
||||||
|
|
||||||
@@ -144,7 +146,7 @@ export const LinkPaymentApplyPage = () => {
|
|||||||
className="btn-50 btn-blue flex-1"
|
className="btn-50 btn-blue flex-1"
|
||||||
onClick={() => onClickToChangeTab()}
|
onClick={() => onClickToChangeTab()}
|
||||||
disabled={!isStep1Valid()}
|
disabled={!isStep1Valid()}
|
||||||
>다음</button>
|
>{t('additionalService.linkPayment.next')}</button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{(processStep === ProcessStep.Two) &&
|
{(processStep === ProcessStep.Two) &&
|
||||||
@@ -152,12 +154,12 @@ export const LinkPaymentApplyPage = () => {
|
|||||||
<button
|
<button
|
||||||
className="btn-50 btn-darkgray flex-1"
|
className="btn-50 btn-darkgray flex-1"
|
||||||
onClick={() => onClickToBack()}
|
onClick={() => onClickToBack()}
|
||||||
>이전</button>
|
>{t('additionalService.linkPayment.previous')}</button>
|
||||||
<button
|
<button
|
||||||
className="btn-50 btn-blue flex-3"
|
className="btn-50 btn-blue flex-3"
|
||||||
onClick={() => onClickToChangeTab()}
|
onClick={() => onClickToChangeTab()}
|
||||||
disabled={!isStep2Valid()}
|
disabled={!isStep2Valid()}
|
||||||
>결제 신청</button>
|
>{t('additionalService.linkPay.paymentRequest')}</button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
import { HeaderType } from '@/entities/common/model/types';
|
||||||
import { useSetFooterMode, useSetHeaderTitle, useSetHeaderType } from '@/widgets/sub-layout/use-sub-layout';
|
import { useSetFooterMode, useSetHeaderTitle, useSetHeaderType } from '@/widgets/sub-layout/use-sub-layout';
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
import { PATHS } from "@/shared/constants/paths";
|
import { PATHS } from "@/shared/constants/paths";
|
||||||
|
|
||||||
export const LinkPaymentApplySuccessPage = () => {
|
export const LinkPaymentApplySuccessPage = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
useSetHeaderTitle('링크결제 신청');
|
useSetHeaderTitle(t('additionalService.linkPayment.applyTitle'));
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
useSetFooterMode(false);
|
useSetFooterMode(false);
|
||||||
|
|
||||||
@@ -20,15 +22,15 @@ export const LinkPaymentApplySuccessPage = () => {
|
|||||||
<div className="success-body">
|
<div className="success-body">
|
||||||
<div className="success-icon" aria-hidden="true"></div>
|
<div className="success-icon" aria-hidden="true"></div>
|
||||||
<h1 className="success-title">
|
<h1 className="success-title">
|
||||||
<span>링크결제</span><br/>
|
<span>{t('additionalService.linkPayment.title')}</span><br/>
|
||||||
<span>결제 신청이 완료되었습니다.</span>
|
<span>{t('additionalService.linkPayment.paymentRequestComplete')}</span>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="apply-row">
|
<div className="apply-row">
|
||||||
<button
|
<button
|
||||||
className="btn-50 btn-blue flex-1"
|
className="btn-50 btn-blue flex-1"
|
||||||
onClick={() => onClickToHome()}
|
onClick={() => onClickToHome()}
|
||||||
>확인</button>
|
>{t('common.confirm')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user