From c54a2445b6285d06c0ce3afa1cd3aa6aecf6de94 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 24 Nov 2025 20:13:50 +0900 Subject: (김준회) dolce rebuild: i18n 지원 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/dolce/table/file-list-columns.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'lib/dolce/table/file-list-columns.tsx') diff --git a/lib/dolce/table/file-list-columns.tsx b/lib/dolce/table/file-list-columns.tsx index f703d56d..36a579a3 100644 --- a/lib/dolce/table/file-list-columns.tsx +++ b/lib/dolce/table/file-list-columns.tsx @@ -4,17 +4,20 @@ import { ColumnDef } from "@tanstack/react-table"; import { FileInfoItem } from "../actions"; import { Button } from "@/components/ui/button"; import { Download } from "lucide-react"; +import { formatDolceDateTime } from "../utils/date-formatter"; interface FileListColumnsProps { onDownload: (file: FileInfoItem) => void; + lng?: string; } export const createFileListColumns = ({ onDownload, + lng = "ko", }: FileListColumnsProps): ColumnDef[] => [ { accessorKey: "FileSeq", - header: "순번", + header: lng === "ko" ? "순번" : "No.", minSize: 80, cell: ({ row }) => { return
{row.getValue("FileSeq")}
; @@ -22,7 +25,7 @@ export const createFileListColumns = ({ }, { accessorKey: "FileName", - header: "파일명", + header: lng === "ko" ? "파일명" : "File Name", minSize: 300, cell: ({ row }) => { return
{row.getValue("FileName")}
; @@ -30,7 +33,7 @@ export const createFileListColumns = ({ }, { accessorKey: "FileSize", - header: "파일크기", + header: lng === "ko" ? "파일크기" : "File Size", minSize: 100, cell: ({ row }) => { const size = parseInt(row.getValue("FileSize") as string); @@ -43,15 +46,16 @@ export const createFileListColumns = ({ }, { accessorKey: "CreateDt", - header: "생성일시", + header: lng === "ko" ? "생성일시" : "Created Date", minSize: 200, cell: ({ row }) => { - return
{row.getValue("CreateDt")}
; + const date = row.getValue("CreateDt") as string; + return
{formatDolceDateTime(date)}
; }, }, { id: "actions", - header: "다운로드", + header: lng === "ko" ? "다운로드" : "Download", minSize: 120, cell: ({ row }) => { return ( @@ -61,7 +65,7 @@ export const createFileListColumns = ({ onClick={() => onDownload(row.original)} > - 다운로드 + {lng === "ko" ? "다운로드" : "Download"} ); }, -- cgit v1.2.3