Apply dynamic locale to list-date-group components for i18n support

- Update moment locale based on current language (ko/en-gb)
- Apply to transaction, settlement, and additional-service modules
- Add service name localization in transaction list-date-group
- Date format displays weekday in user's language (ko: 수, en: Wed)

🤖 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-31 11:01:50 +09:00
parent abb0843f51
commit 255db14404
3 changed files with 44 additions and 4 deletions

View File

@@ -1,14 +1,21 @@
import moment from 'moment';
import 'moment/dist/locale/ko';
import 'moment/dist/locale/en-gb';
import { ListDateGroupProps } from '../model/types';
import { ListItem } from './list-item';
import { useTranslation } from 'react-i18next';
export const ListDateGroup = ({
date,
periodType,
items
}: ListDateGroupProps) => {
moment.locale('ko');
const { i18n } = useTranslation();
// Set moment locale based on current language
const currentLocale = i18n.language === 'ko' ? 'ko' : 'en-gb';
moment.locale(currentLocale);
const getStateDate = () => {
let stateDate = moment(date).format('YY.MM.DD(ddd)');
return stateDate;