feat(i18n): internationalize landing page sections

- Update AboutSection, FeaturesSection, HowItWorksSection to use language prop pattern
- Replace useLanguage hook with language prop interface for consistency
- Add comprehensive internationalization support for landing page content
- Update HeroSection and LandingPage to support language prop flow

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
icy
2025-11-02 06:21:48 +08:00
parent e0347162cf
commit 621f105ddd
5 changed files with 175 additions and 66 deletions

View File

@@ -2,8 +2,13 @@ import { motion } from 'framer-motion'
import { Shield, Target } from 'lucide-react'
import AnimatedSection from './AnimatedSection'
import Typewriter from '../Typewriter'
import { t, Language } from '../../i18n/translations'
export default function AboutSection() {
interface AboutSectionProps {
language: Language
}
export default function AboutSection({ language }: AboutSectionProps) {
return (
<AnimatedSection id='about' backgroundColor='var(--brand-dark-gray)'>
<div className='max-w-7xl mx-auto'>
@@ -31,7 +36,7 @@ export default function AboutSection() {
className='text-sm font-semibold'
style={{ color: 'var(--brand-yellow)' }}
>
NOFX
{t('aboutNofx', language)}
</span>
</motion.div>
@@ -39,23 +44,19 @@ export default function AboutSection() {
className='text-4xl font-bold'
style={{ color: 'var(--brand-light-gray)' }}
>
NOFX
{t('whatIsNofx', language)}
</h2>
<p
className='text-lg leading-relaxed'
style={{ color: 'var(--text-secondary)' }}
>
NOFX AI 'Linux'
OS '决策-风险-执行'
{t('nofxNotAnotherBot', language)} {t('nofxDescription1', language)} {t('nofxDescription2', language)}
</p>
<p
className='text-lg leading-relaxed'
style={{ color: 'var(--text-secondary)' }}
>
24/7AI
CodeFi PR
{t('nofxDescription3', language)} {t('nofxDescription4', language)} {t('nofxDescription5', language)}
</p>
<motion.div
className='flex items-center gap-3 pt-4'
@@ -75,13 +76,13 @@ export default function AboutSection() {
className='font-semibold'
style={{ color: 'var(--brand-light-gray)' }}
>
100%
{t('youFullControl', language)}
</div>
<div
className='text-sm'
style={{ color: 'var(--text-secondary)' }}
>
AI
{t('fullControlDesc', language)}
</div>
</div>
</motion.div>
@@ -101,16 +102,16 @@ export default function AboutSection() {
'$ cd nofx',
'$ chmod +x start.sh',
'$ ./start.sh start --build',
' 启动自动交易系统...',
' API服务器启动在端口 8080',
' Web 控制台 http://localhost:3000',
t('startupMessages1', language),
t('startupMessages2', language),
t('startupMessages3', language),
]}
typingSpeed={70}
lineDelay={900}
className='text-sm font-mono'
style={{
color: '#00FF41',
textShadow: '0 0 6px rgba(0,255,65,0.6)',
color: '#00FF88',
textShadow: '0 0 8px rgba(0,255,136,0.4)',
}}
/>
</div>