summaryrefslogtreecommitdiff
path: root/components/documents/project-swicher.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-08-14 11:54:47 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-08-14 11:54:47 +0000
commit969c25b56f6d29d7ffa4bc2ce04c5fb4e5846b34 (patch)
tree551d335e850e6163792ded0e7a75fa41d96d612a /components/documents/project-swicher.tsx
parentdd20ba9785cdbd3d61f6b014d003d3bd9646ad13 (diff)
(대표님) 정규벤더등록, 벤더문서관리, 벤더데이터입력, 첨부파일관리
Diffstat (limited to 'components/documents/project-swicher.tsx')
-rw-r--r--components/documents/project-swicher.tsx14
1 files changed, 10 insertions, 4 deletions
diff --git a/components/documents/project-swicher.tsx b/components/documents/project-swicher.tsx
index 5c70ea88..45300b56 100644
--- a/components/documents/project-swicher.tsx
+++ b/components/documents/project-swicher.tsx
@@ -1,7 +1,9 @@
"use client"
import * as React from "react"
+import { useParams } from "next/navigation"
import { cn } from "@/lib/utils"
+import { useTranslation } from "@/i18n/client"
import {
Select,
SelectContent,
@@ -54,6 +56,10 @@ export function ProjectSwitcher({
selectedContractId,
onSelectContract,
}: ProjectSwitcherProps) {
+ const params = useParams()
+ const lng = (params?.lng as string) || "ko"
+ const { t } = useTranslation(lng, "engineering")
+
// Select value = stringified contractId
const selectValue = selectedContractId ? String(selectedContractId) : ""
@@ -69,8 +75,8 @@ export function ProjectSwitcher({
return null
}, [projects, selectedContractId])
- // Trigger Label => 계약 이름 or "Select a contract"
- const triggerLabel = selectedContract?.contractName ?? "Select a contract"
+ // Trigger Label => 계약 이름 or placeholder
+ const triggerLabel = selectedContract?.contractName ?? t("vendorDocuments.projectSwitcher.selectContractPlaceholder")
function handleValueChange(val: string) {
const contractId = Number(val)
@@ -98,9 +104,9 @@ export function ProjectSwitcher({
isCollapsed && "flex h-9 w-9 shrink-0 items-center justify-center p-0",
"max-w-[300px] whitespace-nowrap overflow-hidden text-ellipsis"
)}
- aria-label="Select Contract"
+ aria-label={t("vendorDocuments.projectSwitcher.selectContract")}
>
- <SelectValue placeholder="Select a contract">
+ <SelectValue placeholder={t("vendorDocuments.projectSwitcher.selectContractPlaceholder")}>
{/* 실제 표시부분에도 ellipsis 처리. */}
<span
className={cn(