fix: 完善首页和详情页国际化实现

- 首页 hero 区域标题和描述使用 i18n 翻译
- 首页 "BROWSE BY TAGS" 和 "FEATURED PROJECTS" 使用 i18n 翻译
- 详情页 "BACK TO PROJECTS" 使用 i18n 翻译
- 添加缺失的中英文翻译键

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-30 19:57:07 +08:00
co-authored by Claude
parent 5e43a7d382
commit 4b0770fe44
4 changed files with 27 additions and 9 deletions
+3 -1
View File
@@ -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({
<span className="material-icons text-base mr-1 group-hover:-translate-x-1 transition-transform">
arrow_back
</span>
BACK TO PROJECTS
{tProject('backToProjects')}
</a>
</div>