feat: implement i18n

This commit is contained in:
Henry Li
2026-01-20 14:06:47 +08:00
parent 33e6197f65
commit ac9ef30780
21 changed files with 455 additions and 69 deletions

View File

@@ -10,6 +10,7 @@ import {
CardTitle,
} from "@/components/ui/card";
import { urlOfArtifact } from "@/core/artifacts/utils";
import { useI18n } from "@/core/i18n/hooks";
import { getFileExtensionDisplayName, getFileName } from "@/core/utils/files";
import { cn } from "@/lib/utils";
@@ -24,6 +25,7 @@ export function ArtifactFileList({
files: string[];
threadId: string;
}) {
const { t } = useI18n();
const { select: selectArtifact, setOpen } = useArtifacts();
const handleClick = useCallback(
(filepath: string) => {
@@ -57,7 +59,7 @@ export function ArtifactFileList({
>
<Button variant="ghost">
<DownloadIcon className="size-4" />
Download
{t.common.download}
</Button>
</a>
</CardAction>