Add comprehensive i18n localization to transaction UI components

- Localize 23 transaction UI component files
- Add 150+ translation keys to ko.json and en.json
- Organized translations under transaction namespace:
  * transaction.bottomSheet - Bottom sheet modals
  * transaction.sections - Section titles
  * transaction.fields - Field labels (90+ keys)
  * transaction.cancel - Cancellation flows
  * transaction.handWrittenIssuance - Manual issuance forms
  * transaction.list - List actions

Updated files:
- Bottom sheets: escrow-mail-resend, cash-receipt-purpose-update
- Sections: billing-info, part-cancel-info, detail-info, issue-info,
  escrow-info, important-info, payment-info, transaction-info,
  settlement-info, merchant-info, amount-info, cancel-bank-group,
  cancel-password-group
- Lists: list-item, billing-list, cash-receipt-list
- Cancel flows: all-cancel, part-cancel, prevent-bond
- Issuance: hand-written-issuance-step1, hand-written-issuance-step2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jay Sheen
2025-10-30 16:14:25 +09:00
parent 5f420c212b
commit e067fc8d4f
25 changed files with 847 additions and 384 deletions

View File

@@ -1,4 +1,5 @@
import moment from 'moment';
import { useTranslation } from 'react-i18next';
import { NumericFormat } from 'react-number-format';
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
import { useDownloadConfirmationMutation } from '../../api/use-download-confirmation-mutation';
@@ -7,7 +8,7 @@ import { SlideDown } from 'react-slidedown';
import 'react-slidedown/lib/slidedown.css';
export const AmountInfoSection = ({
transactionCategory,
transactionCategory,
amountInfo,
isOpen,
tid,
@@ -15,23 +16,24 @@ export const AmountInfoSection = ({
onClickToOpenInfo,
canDownloadReceipt
}: InfoSectionProps) => {
const { t } = useTranslation();
const { mutateAsync: downloadConfirmation } = useDownloadConfirmationMutation();
let newAmountInfo: Record<string, any> | undefined = amountInfo;
const subItems: Record<string, Record<string, string>> = {
mid: {name: 'MID', type: 'string'},
transactionRequestAmount: {name: '거래요청금액', type: 'number'},
transactionAmount: {name: '거래금액', type: 'number'},
pointAmount: {name: '포인트금액', type: 'number'},
couponAmount: {name: '쿠폰금액', type: 'number'},
escrowFee: {name: '에스크로수수료', type: 'number'},
kakaoMoneyAmount: {name: '카카오머니', type: 'number'},
kakaoPointAmount: {name: '카카오포인트', type: 'number'},
kakaoDiscountAmount: {name: '카카오 즉시할인', type: 'number'},
naverPointAmount: {name: '네이버 포인트', type: 'number'},
tossMoneyAmount: {name: '토스머니', type: 'number'},
tossDiscountAmount: {name: '토스할인', type: 'number'},
paycoPointAmount: {name: '페이코포인트', type: 'number'},
paycoCouponAmount: {name: '페이코쿠폰', type: 'number'},
mid: {name: t('transaction.fields.mid'), type: 'string'},
transactionRequestAmount: {name: t('transaction.fields.transactionRequestAmount'), type: 'number'},
transactionAmount: {name: t('transaction.fields.transactionAmount'), type: 'number'},
pointAmount: {name: t('transaction.fields.pointAmount'), type: 'number'},
couponAmount: {name: t('transaction.fields.couponAmount'), type: 'number'},
escrowFee: {name: t('transaction.fields.escrowFee'), type: 'number'},
kakaoMoneyAmount: {name: t('transaction.fields.kakaoMoneyAmount'), type: 'number'},
kakaoPointAmount: {name: t('transaction.fields.kakaoPointAmount'), type: 'number'},
kakaoDiscountAmount: {name: t('transaction.fields.kakaoDiscountAmount'), type: 'number'},
naverPointAmount: {name: t('transaction.fields.naverPointAmount'), type: 'number'},
tossMoneyAmount: {name: t('transaction.fields.tossMoneyAmount'), type: 'number'},
tossDiscountAmount: {name: t('transaction.fields.tossDiscountAmount'), type: 'number'},
paycoPointAmount: {name: t('transaction.fields.paycoPointAmount'), type: 'number'},
paycoCouponAmount: {name: t('transaction.fields.paycoCouponAmount'), type: 'number'},
};
const openSubItems: Record<string, Array<string>> = {
@@ -134,13 +136,14 @@ export const AmountInfoSection = ({
let k = openSubItems[serviceCode][i];
if(!!k){
let name = subItems[k]?.name;
if(serviceCode === '01'){
if(k === 'transactionAmount'){
name = '신용카드금액'
name = t('transaction.fields.cardAmount')
}
if(k === 'transactionRequestAmount'){
name = '승인요청금액';
name = t('transaction.fields.approvalRequestAmount');
}
}
@@ -223,12 +226,12 @@ export const AmountInfoSection = ({
}
<span className="unit"></span>
</div>
<button
className="chip-btn"
<button
className="chip-btn"
type="button"
onClick={ () => onClickToSetShowInfo() }
>
<SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
{t('transaction.sections.amountDetail')} <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
</button>
</div>
@@ -239,43 +242,43 @@ export const AmountInfoSection = ({
{ (transactionCategory === TransactionCategory.AllTransaction) &&
subLi()
}
{ (transactionCategory === TransactionCategory.CashReceipt) &&
{ (transactionCategory === TransactionCategory.CashReceipt) &&
<>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.supplyAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;VAT</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.vat')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.vat }
value={ amountInfo?.vat }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.serviceAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.serviceAmount }
value={ amountInfo?.serviceAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.taxFreeAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.taxFreeAmount }
value={ amountInfo?.taxFreeAmount }
thousandSeparator
displayType="text"
></NumericFormat>
@@ -283,47 +286,47 @@ export const AmountInfoSection = ({
</li>
</>
}
{ (transactionCategory === TransactionCategory.Escrow) &&
{ (transactionCategory === TransactionCategory.Escrow) &&
<>
{ (serviceCode === '02' || serviceCode === '03') &&
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.transactionAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.transactionAmount }
value={ amountInfo?.transactionAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
}
{ (serviceCode === '01') &&
{ (serviceCode === '01') &&
<>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.cardAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.cardAmount }
value={ amountInfo?.cardAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.pointAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.pointAmount }
value={ amountInfo?.pointAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.couponAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.couponAmount }
value={ amountInfo?.couponAmount }
thousandSeparator
displayType="text"
></NumericFormat>
@@ -333,10 +336,10 @@ export const AmountInfoSection = ({
}
{ (serviceCode === '01' || serviceCode === '02') &&
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.escrowFee')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.escrowFee }
value={ amountInfo?.escrowFee }
thousandSeparator
displayType="text"
></NumericFormat>
@@ -348,30 +351,30 @@ export const AmountInfoSection = ({
{ (amountInfo?.simplePaymentServiceCode === 'E016') &&
<>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.kakaoMoneyAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.multiPointAmount }
value={ amountInfo?.multiPointAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.kakaoPointAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.multiCouponAmount }
value={ amountInfo?.multiCouponAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.kakaoDiscountAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.kakaoDiscountAmount }
value={ amountInfo?.kakaoDiscountAmount }
thousandSeparator
displayType="text"
></NumericFormat>
@@ -381,10 +384,10 @@ export const AmountInfoSection = ({
}
{ (amountInfo?.simplePaymentServiceCode === 'E020') &&
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.naverPointAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.multiPointAmount }
value={ amountInfo?.multiPointAmount }
thousandSeparator
displayType="text"
></NumericFormat>
@@ -394,20 +397,20 @@ export const AmountInfoSection = ({
{ (amountInfo?.simplePaymentServiceCode === 'E025') &&
<>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.tossMoneyAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.multiPointAmount }
value={ amountInfo?.multiPointAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.tossDiscountAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.tossDiscountAmount }
value={ amountInfo?.tossDiscountAmount }
thousandSeparator
displayType="text"
></NumericFormat>
@@ -418,20 +421,20 @@ export const AmountInfoSection = ({
{ (amountInfo?.simplePaymentServiceCode === 'E015') &&
<>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.paycoPointAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.multiPointAmount }
value={ amountInfo?.multiPointAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="label">·&nbsp;&nbsp;{t('transaction.fields.paycoCouponAmount')}</span>
<span className="value">
<NumericFormat
value={ amountInfo?.multiCouponAmount }
value={ amountInfo?.multiCouponAmount }
thousandSeparator
displayType="text"
></NumericFormat>
@@ -460,13 +463,13 @@ export const AmountInfoSection = ({
}
<div className="txn-doc">
{
(transactionCategory === TransactionCategory.CashReceipt) &&
(transactionCategory === TransactionCategory.CashReceipt) &&
!!canDownloadReceipt &&
<button
className="doc-btn"
<button
className="doc-btn"
type="button"
onClick={ () => onClickToDownloadConfirmation() }
> </button>
>{t('transaction.fields.transactionConfirmation')}</button>
}
</div>
</div>