Add i18n localization to sort-type-box component
- Replace hardcoded Korean sort labels with translation keys - Add useTranslation hook to sort-type-box.tsx - Add common.highAmountOrder to ko.json and en.json - Use filter.sortOrders.latest for latest sort option - Convert default sortOptions to use t() function Now supports dynamic language switching for sort options. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,24 @@
|
|||||||
import { SortTypeKeys, SortTypeBoxProps } from '../model/types';
|
import { SortTypeKeys, SortTypeBoxProps } from '../model/types';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const SortTypeBox = ({
|
export const SortTypeBox = ({
|
||||||
sortType,
|
sortType,
|
||||||
onClickToSort,
|
onClickToSort,
|
||||||
sortOptions = [
|
sortOptions
|
||||||
{ key: SortTypeKeys.LATEST, label: '최신순' },
|
|
||||||
{ key: SortTypeKeys.HIGH_AMOUNT, label: '고액순' }
|
|
||||||
]
|
|
||||||
}: SortTypeBoxProps) => {
|
}: SortTypeBoxProps) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const defaultSortOptions = [
|
||||||
|
{ key: SortTypeKeys.LATEST, label: t('filter.sortOrders.latest') },
|
||||||
|
{ key: SortTypeKeys.HIGH_AMOUNT, label: t('common.highAmountOrder') }
|
||||||
|
];
|
||||||
|
|
||||||
|
const options = sortOptions || defaultSortOptions;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="sort-options">
|
<div className="sort-options">
|
||||||
{ sortOptions.map((option: Record<string, any>, index: number) => (
|
{ options.map((option: Record<string, any>, index: number) => (
|
||||||
<>
|
<>
|
||||||
{ (index > 0) &&
|
{ (index > 0) &&
|
||||||
<span className="sort-divider">|</span>
|
<span className="sort-divider">|</span>
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
"noData": "No data available",
|
"noData": "No data available",
|
||||||
"next": "Next",
|
"next": "Next",
|
||||||
"latest": "Latest",
|
"latest": "Latest",
|
||||||
"oldest": "Oldest"
|
"oldest": "Oldest",
|
||||||
|
"highAmountOrder": "High Amount"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
@@ -53,31 +54,31 @@
|
|||||||
"close": "Close",
|
"close": "Close",
|
||||||
"apply": "Apply",
|
"apply": "Apply",
|
||||||
"merchant": "Merchant",
|
"merchant": "Merchant",
|
||||||
"orderNumberTid": "OID/TID",
|
"orderNumberTid": "Order No./TID",
|
||||||
"period": "Period",
|
"period": "Period",
|
||||||
"issuanceDate": "Issuance Date",
|
"issuanceDate": "Issue Date",
|
||||||
"transactionStatus": "Transaction Status",
|
"transactionStatus": "Transaction Status",
|
||||||
"paymentMethod": "Payment Method",
|
"paymentMethod": "Payment Method",
|
||||||
"transactionAmount": "Transaction Amount",
|
"transactionAmount": "Transaction Amount",
|
||||||
"detailSearch": "Detail Search",
|
"detailSearch": "Detailed Search",
|
||||||
"purpose": "Purpose",
|
"purpose": "Purpose",
|
||||||
"transactionCategory": "Transaction Category",
|
"transactionCategory": "Payment Type",
|
||||||
"progressStatus": "Progress Status",
|
"progressStatus": "Payment Status",
|
||||||
"approvalIssuanceNumber": "Approval/Issuance Number",
|
"approvalIssuanceNumber": "Approval/Issue Number",
|
||||||
"requestStatus": "Request Status",
|
"requestStatus": "Request Status",
|
||||||
"processingResult": "Processing Result",
|
"processingResult": "Result",
|
||||||
"deliveryStatus": "Delivery Status",
|
"deliveryStatus": "Delivery Status",
|
||||||
"searchOptions": {
|
"searchOptions": {
|
||||||
"cardNumber": "Card Number",
|
"cardNumber": "Card Number",
|
||||||
"approvalNumber": "Approval Number",
|
"approvalNumber": "Approval Number",
|
||||||
"buyerName": "Buyer Name",
|
"buyerName": "Purchaser Name",
|
||||||
"virtualAccountNumber": "Virtual Account Number",
|
"virtualAccountNumber": "Virtual Account Number",
|
||||||
"depositorName": "Depositor Name",
|
"depositorName": "Depositor Name",
|
||||||
"phoneNumber": "Phone Number",
|
"phoneNumber": "Phone Number",
|
||||||
"giftCardNumber": "Gift Card Number",
|
"giftCardNumber": "Gift Card Number",
|
||||||
"customerId": "Customer ID",
|
"customerId": "Customer ID",
|
||||||
"culturelandId": "Cultureland ID",
|
"culturelandId": "Cultureland ID",
|
||||||
"tmoneyCardNumber": "T-money Card Number",
|
"tmoneyCardNumber": "Tmoney Card Number",
|
||||||
"issueNumber": "Issue Number"
|
"issueNumber": "Issue Number"
|
||||||
},
|
},
|
||||||
"periods": {
|
"periods": {
|
||||||
@@ -86,7 +87,7 @@
|
|||||||
"6months": "6 Months",
|
"6months": "6 Months",
|
||||||
"custom": "Custom"
|
"custom": "Custom"
|
||||||
},
|
},
|
||||||
"transactionType": "Transaction Type",
|
"transactionType": "Payment Type",
|
||||||
"transactionTypes": {
|
"transactionTypes": {
|
||||||
"all": "All",
|
"all": "All",
|
||||||
"deposit": "Deposit",
|
"deposit": "Deposit",
|
||||||
@@ -393,7 +394,7 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"billKey": "Bill Key",
|
"billKey": "Bill Key",
|
||||||
"tid": "TID",
|
"tid": "TID",
|
||||||
"orderNumber": "Order Number",
|
"orderNumber": "Order No.",
|
||||||
"approvalNumber": "Approval Number",
|
"approvalNumber": "Approval Number",
|
||||||
"approvalDate": "Approval Date",
|
"approvalDate": "Approval Date",
|
||||||
"approvalDay": "Approval Day",
|
"approvalDay": "Approval Day",
|
||||||
@@ -404,10 +405,10 @@
|
|||||||
"installmentMonthly": "{{count}} Month Installment",
|
"installmentMonthly": "{{count}} Month Installment",
|
||||||
"lumpSum": "Lump Sum",
|
"lumpSum": "Lump Sum",
|
||||||
"productName": "Product Name",
|
"productName": "Product Name",
|
||||||
"buyerName": "Buyer Name",
|
"buyerName": "Purchaser Name",
|
||||||
"buyer": "Buyer",
|
"buyer": "Purchaser",
|
||||||
"originalTid": "Original TID",
|
"originalTid": "Original Transaction TID",
|
||||||
"originalAmount": "Original Amount",
|
"originalAmount": "Original Transaction Amount",
|
||||||
"partCancelTid": "Partial Cancel TID",
|
"partCancelTid": "Partial Cancel TID",
|
||||||
"reApprovalTid": "Re-approval TID",
|
"reApprovalTid": "Re-approval TID",
|
||||||
"partCancelAmount": "Partial Cancel Amount",
|
"partCancelAmount": "Partial Cancel Amount",
|
||||||
@@ -418,8 +419,8 @@
|
|||||||
"receiptInfo": "Cash Receipt",
|
"receiptInfo": "Cash Receipt",
|
||||||
"transactionId": "Transaction ID",
|
"transactionId": "Transaction ID",
|
||||||
"merchantTid": "Transaction ID",
|
"merchantTid": "Transaction ID",
|
||||||
"subMallName": "Sub Mall Name",
|
"subMallName": "Sub-mall Name",
|
||||||
"subMallBusinessNumber": "Sub Mall Business Number",
|
"subMallBusinessNumber": "Sub-mall Business Number",
|
||||||
"issueChannel": "Issue Channel",
|
"issueChannel": "Issue Channel",
|
||||||
"failureReason": "Failure Reason",
|
"failureReason": "Failure Reason",
|
||||||
"issueNumber": "Issue Number",
|
"issueNumber": "Issue Number",
|
||||||
@@ -427,8 +428,8 @@
|
|||||||
"issueDateTime": "Issue Date Time",
|
"issueDateTime": "Issue Date Time",
|
||||||
"purpose": "Purpose",
|
"purpose": "Purpose",
|
||||||
"paymentMethod": "Payment Method",
|
"paymentMethod": "Payment Method",
|
||||||
"transactionStatus": "Transaction Status",
|
"transactionStatus": "Payment Status",
|
||||||
"transactionMethod": "Transaction Method",
|
"transactionMethod": "Payment Method",
|
||||||
"transactionType": "Transaction Type",
|
"transactionType": "Transaction Type",
|
||||||
"deliveryStatus": "Delivery Status",
|
"deliveryStatus": "Delivery Status",
|
||||||
"deliveryRegistration": "Delivery Registration",
|
"deliveryRegistration": "Delivery Registration",
|
||||||
@@ -516,26 +517,26 @@
|
|||||||
},
|
},
|
||||||
"constants": {
|
"constants": {
|
||||||
"all": "All",
|
"all": "All",
|
||||||
"orderNumber": "Order Number",
|
"orderNumber": "Order No.",
|
||||||
"tid": "TID",
|
"tid": "TID",
|
||||||
"approval": "Approval",
|
"approval": "Approval",
|
||||||
"approvalComplete": "Approval/Payment Complete",
|
"approvalComplete": "Approval/Payment Complete",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"cancelShort": "Cancellation",
|
"cancelShort": "Post-cancel",
|
||||||
"totalCancel": "Total Cancellation/Cancel",
|
"totalCancel": "Pre-cancel / Cancel",
|
||||||
"totalCancelShort": "Total Cancellation",
|
"totalCancelShort": "Pre-cancel",
|
||||||
"refund": "Refund",
|
"refund": "Refund",
|
||||||
"deposit": "Deposit",
|
"deposit": "Deposit",
|
||||||
"waitingDeposit": "Waiting Deposit",
|
"waitingDeposit": "Waiting Deposit",
|
||||||
"issueCancel": "Issue Cancel",
|
"issueCancel": "Serial Number Cancel",
|
||||||
"creditCard": "Credit Card",
|
"creditCard": "Credit Card",
|
||||||
"virtualAccount": "Virtual Account",
|
"virtualAccount": "Virtual Account",
|
||||||
"accountTransfer": "Account Transfer",
|
"accountTransfer": "Bank Transfer",
|
||||||
"accountSimpleTransfer": "Account Simple Payment",
|
"accountSimpleTransfer": "Simple Account Payment",
|
||||||
"mobilePayment": "Mobile Payment",
|
"mobilePayment": "Mobile Phone",
|
||||||
"ssgMoney": "SSG Money",
|
"ssgMoney": "SSG Money",
|
||||||
"ssgBank": "SSG Bank Account",
|
"ssgBank": "SSG Bank Account",
|
||||||
"cultureLand": "Culture Gift Certificate",
|
"cultureLand": "Gift Voucher",
|
||||||
"tmoneyPay": "Tmoney Pay",
|
"tmoneyPay": "Tmoney Pay",
|
||||||
"request": "Request",
|
"request": "Request",
|
||||||
"requestCancel": "Request Cancel",
|
"requestCancel": "Request Cancel",
|
||||||
@@ -550,23 +551,23 @@
|
|||||||
"purchaseReject": "Purchase Reject",
|
"purchaseReject": "Purchase Reject",
|
||||||
"refundProcessing": "Refund Processing",
|
"refundProcessing": "Refund Processing",
|
||||||
"depositComplete": "Deposit Complete",
|
"depositComplete": "Deposit Complete",
|
||||||
"inProgress": "In Progress",
|
"inProgress": "Progressing",
|
||||||
"success": "Success",
|
"success": "Success",
|
||||||
"failure": "Failure"
|
"failure": "Failure"
|
||||||
},
|
},
|
||||||
"handWrittenIssuance": {
|
"handWrittenIssuance": {
|
||||||
"step1Title": "Enter Issue Information",
|
"step1Title": "Enter Issue Information",
|
||||||
"step2Title": "Enter Issue Amount",
|
"step2Title": "Enter Issue Amount",
|
||||||
"businessNumber": "Business Number",
|
"businessNumber": "Business registration Number",
|
||||||
"incomeDeduction": "Income Deduction",
|
"incomeDeduction": "Income Tax Deduction",
|
||||||
"expenseProof": "Expense Proof",
|
"expenseProof": "Proof of Expenditure",
|
||||||
"productNamePlaceholder": "Product Name",
|
"productNamePlaceholder": "Product Name",
|
||||||
"buyerNamePlaceholder": "Buyer Name",
|
"buyerNamePlaceholder": "Buyer Name",
|
||||||
"issueNumberPlaceholder": "Business Number OR Phone Number",
|
"issueNumberPlaceholder": "Business Number OR Phone Number",
|
||||||
"emailPlaceholder": "TEST123@nicepay.com",
|
"emailPlaceholder": "TEST123@nicepay.com",
|
||||||
"phoneNumberPlaceholder": "01012345678",
|
"phoneNumberPlaceholder": "01012345678",
|
||||||
"issueAmount": "Issue Amount",
|
"issueAmount": "Issue Amount",
|
||||||
"vatAutoCalc": "VAT Auto Calculate",
|
"vatAutoCalc": "VAT Automatic Calculation",
|
||||||
"errorMessage": "The issue amount must equal the sum of supply amount, VAT, tax-free amount, and service charge."
|
"errorMessage": "The issue amount must equal the sum of supply amount, VAT, tax-free amount, and service charge."
|
||||||
},
|
},
|
||||||
"list": {
|
"list": {
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
"noData": "데이터가 없습니다",
|
"noData": "데이터가 없습니다",
|
||||||
"next": "다음",
|
"next": "다음",
|
||||||
"latest": "최신순",
|
"latest": "최신순",
|
||||||
"oldest": "오래된순"
|
"oldest": "오래된순",
|
||||||
|
"highAmountOrder": "고액순"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"home": "홈",
|
"home": "홈",
|
||||||
@@ -423,7 +424,7 @@
|
|||||||
"transactionId": "거래ID",
|
"transactionId": "거래ID",
|
||||||
"merchantTid": "거래ID",
|
"merchantTid": "거래ID",
|
||||||
"subMallName": "서브몰명",
|
"subMallName": "서브몰명",
|
||||||
"subMallBusinessNumber": "서브몰 사업자 번호",
|
"subMallBusinessNumber": "서브몰 사업자번호",
|
||||||
"issueChannel": "발행경로",
|
"issueChannel": "발행경로",
|
||||||
"failureReason": "실패사유",
|
"failureReason": "실패사유",
|
||||||
"issueNumber": "발행번호",
|
"issueNumber": "발행번호",
|
||||||
@@ -561,7 +562,7 @@
|
|||||||
"handWrittenIssuance": {
|
"handWrittenIssuance": {
|
||||||
"step1Title": "발행 정보 입력",
|
"step1Title": "발행 정보 입력",
|
||||||
"step2Title": "발행 금액 입력",
|
"step2Title": "발행 금액 입력",
|
||||||
"businessNumber": "사업자 번호",
|
"businessNumber": "사업자번호",
|
||||||
"incomeDeduction": "소득공제",
|
"incomeDeduction": "소득공제",
|
||||||
"expenseProof": "지출증빙",
|
"expenseProof": "지출증빙",
|
||||||
"productNamePlaceholder": "상품명",
|
"productNamePlaceholder": "상품명",
|
||||||
|
|||||||
Reference in New Issue
Block a user