refactor: support i18n

This commit is contained in:
mlogclub
2026-05-25 12:06:15 +08:00
parent 309ac1fe9e
commit 988f55c80d
179 changed files with 10968 additions and 3763 deletions
+9 -4
View File
@@ -1,3 +1,5 @@
"use client"
import { ArrowUpRightIcon, Clock3Icon } from "lucide-react"
import { Button } from "@/components/ui/button"
@@ -8,6 +10,7 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card"
import { useI18n } from "@/i18n/provider"
type DashboardPlaceholderProps = {
eyebrow: string
@@ -22,6 +25,8 @@ export function DashboardPlaceholder({
description,
nextSteps,
}: DashboardPlaceholderProps) {
const t = useI18n()
return (
<div className="flex flex-1 flex-col gap-6 p-4 pt-4 lg:p-6 lg:pt-6">
<Card className="border-dashed">
@@ -36,7 +41,7 @@ export function DashboardPlaceholder({
</CardHeader>
<CardContent className="grid gap-4 md:grid-cols-[1.2fr_0.8fr]">
<div className="rounded-2xl border bg-muted/40 p-5">
<p className="text-sm font-medium"></p>
<p className="text-sm font-medium">{t("placeholder.nextSteps")}</p>
<div className="mt-4 grid gap-3">
{nextSteps.map((item) => (
<div
@@ -51,13 +56,13 @@ export function DashboardPlaceholder({
</div>
<div className="flex flex-col justify-between rounded-2xl border bg-background p-5">
<div>
<p className="text-sm font-medium"></p>
<p className="text-sm font-medium">{t("placeholder.status")}</p>
<p className="mt-2 text-sm leading-6 text-muted-foreground">
API
{t("placeholder.statusDescription")}
</p>
</div>
<Button variant="outline" className="mt-6 justify-between">
{t("placeholder.nextPhase")}
<ArrowUpRightIcon />
</Button>
</div>