Skip to content

Commit faeb016

Browse files
author
zihluwang
committed
docs: translate home page
1 parent 78551c0 commit faeb016

File tree

3 files changed

+37
-36
lines changed

3 files changed

+37
-36
lines changed

src/.vitepress/config.mts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@ import { britishEnglishConfig, simplifiedChineseConfig } from "./locale-config"
33

44
export default defineConfig({
55
locales: {
6-
root: {
7-
label: "English",
8-
lang: "en",
9-
...britishEnglishConfig,
10-
},
11-
"zh-CN": {
12-
label: "简体中文",
13-
lang: "zh-CN",
14-
...simplifiedChineseConfig,
15-
},
6+
root: britishEnglishConfig,
7+
"zh-CN": simplifiedChineseConfig
168
},
179
themeConfig: {
1810
socialLinks: [{ icon: "github", link: "https://github.com/onixbyte" }],

src/.vitepress/locale-config.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
import { defineConfig } from "vitepress"
1+
import { defineConfig, LocaleConfig, LocaleSpecificConfig } from "vitepress"
22
import { projectSidebar } from "./sidebar"
3+
import { DefaultTheme } from "vitepress/types"
34

4-
export const britishEnglishConfig = defineConfig({
5+
export const britishEnglishConfig: LocaleSpecificConfig<DefaultTheme.Config> & {
6+
label: string
7+
link?: string
8+
} = {
9+
label: "English",
10+
lang: "en",
511
title: "OnixByte Official",
612
titleTemplate: ":title | OnixByte",
713
description:
@@ -99,9 +105,14 @@ export const britishEnglishConfig = defineConfig({
99105
],
100106
},
101107
},
102-
})
108+
}
103109

104-
export const simplifiedChineseConfig = defineConfig({
110+
export const simplifiedChineseConfig: LocaleSpecificConfig<DefaultTheme.Config> & {
111+
label: string
112+
link?: string
113+
} = {
114+
label: "简体中文",
115+
lang: "zh-CN",
105116
title: "OnixByte 官方网站",
106117
titleTemplate: ":title | OnixByte",
107118
description: "",
@@ -136,7 +147,10 @@ export const simplifiedChineseConfig = defineConfig({
136147
items: [
137148
{ text: "许可证", link: "/zh-CN/opensource/license" },
138149
{ text: "贡献", link: "/zh-CN/opensource/contributing" },
139-
{ text: "Code of Conduct", link: "/zh-CN/opensource/code-of-conduct" },
150+
{
151+
text: "Code of Conduct",
152+
link: "/zh-CN/opensource/code-of-conduct",
153+
},
140154
],
141155
},
142156
{
@@ -198,6 +212,6 @@ export const simplifiedChineseConfig = defineConfig({
198212
],
199213
},
200214
},
201-
})
215+
}
202216

203217
export const traditionalChineseConfig = defineConfig({})

src/zh-CN/index.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,39 @@ titleTemplate: ":title"
66

77
hero:
88
name: OnixByte
9-
tagline: Building Better, Together.
9+
tagline: 携手共创更美好。
1010

1111
features:
1212
- title: 开源类库
1313
details: |
14-
Our collection of open-source class libraries offers meticulously crafted, reusable components
15-
designed to accelerate your development process. Each library is maintained with rigorous
16-
standards to ensure reliability, efficiency, and ease of integration, empowering developers to
17-
build robust applications with confidence.
14+
我们的开源类库集合提供了精心打造的可重用组件,旨在加速您的开发流程。每个类库都遵循严格标准进行维护,确保其可靠性、高效性和易于集成,助力开发者自信地构建稳健的应用程序。
1815
- title: 定制您的项目
1916
details: |
20-
Tailor your project to perfectly suit your unique requirements with our flexible and modular
21-
tools. Whether you need to tweak existing components or develop bespoke functionalities, our
22-
solutions provide the adaptability and control to shape your project exactly as envisioned.
17+
使用我们灵活且模块化的工具,量身定制您的项目,完美契合您的独特需求。无论是调整现有组件,还是开发定制功能,我们的解决方案都能提供足够的灵活性和控制力,让您的项目精准呈现理想蓝图。
2318
---
2419

2520
[//]: # (![Banner]&#40;/brand/banner-filled.svg&#41;)
2621

27-
## Innovating Development, Empowering Developers
22+
## 创新驱动发展,赋能助力开发。
2823

29-
At OnixByte, we aim to simplify and accelerate the software development process through high-quality, open-source tools and frameworks. Whether you're building a robust backend, a sleek frontend, or exploring automation, our resources are designed to meet your needs.
24+
OnixByte,我们致力于通过高质量的开源工具和框架,简化并加速软件开发流程。无论您是在构建稳健的后端、流畅的前端,还是探索自动化,我们的资源均旨在满足您的各种需求。
3025

31-
## 🚀 Mission
26+
## 🚀 使命
3227

33-
We are committed to:
28+
我们致力于:
3429

35-
- Creating innovative development tools that save time and effort.
36-
- Sharing knowledge and best practices with the developer community.
37-
- Fostering collaboration and building impactful open-source projects.
30+
- 创造创新的开发工具,节省时间与精力。
31+
- 与开发者社区共享知识和最佳实践。
32+
- 促进合作,打造有影响力的开源项目。
3833

39-
## ❤️ Join the Community
34+
## ❤️ 加入社区
4035

41-
- **GitHub Discussions**: Ask questions, share ideas, and discuss solutions.
36+
- **GitHub 讨论区**:提问、分享想法,讨论解决方案。
4237

43-
## 📧 Contact Us
38+
## 📧 联系我们
4439

45-
Have a question, feedback, or partnership opportunity? Reach out to us!
40+
有问题、反馈或合作机会?欢迎联系我们!
4641

47-
- Email us: [email protected]
42+
- 发送邮件至:[email protected]
4843

4944

0 commit comments

Comments
 (0)