홈 화면, 메뉴, 네비게이션, 계정 관리 다국어화 완료
- 홈 화면 일/월 탭, 매출/정산 현황 다국어화 - 매출/정산 상세 정보 라벨 다국어화 (승인/취소 건수, 정산한도 등) - 거래 인사이트 및 랭킹 섹션 다국어화 - 요일 이름 동적 번역 기능 추가 (월요일-일요일 → Monday-Sunday) - 계정 관리 화면 다국어화 (계정 상태, 로그인 범위, 권한 설정) - 메뉴 카테고리 다국어화 (en 언어시 menuNameEng 사용) - 즐겨찾기 메뉴 다국어화 - 하단 네비게이션 버튼 다국어화 - 공지사항 제목 다국어화 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { UserFavorite } from '@/entities/user/model/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { useLocation } from 'react-router';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
/*
|
||||
const items: Array<UserFavorite> = [
|
||||
@@ -32,13 +33,14 @@ export const FavoriteWrapper = ({
|
||||
setMenuOn
|
||||
}: FavoriteWrapperProps) => {
|
||||
const { navigate } = useNavigate();
|
||||
const { i18n, t } = useTranslation();
|
||||
|
||||
const [favoriteItems, setFavoriteItems] = useState<Array<UserFavorite>>([]);
|
||||
|
||||
const itemAdd: UserFavorite = {
|
||||
menuId: 0,
|
||||
menuName: '편집하기',
|
||||
menuNameEng: 'edit',
|
||||
menuName: t('favorite.edit'),
|
||||
menuNameEng: t('favorite.edit'),
|
||||
iconFilePath: IMAGE_ROOT + '/ico_menu_plus.svg',
|
||||
programPath: '',
|
||||
};
|
||||
@@ -66,6 +68,10 @@ export const FavoriteWrapper = ({
|
||||
const makeFavoriteItems = () => {
|
||||
let rs = [];
|
||||
for(let i=0;i<favoriteItems.length;i++){
|
||||
const displayName = i18n.language === 'en' && favoriteItems[i]?.menuNameEng
|
||||
? favoriteItems[i]?.menuNameEng
|
||||
: favoriteItems[i]?.menuName;
|
||||
|
||||
rs.push(
|
||||
<SwiperSlide key={ `favorite-slide-key-${i}` }>
|
||||
<div
|
||||
@@ -75,10 +81,10 @@ export const FavoriteWrapper = ({
|
||||
<div className="swiper-icon coin-icon">
|
||||
<img
|
||||
src={ favoriteItems[i]?.iconFilePath || '' }
|
||||
alt={ favoriteItems[i]?.menuName }
|
||||
alt={ displayName }
|
||||
/>
|
||||
</div>
|
||||
<span className="swiper-text">{ favoriteItems[i]?.menuName }</span>
|
||||
<span className="swiper-text">{ displayName }</span>
|
||||
</div>
|
||||
</SwiperSlide>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user