diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx index ae51ac8..c72d733 100644 --- a/src/app/[locale]/page.tsx +++ b/src/app/[locale]/page.tsx @@ -28,10 +28,10 @@ export default async function HomePage({ params }: HomePageProps) {

- AI PROJECT
NAVIGATOR + {t('heroTitle')}
{t('heroTitle2')}

- Discover and explore high-quality AI projects from across the web. Curated for developers and enthusiasts. + {t('heroDescription')}

}>

- BROWSE BY TAGS + {t('browseByTagsSection')}

@@ -53,16 +53,16 @@ export default async function HomePage({ params }: HomePageProps) { {/* Featured Projects Section */}
-

FEATURED PROJECTS

+

{t('featuredProjectsSection')}

- VIEW ALL + {t('viewAll')}
- VIEW ALL PROJECTS + {t('viewAllProjects')}
diff --git a/src/app/[locale]/projects/[id]/page.tsx b/src/app/[locale]/projects/[id]/page.tsx index 28f7605..3b298c2 100644 --- a/src/app/[locale]/projects/[id]/page.tsx +++ b/src/app/[locale]/projects/[id]/page.tsx @@ -1,4 +1,5 @@ import { notFound } from 'next/navigation' +import { getTranslations } from 'next-intl/server' import { getProjectBySlug, getProjects } from '@/hooks/useProjects' import { ProjectDetail } from '@/components/project/ProjectDetail' import { ProjectSidebar } from '@/components/project/ProjectSidebar' @@ -13,6 +14,7 @@ export default async function ProjectDetailPage({ }: ProjectDetailPageProps) { const resolvedParams = await params const { locale, id } = resolvedParams + const tProject = await getTranslations('project') // Get project by slug const project = await getProjectBySlug(id) @@ -43,7 +45,7 @@ export default async function ProjectDetailPage({ arrow_back - BACK TO PROJECTS + {tProject('backToProjects')} diff --git a/src/messages/en.json b/src/messages/en.json index 359c75c..019a7ec 100644 --- a/src/messages/en.json +++ b/src/messages/en.json @@ -15,9 +15,17 @@ "browseByTag": "Browse by Tag", "searchPlaceholder": "Search AI projects...", "metaTitle": "Agent Park - AI Project Navigator", - "metaDescription": "Discover and explore quality AI projects from across the web" + "metaDescription": "Discover and explore quality AI projects from across the web", + "heroTitle": "AI PROJECT", + "heroTitle2": "NAVIGATOR", + "heroDescription": "Discover and explore high-quality AI projects from across the web. Curated for developers and enthusiasts.", + "browseByTagsSection": "BROWSE BY TAGS", + "featuredProjectsSection": "FEATURED PROJECTS", + "viewAll": "VIEW ALL", + "viewAllProjects": "VIEW ALL PROJECTS" }, "project": { + "backToProjects": "BACK TO PROJECTS", "details": "Project Details", "externalLinks": "External Links", "viewProject": "View Project", diff --git a/src/messages/zh.json b/src/messages/zh.json index 06c1b0a..2af85a5 100644 --- a/src/messages/zh.json +++ b/src/messages/zh.json @@ -15,9 +15,17 @@ "browseByTag": "按标签浏览", "searchPlaceholder": "搜索 AI 项目...", "metaTitle": "Agent Park - AI 项目导航", - "metaDescription": "发现和探索全网优质 AI 项目" + "metaDescription": "发现和探索全网优质 AI 项目", + "heroTitle": "AI 项目", + "heroTitle2": "导航", + "heroDescription": "发现和探索来自全网的高质量 AI 项目。为开发者和爱好者精心策划。", + "browseByTagsSection": "按标签浏览", + "featuredProjectsSection": "精选项目", + "viewAll": "查看全部", + "viewAllProjects": "查看全部项目" }, "project": { + "backToProjects": "返回项目列表", "details": "项目详情", "externalLinks": "外部链接", "viewProject": "查看项目",