diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx index 25632955d..15fb676cf 100644 --- a/src/components/HomepageFeatures/index.tsx +++ b/src/components/HomepageFeatures/index.tsx @@ -3,6 +3,7 @@ import clsx from 'clsx'; import styles from './styles.module.css'; import Heading from "@theme/Heading"; import Link from '@docusaurus/Link'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; type FeatureItem = { title: string; @@ -10,35 +11,52 @@ type FeatureItem = { icon?: ReactNode; }; -const FeatureList: FeatureItem[] = [ - { - title: '智能任务自动化', - description: ( - <> - 利用 AutoDev Planner 结合 AI 模型,自动规划与执行复杂的开发任务(编码、测试、构建等),支持手动调整,简化工作流程。 - > - ), - icon:
- }, - { - title: '高度定制化体验', - description: ( - <> - 支持自定义智能体、私有模型及提示词指令,轻松打造满足个人、团队或企业特定需求的 AutoDev 工作流,提升开发效率。 - > - ), - icon: - }, - { - title: '精准上下文感知', - description: ( - <> - 深度整合 IDE 插件并支持 MCP 协议,为 AI 提供丰富准确的项目上下文,显著减少 AI 幻觉,确保结果更可靠。 - > - ), - icon: - }, -]; +function useFeatureList() { + const { i18n: { currentLocale } } = useDocusaurusContext(); + const isEnglish = currentLocale === 'en'; + + return [ + { + title: isEnglish ? 'Intelligent Task Automation' : '智能任务自动化', + description: isEnglish ? ( + <> + Leverage AutoDev Planner with AI models to automatically plan and execute complex development tasks (coding, testing, building, etc.), supporting manual adjustments and simplifying workflows. + > + ) : ( + <> + 利用 AutoDev Planner 结合 AI 模型,自动规划与执行复杂的开发任务(编码、测试、构建等),支持手动调整,简化工作流程。 + > + ), + icon: + }, + { + title: isEnglish ? 'Highly Customizable Experience' : '高度定制化体验', + description: isEnglish ? ( + <> + Support for custom agents, private models, and prompt instructions, easily creating AutoDev workflows that meet the specific needs of individuals, teams, or enterprises to improve development efficiency. + > + ) : ( + <> + 支持自定义智能体、私有模型及提示词指令,轻松打造满足个人、团队或企业特定需求的 AutoDev 工作流,提升开发效率。 + > + ), + icon: + }, + { + title: isEnglish ? 'Precise Context Awareness' : '精准上下文感知', + description: isEnglish ? ( + <> + Deep integration with IDE plugins and support for MCP protocol, providing rich and accurate project context for AI, significantly reducing AI hallucinations and ensuring more reliable results. + > + ) : ( + <> + 深度整合 IDE 插件并支持 MCP 协议,为 AI 提供丰富准确的项目上下文,显著减少 AI 幻觉,确保结果更可靠。 + > + ), + icon: + }, + ]; +} function Feature({title, description, icon}: FeatureItem) { return ( @@ -56,7 +74,15 @@ function Feature({title, description, icon}: FeatureItem) { // Quick links section function QuickLinks() { - const links = [ + const { i18n: { currentLocale } } = useDocusaurusContext(); + const isEnglish = currentLocale === 'en'; + + const links = isEnglish ? [ + { title: 'Installation Guide', description: 'Quickly set up AutoDev in your environment', link: '/quick-start' }, + { title: 'AI Programmer', description: 'Explore AutoDev Sketch automatic coding', link: '/composer' }, + { title: 'Customization', description: 'Learn how to customize AutoDev for your specific needs', link: '/customize' }, + { title: 'Agents', description: 'Build personal, team agents, integrate company agents', link: '/agent' }, + ] : [ { title: '安装指南', description: '快速在您的环境中设置 AutoDev', link: '/quick-start' }, { title: 'AI 程序员', description: '探索 AutoDev Sketch 自动编码', link: '/composer' }, { title: '定制化', description: '学习如何根据您的特定需求自定义 AutoDev', link: '/customize' }, @@ -67,8 +93,8 @@ function QuickLinks() {探索我们的文档,了解更多关于 AutoDev 的信息
+{isEnglish ? 'Explore our documentation to learn more about AutoDev' : '探索我们的文档,了解更多关于 AutoDev 的信息'}
了解 AutoDev 如何从传统 AI 编码助手中脱颖而出
+{isEnglish ? 'Learn how AutoDev stands out from traditional AI coding assistants' : '了解 AutoDev 如何从传统 AI 编码助手中脱颖而出'}
功能 | -传统 AI 助手 | +{isEnglish ? 'Feature' : '功能'} | +{isEnglish ? 'Traditional AI Assistants' : '传统 AI 助手'} | AutoDev | |
---|---|---|---|---|---|
主要功能 | -代码建议和补全 | -自主规划和执行复杂开发任务 | +{isEnglish ? 'Main Function' : '主要功能'} | +{isEnglish ? 'Code suggestions and completions' : '代码建议和补全'} | +{isEnglish ? 'Autonomous planning and execution of complex development tasks' : '自主规划和执行复杂开发任务'} |
代码修改 | -建议代码片段 | -自主编辑、重构和改进现有代码 | +{isEnglish ? 'Code Modification' : '代码修改'} | +{isEnglish ? 'Suggest code snippets' : '建议代码片段'} | +{isEnglish ? 'Autonomously edit, refactor, and improve existing code' : '自主编辑、重构和改进现有代码'} |
构建与执行 | +{isEnglish ? 'Build & Execute' : '构建与执行'} |
✕
- 有限或无
+ {isEnglish ? 'Limited or none' : '有限或无'}
|
✓
- 在安全环境中构建和执行代码
+ {isEnglish ? 'Build and execute code in a safe environment' : '在安全环境中构建和执行代码'}
|
||
测试 | +{isEnglish ? 'Testing' : '测试'} |
✕
- 有限的测试生成
+ {isEnglish ? 'Limited test generation' : '有限的测试生成'}
|
✓
- 创建并运行全面的测试
+ {isEnglish ? 'Create and run comprehensive tests' : '创建并运行全面的测试'}
|
||
Git 操作 | +{isEnglish ? 'Git Operations' : 'Git 操作'} |
✕
- 无
+ {isEnglish ? 'None' : '无'}
|
✓
- 管理分支、提交和 PR
+ {isEnglish ? 'Manage branches, commits, and PRs' : '管理分支、提交和 PR'}
|
||
工作流复杂性 | -简单、孤立的任务 | -端到端复杂开发工作流 | +{isEnglish ? 'Workflow Complexity' : '工作流复杂性'} | +{isEnglish ? 'Simple, isolated tasks' : '简单、孤立的任务'} | +{isEnglish ? 'End-to-end complex development workflows' : '端到端复杂开发工作流'} |
与其他开发者联系并为 AutoDev 做出贡献
+{isEnglish ? 'Connect with other developers and contribute to AutoDev' : '与其他开发者联系并为 AutoDev 做出贡献'}
{siteConfig.tagline}