From 7bdddbacf8610140c0c9db7ccb09d546203ce380 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Tue, 2 Dec 2025 20:04:17 +0900 Subject: (김준회) 메뉴명과 화면 내 h태그 일치 시키기, i18n 적용 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bidding-projects/bid-projects-container.tsx | 8 ++++++-- components/polices/policy-page-client.tsx | 12 ++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'components') diff --git a/components/bidding-projects/bid-projects-container.tsx b/components/bidding-projects/bid-projects-container.tsx index 9890a959..6d6638f6 100644 --- a/components/bidding-projects/bid-projects-container.tsx +++ b/components/bidding-projects/bid-projects-container.tsx @@ -12,6 +12,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" import { InformationButton } from "@/components/information/information-button" +import { useTranslation } from "@/i18n/client" interface ProjectType { id: string @@ -19,14 +20,17 @@ interface ProjectType { } interface BidProjectsContainerProps { + lng: string projectTypes: ProjectType[] children: React.ReactNode } export function BidProjectsContainer({ + lng, projectTypes, children, }: BidProjectsContainerProps) { + const { t } = useTranslation(lng, 'menu') const router = useRouter() const pathname = usePathname() const searchParamsObj = useSearchParams() @@ -41,7 +45,7 @@ export function BidProjectsContainer({ const projectType = searchParams.get("type") || "all" // 선택한 프로젝트 타입에 해당하는 이름 찾기 - const selectedProject = projectTypes.find((project) => project.id === projectType)?.name || "전체" + const selectedProject = projectTypes.find((project) => project.id === projectType)?.name || t('common.all') || "전체" // 프로젝트 타입 변경 핸들러 const handleProjectTypeChange = React.useCallback((value: string) => { @@ -66,7 +70,7 @@ export function BidProjectsContainer({ {/* 왼쪽: 타이틀 & 설명 */}
diff --git a/components/polices/policy-page-client.tsx b/components/polices/policy-page-client.tsx index ccc87c31..86bd3128 100644 --- a/components/polices/policy-page-client.tsx +++ b/components/polices/policy-page-client.tsx @@ -4,6 +4,7 @@ import { useState } from 'react' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { FileText, Shield, Clock, Calendar, User } from 'lucide-react' import { PolicyManagementClient } from '@/components/polices/policy-management-client' +import { useTranslation } from '@/i18n/client' interface Policy { id: number @@ -44,7 +45,8 @@ interface PolicyPageClientProps { } lastUpdate: string | null } - } + }, + lng: string } // 선택된 locale의 가장 최근 업데이트 날짜를 가져오는 함수 @@ -64,7 +66,9 @@ function getLastUpdateForLocale(data: PolicyPageClientProps['data'], locale: 'ko return sortedPolicies[0]?.createdAt || null } -export function PolicyPageClient({ data }: PolicyPageClientProps) { +export function PolicyPageClient({ data, lng }: PolicyPageClientProps) { + const { t } = useTranslation(lng, 'menu') + const [selectedLocale, setSelectedLocale] = useState<'ko' | 'en'>('ko') // 선택된 locale에 맞는 데이터 필터링 @@ -90,9 +94,9 @@ export function PolicyPageClient({ data }: PolicyPageClientProps) { {/* 헤더 */}
- 개인정보 처리방침과 이용약관을 버전별로 관리합니다 + {t('menu.vendor_management.vendor_consent_desc')}