From 6c55a4e49871471bc5c9142bf92e7f701c544a2c Mon Sep 17 00:00:00 2001 From: davidsoniaudin2-oss Date: Mon, 27 Jul 2026 17:22:52 +0000 Subject: [PATCH] feat(frontend): complete i18n internationalization for homepage Add home section translations to all three locales (en, es, zh) and update the landing page (page.tsx) to use useI18n hook instead of hardcoded English text. All core pages now use i18n translation keys. Closes #974 --- frontend/src/app/page.tsx | 36 +++++++++++++++++-------------- frontend/src/i18n/locales/en.json | 15 +++++++++++++ frontend/src/i18n/locales/es.json | 28 ++++++++++++++++++++++-- frontend/src/i18n/locales/zh.json | 21 +++++++++++++----- 4 files changed, 77 insertions(+), 23 deletions(-) diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index a79eef80..358920d1 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,51 +1,57 @@ +'use client'; + import Link from 'next/link'; import { ArrowRight, BookOpen, Code, Users } from 'lucide-react'; +import { useI18n } from '@/i18n'; export default function Home() { + const { t } = useI18n(); + return (
- +

- Web3 Student Lab + {t('home.title')} + {t('home.title_accent')}

- The ultimate open-source educational platform for blockchain development. Learn smart contracts, collaborate on projects, and build the future of Web3. + {t('home.subtitle')}

- - Launch App + {t('home.launch_app')} - View Source + {t('home.view_source')}
-

Interactive Curriculum

-

Progress from basics to advanced smart contract development with hands-on coding exercises. Earn blockchain-verifiable certificates as you complete modules.

+

{t('home.feature_curriculum_title')}

+

{t('home.feature_curriculum_desc')}

-

In-Browser IDE

-

Write, test, and deploy Rust smart contracts directly from your browser without local setup. Integrated with Soroban for seamless testing.

+

{t('home.feature_ide_title')}

+

{t('home.feature_ide_desc')}

-

Collaborative Lab

-

Work together on Hackathon projects, share components, and build your decentralized reputation via on-chain peer reviews.

+

{t('home.feature_collab_title')}

+

{t('home.feature_collab_desc')}

@@ -54,10 +60,8 @@ export default function Home() { 🌱
-

Project Status: Grant Required

-

- Web3 Student Lab is an ambitious open-source project designed to revolutionize developer onboarding to the Stellar ecosystem. We are currently seeking a grant to fully deploy our infrastructure, finalize our curriculum, and bring this platform to mainnet. -

+

{t('home.grant_title')}

+

{t('home.grant_desc')}

diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index fef15441..7a6b9d44 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -1,4 +1,19 @@ { + "home": { + "title": "Web3 Student ", + "title_accent": "Lab", + "subtitle": "The ultimate open-source educational platform for blockchain development. Learn smart contracts, collaborate on projects, and build the future of Web3.", + "launch_app": "Launch App", + "view_source": "View Source", + "feature_curriculum_title": "Interactive Curriculum", + "feature_curriculum_desc": "Progress from basics to advanced smart contract development with hands-on coding exercises. Earn blockchain-verifiable certificates as you complete modules.", + "feature_ide_title": "In-Browser IDE", + "feature_ide_desc": "Write, test, and deploy Rust smart contracts directly from your browser without local setup. Integrated with Soroban for seamless testing.", + "feature_collab_title": "Collaborative Lab", + "feature_collab_desc": "Work together on Hackathon projects, share components, and build your decentralized reputation via on-chain peer reviews.", + "grant_title": "Project Status: Grant Required", + "grant_desc": "Web3 Student Lab is an ambitious open-source project designed to revolutionize developer onboarding to the Stellar ecosystem. We are currently seeking a grant to fully deploy our infrastructure, finalize our curriculum, and bring this platform to mainnet." + }, "nav": { "learn": "Learn", "dashboard": "Dashboard", diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json index 09860cb2..4aa44883 100644 --- a/frontend/src/i18n/locales/es.json +++ b/frontend/src/i18n/locales/es.json @@ -1,4 +1,19 @@ { + "home": { + "title": "Web3 Student ", + "title_accent": "Lab", + "subtitle": "La plataforma educativa open-source definitiva para el desarrollo blockchain. Aprende contratos inteligentes, colabora en proyectos y construye el futuro de Web3.", + "launch_app": "Iniciar App", + "view_source": "Ver Código", + "feature_curriculum_title": "Currículo Interactivo", + "feature_curriculum_desc": "Progresa desde lo básico hasta el desarrollo avanzado de contratos inteligentes con ejercicios prácticos. Obtén certificados verificables en blockchain al completar módulos.", + "feature_ide_title": "IDE en el Navegador", + "feature_ide_desc": "Escribe, prueba y despliega contratos inteligentes Rust directamente desde tu navegador sin configuración local. Integrado con Soroban para pruebas sin interrupciones.", + "feature_collab_title": "Laboratorio Colaborativo", + "feature_collab_desc": "Trabaja en proyectos de Hackathon, comparte componentes y construye tu reputación descentralizada mediante revisiones de pares en cadena.", + "grant_title": "Estado del Proyecto: Se Requiere Beca", + "grant_desc": "Web3 Student Lab es un proyecto open-source ambicioso diseñado para revolucionar la incorporación de desarrolladores al ecosistema Stellar. Actualmente buscamos una beca para desplegar completamente nuestra infraestructura, finalizar nuestro plan de estudios y llevar esta plataforma a mainnet." + }, "nav": { "learn": "Aprender", "dashboard": "Panel", @@ -172,7 +187,12 @@ "Un diagrama de flujo de tokens", "Un ejercicio simple de matemáticas de AMM" ], - "tools": ["Simuladores AMM", "Modelado en hojas de cálculo", "Paneles de protocolo", "Herramientas de exploración"] + "tools": [ + "Simuladores AMM", + "Modelado en hojas de cálculo", + "Paneles de protocolo", + "Herramientas de exploración" + ] }, "default": { "level": "Nivel abierto", @@ -197,7 +217,11 @@ "description": "Integra todo en un resultado final o punto de revisión." } ], - "deliverables": ["Notas y puntos de control", "Trabajo práctico de laboratorio", "Artefacto de revisión final"], + "deliverables": [ + "Notas y puntos de control", + "Trabajo práctico de laboratorio", + "Artefacto de revisión final" + ], "tools": ["Herramientas de wallet", "Exploradores", "Ejercicios del curso"] } } diff --git a/frontend/src/i18n/locales/zh.json b/frontend/src/i18n/locales/zh.json index c1ddfffb..c1364704 100644 --- a/frontend/src/i18n/locales/zh.json +++ b/frontend/src/i18n/locales/zh.json @@ -1,4 +1,19 @@ { + "home": { + "title": "Web3 学生", + "title_accent": "实验室", + "subtitle": "区块链开发的终极开源教育平台。学习智能合约,协作项目,构建Web3的未来。", + "launch_app": "启动应用", + "view_source": "查看源码", + "feature_curriculum_title": "互动式课程", + "feature_curriculum_desc": "通过动手编码练习,从基础到高级智能合约开发逐步进阶。完成模块后获得区块链可验证证书。", + "feature_ide_title": "浏览器内IDE", + "feature_ide_desc": "直接在浏览器中编写、测试和部署Rust智能合约,无需本地设置。与Soroban集成,实现无缝测试。", + "feature_collab_title": "协作实验室", + "feature_collab_desc": "合作开展黑客松项目,共享组件,通过链上同行评审建立去中心化声誉。", + "grant_title": "项目状态:需要资助", + "grant_desc": "Web3 Student Lab 是一个雄心勃勃的开源项目,旨在彻底改变开发者加入Stellar生态系统的方式。我们目前正在寻求资助,以全面部署我们的基础设施,完成课程,并将此平台推向主网。" + }, "nav": { "modules": "模块", "roadmap": "路线图", @@ -167,11 +182,7 @@ "description": "无常损失、智能合约风险和系统级权衡。" } ], - "deliverables": [ - "一份DeFi协议分析报告", - "一份代币流程图", - "一个简单的AMM数学练习" - ], + "deliverables": ["一份DeFi协议分析报告", "一份代币流程图", "一个简单的AMM数学练习"], "tools": ["AMM模拟器", "电子表格建模", "协议仪表板", "浏览器工具"] }, "default": {