Skip to content

Commit

Permalink
Add: Add meta data translation
Browse files Browse the repository at this point in the history
  • Loading branch information
whats2000 committed Dec 25, 2024
1 parent b26f299 commit f74b37b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Documents/i18n/zh-CN/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,5 +337,13 @@
"homepage.tagline": {
"message": "一个免费且开源的工具,使用人工智能提高代码质量和生产力。",
"description": "The tagline of CodeBRT"
},
"metadata.title": {
"message": "CodeBRT | 文档",
"description": "The meta title of the homepage"
},
"metadata.description": {
"message": "CodeBRT 是一个免费且开源的代码智能工具,旨在提高代码质量和生产力。",
"description": "The meta description of the homepage"
}
}
8 changes: 8 additions & 0 deletions Documents/i18n/zh-TW/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,5 +337,13 @@
"homepage.tagline": {
"message": "一個免費且開源的工具,利用人工智慧提高程式碼品質和生產力。",
"description": "The tagline of CodeBRT"
},
"metadata.title": {
"message": "CodeBRT | 說明文件",
"description": "The meta title of the homepage"
},
"metadata.description": {
"message": "一個免費且開源的工具,利用人工智慧提高程式碼品質和生產力。",
"description": "The meta description of the homepage"
}
}
14 changes: 11 additions & 3 deletions Documents/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,19 @@ function HomepageHeader() {
}

export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />"
title={translate({
id: "metadata.title",
message: `CodeBRT | Documentation`,
description: "The meta title of the homepage",
})}
description={translate({
id: "metadata.description",
message:
"A free and open-source code agent tool for improved code quality and productivity with artificial intelligence.",
description: "The meta description of the homepage",
})}
>
<HomepageHeader />
<main>
Expand Down

0 comments on commit f74b37b

Please sign in to comment.