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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user