1+ "use client"
2+
13import { Button } from "@/components/ui/button"
24import { Card , CardContent } from "@/components/ui/card"
3- import { Download , Terminal , Package } from "lucide-react"
5+ import { Download , Package } from "lucide-react"
6+ import { useTranslation } from "react-i18next"
47
58const downloads = [
69 {
710 icon : Package ,
8- platform : "macOS Intel processors" ,
11+ key : "macIntel" ,
12+ defaultPlatform : "macOS Intel processors" ,
913 version : "v0.1.15" ,
1014 size : "487 MB" ,
11- format : "binary" ,
15+ defaultFormat : "binary" ,
1216 link : "https://dashai.nyc3.cdn.digitaloceanspaces.com/executables/DashAI-launcher-cpu-x86_64" ,
1317 } ,
1418 {
1519 icon : Package ,
16- platform : "macOS ARM processors" ,
20+ key : "macArm" ,
21+ defaultPlatform : "macOS ARM processors" ,
1722 version : "v0.1.15" ,
1823 size : "381 MB" ,
19- format : "binary" ,
24+ defaultFormat : "binary" ,
2025 link : "https://dashai.nyc3.cdn.digitaloceanspaces.com/executables/DashAI-launcher-cpu-arm64" ,
2126 } ,
2227 {
2328 icon : Package ,
24- platform : "Windows" ,
29+ key : "windows" ,
30+ defaultPlatform : "Windows" ,
2531 version : "v0.1.15" ,
2632 size : "434 MB" ,
27- format : ".exe" ,
33+ defaultFormat : ".exe" ,
2834 link : "https://dashai.nyc3.cdn.digitaloceanspaces.com/executables/DashAI-launcher-cpu.exe" ,
2935 } ,
30- // {
31- // icon: Package,
32- // platform: "Docker",
33- // version: "latest",
34- // size: "~300 MB",
35- // format: "container",
36- // link: "#",
37- // },
3836]
3937
4038export function DownloadSection ( ) {
39+ const { t } = useTranslation ( )
4140 return (
4241 < section id = "download" className = "py-24 px-4 bg-secondary/30" >
4342 < div className = "container mx-auto" >
4443 < div className = "text-center mb-16" >
45- < h2 className = "text-3xl md:text-5xl font-bold mb-2 text-balance" > Download DashAI</ h2 >
46- < span className = "block text-base text-primary font-semibold mb-4" > Beta Version</ span >
44+ < h2 className = "text-3xl md:text-5xl font-bold mb-2 text-balance" >
45+ { t ( "download:title" , { defaultValue : "Download DashAI" } ) }
46+ </ h2 >
47+ < span className = "block text-base text-primary font-semibold mb-4" >
48+ { t ( "download:badge" , { defaultValue : "Beta Version" } ) }
49+ </ span >
4750 < p className = "text-lg text-muted-foreground max-w-2xl mx-auto leading-relaxed" >
48- This early version lets you explore DashAI’s main features. We appreciate your feedback to help us improve before the official release.
51+ { t ( "download:description" , {
52+ defaultValue :
53+ "This early version lets you explore DashAI’s main features. We appreciate your feedback to help us improve before the official release." ,
54+ } ) }
4955 </ p >
5056 </ div >
5157
5258 < div className = "max-w-5xl mx-auto" >
5359 < div className = "grid grid-cols-1 md:grid-cols-3 gap-6 mb-12" >
5460 { downloads . map ( ( download , index ) => {
5561 const Icon = download . icon
62+ const platform = t ( `download:cards.${ download . key } .platform` , {
63+ defaultValue : download . defaultPlatform ,
64+ } )
65+ const format = t ( `download:cards.${ download . key } .format` , {
66+ defaultValue : download . defaultFormat ,
67+ } )
5668 return (
5769 < Card
58- key = { index }
70+ key = { download . key }
5971 className = "bg-card border-border hover:border-primary/50 transition-all duration-300 group cursor-pointer"
6072 >
6173 < CardContent className = "p-6" >
6274 < div className = "w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors" >
6375 < Icon className = "h-6 w-6 text-primary" />
6476 </ div >
65- < h3 className = "text-xl font-semibold mb-2" > { download . platform } </ h3 >
77+ < h3 className = "text-xl font-semibold mb-2" > { platform } </ h3 >
6678 < div className = "space-y-1 mb-4" >
6779 < p className = "text-sm text-muted-foreground" >
6880 { download . version } • { download . size }
6981 </ p >
70- < p className = "text-xs text-muted-foreground font-mono" > { download . format } </ p >
82+ < p className = "text-xs text-muted-foreground font-mono" > { format } </ p >
7183 </ div >
7284 < Button
7385 className = "w-full bg-primary hover:bg-primary/90 text-primary-foreground cursor-pointer"
@@ -76,7 +88,7 @@ export function DownloadSection() {
7688 >
7789 < a href = { download . link } download >
7890 < Download className = "mr-2 h-4 w-4" />
79- Download
91+ { t ( "download:button" , { defaultValue : " Download" } ) }
8092 </ a >
8193 </ Button >
8294 </ CardContent >
@@ -89,12 +101,20 @@ export function DownloadSection() {
89101 < CardContent className = "p-8" >
90102 < div className = "flex flex-col md:flex-row items-center justify-between gap-6" >
91103 < div >
92- < h3 className = "text-xl font-semibold mb-2" > Install via pip</ h3 >
93- < p className = "text-muted-foreground text-sm" > For developers who prefer command-line installation</ p >
104+ < h3 className = "text-xl font-semibold mb-2" >
105+ { t ( "download:pip.title" , { defaultValue : "Install via pip" } ) }
106+ </ h3 >
107+ < p className = "text-muted-foreground text-sm" >
108+ { t ( "download:pip.subtitle" , {
109+ defaultValue : "For developers who prefer command-line installation" ,
110+ } ) }
111+ </ p >
94112 </ div >
95113 < div className = "w-full md:w-auto" >
96114 < div className = "bg-secondary/50 rounded-lg p-4 font-mono text-sm border border-border" >
97- < code className = "text-primary" > pip install dashai</ code >
115+ < code className = "text-primary" >
116+ { t ( "download:pip.command" , { defaultValue : "pip install dashai" } ) }
117+ </ code >
98118 </ div >
99119 </ div >
100120 </ div >
0 commit comments