Skip to content

Commit 29a4819

Browse files
committed
feat(docs): support en
feat(docs): support en feat(docs): support en
1 parent 11433d3 commit 29a4819

74 files changed

Lines changed: 4857 additions & 1062 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/src/.vuepress/config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ export default defineUserConfig({
77

88
locales: {
99
"/": {
10+
lang: "en-US",
11+
title: "Jzero Framework",
12+
description: "Jzero docs",
13+
},
14+
"/zh-CN/": {
1015
lang: "zh-CN",
1116
title: "Jzero Framework",
1217
description: "Jzero docs",
1318
},
14-
// "/en/": {
15-
// lang: "en-US",
16-
// title: "Jzero Framework",
17-
// description: "Jzero docs",
18-
// },
1919
},
2020

2121
theme,

docs/src/.vuepress/navbar/en.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ import { navbar } from "vuepress-theme-hope";
33

44
// @ts-ignore
55
export const enNavbar = navbar([
6-
"/en/",
6+
{
7+
link: "https://docs.jzero.io/blog/",
8+
text: "Blog",
9+
icon: "fluent-mdl2:blog"
10+
},
711
{
812
link: "https://github.com/jzero-io/examples",
9-
text: "code example",
13+
text: "Examples",
1014
icon: "vscode-icons:file-type-go"
1115
},
1216
{
1317
link: "https://github.com/jzero-io/jzero-admin",
14-
text: "jzero admin",
18+
text: "jzero Admin",
1519
icon: "icon-park-outline:system"
1620
},
1721
]);

docs/src/.vuepress/navbar/zh.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { navbar } from "vuepress-theme-hope";
33

44
// @ts-ignore
55
export const zhNavbar = navbar([
6-
"/",
76
{
87
link: "https://docs.jzero.io/blog/",
98
text: "博客",

docs/src/.vuepress/sidebar.ts

Lines changed: 0 additions & 64 deletions
This file was deleted.

docs/src/.vuepress/sidebar/en.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// @ts-ignore
2+
import { sidebar } from "vuepress-theme-hope";
3+
4+
export const enSidebarConfig = sidebar({
5+
"/": [
6+
"",
7+
{
8+
text: "Quick Start",
9+
icon: "streamline-sharp-color:startup",
10+
prefix: "getting-started/",
11+
children: "structure",
12+
collapsible: true,
13+
expanded: true,
14+
},
15+
{
16+
text: "Guide",
17+
icon: "icon-park-twotone:guide-board",
18+
prefix: "guide/",
19+
children: "structure",
20+
collapsible: true,
21+
expanded: true,
22+
},
23+
{
24+
text: "Components",
25+
icon: "iconamoon:component-bold",
26+
prefix: "component/",
27+
children: "structure",
28+
collapsible: true,
29+
expanded: true,
30+
},
31+
{
32+
text: "Ecosystem",
33+
icon: "material-icon-theme:pm2-ecosystem",
34+
prefix: "ecosystem/",
35+
children: "structure",
36+
collapsible: true,
37+
expanded: true,
38+
},
39+
{
40+
text: "Community",
41+
icon: "iconoir:community",
42+
prefix: "community/",
43+
children: "structure",
44+
collapsible: true,
45+
expanded: true,
46+
},
47+
{
48+
text: "Release Notes",
49+
icon: "catppuccin:release",
50+
prefix: "release/",
51+
children: "structure",
52+
collapsible: true,
53+
expanded: true,
54+
},
55+
{
56+
text: "Blog",
57+
icon: "fluent-mdl2:blog",
58+
prefix: "blog/",
59+
children: "structure",
60+
collapsible: true,
61+
expanded: false,
62+
},
63+
]
64+
});
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./en.js";
2+
export * from "./zh.js";

docs/src/.vuepress/sidebar/zh.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// @ts-ignore
2+
import { sidebar } from "vuepress-theme-hope";
3+
4+
export const zhSidebarConfig = sidebar({
5+
"/zh-CN/": [
6+
"",
7+
{
8+
text: "快速开始",
9+
icon: "streamline-sharp-color:startup",
10+
prefix: "getting-started/",
11+
children: "structure",
12+
collapsible: true,
13+
expanded: true,
14+
},
15+
{
16+
text: "指南",
17+
icon: "icon-park-twotone:guide-board",
18+
prefix: "guide/",
19+
children: "structure",
20+
collapsible: true,
21+
expanded: true,
22+
},
23+
{
24+
text: "组件",
25+
icon: "iconamoon:component-bold",
26+
prefix: "component/",
27+
children: "structure",
28+
collapsible: true,
29+
expanded: true,
30+
},
31+
{
32+
text: "生态系统",
33+
icon: "material-icon-theme:pm2-ecosystem",
34+
prefix: "ecosystem/",
35+
children: "structure",
36+
collapsible: true,
37+
expanded: true,
38+
},
39+
{
40+
text: "社区",
41+
icon: "iconoir:community",
42+
prefix: "community/",
43+
children: "structure",
44+
collapsible: true,
45+
expanded: true,
46+
},
47+
{
48+
text: "发布说明",
49+
icon: "catppuccin:release",
50+
prefix: "release/",
51+
children: "structure",
52+
collapsible: true,
53+
expanded: true,
54+
},
55+
{
56+
text: "博客",
57+
icon: "fluent-mdl2:blog",
58+
prefix: "blog/",
59+
children: "structure",
60+
collapsible: true,
61+
expanded: false,
62+
},
63+
]
64+
});

docs/src/.vuepress/theme.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-ignore
22
import { hopeTheme } from "vuepress-theme-hope";
33
import { enNavbar, zhNavbar } from "./navbar/index.js";
4-
import sidebar from "./sidebar.js";
4+
import { enSidebarConfig, zhSidebarConfig } from "./sidebar/index.js";
55

66
// @ts-ignore
77
export default hopeTheme({
@@ -27,10 +27,10 @@ export default hopeTheme({
2727
locales: {
2828
"/": {
2929
// 导航栏
30-
navbar: zhNavbar,
30+
navbar: enNavbar,
3131

3232
// 侧边栏
33-
sidebar,
33+
sidebar: enSidebarConfig,
3434

3535
// 页脚
3636
footer: "",
@@ -41,9 +41,11 @@ export default hopeTheme({
4141
editLink: "在 GitHub 上编辑此页",
4242
},
4343
},
44-
"/en/": {
44+
"/zh-CN/": {
4545
// 导航栏
46-
navbar: enNavbar,
46+
navbar: zhNavbar,
47+
48+
sidebar: zhSidebarConfig,
4749

4850
// Page meta
4951
metaLocales: {

docs/src/README.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,68 @@
11
---
22
home: false
33
icon: fluent:home-heart-20-filled
4-
title: 首页
4+
title: Home
55
---
66

77
<div style="text-align: center;">
88
<img src="https://oss.jaronnie.com/jzero.svg" style="width: 33%;" alt=""/>
99
</div>
1010

11-
## 简介
11+
## Introduction
1212

13-
基于 [go-zero框架](https://github.com/zeromicro/go-zero) 以及 [go-zero/goctl工具](https://github.com/zeromicro/go-zero/tree/master/tools/goctl) 开发的 [jzero](https://github.com/jzero-io/jzero) 框架, 可一键初始化 api/gateway/rpc 项目。
13+
**jzero** is a framework developed based on the [go-zero framework](https://github.com/zeromicro/go-zero) and [go-zero/goctl tools](https://github.com/zeromicro/go-zero/tree/master/tools/goctl). It enables one-click initialization of api/gateway/rpc projects.
1414

15-
基于可描述文件(**api/proto/sql**)自动生成**服务端和客户端**框架代码, 基于内置的 jzero-skillsAI 生成符合最佳实践的业务逻辑代码,降低开发心智, 解放双手!
15+
Based on describable files (**api/proto/sql**), it automatically generates **server-side and client-side** framework code. Combined with built-in jzero-skills, it empowers AI to generate business logic code that follows best practices, reducing development cognitive load and freeing your hands!
1616

17-
具备以下特点:
17+
Key features include:
1818

19-
* 支持通过**配置文件/命令行参数/环境变量**组合的方式灵活控制 jzero 的各项配置, 极简指令生成代码, ai 友好
20-
* 支持基于 **git 对改动文件**生成代码, 支持对**指定描述文件**生成代码或**忽略指定描述文件**生成代码, 提升大型项目代码生成效率
21-
* 内置常用开发模板并增强模板特性, 支持**自定义模板**, 构建专属企业内部代码模板, 极大降低开发成本
22-
* 支持**插件化架构**, 功能模块可作为独立插件动态加载, 支持插件创建、编译和卸载, 完美适配团队协作和模块解耦
19+
* Supports flexible control of jzero configurations through combinations of **configuration files/command-line parameters/environment variables**, with minimal commands to generate code, AI-friendly
20+
* Supports generating code based on **git-changed files** or specific descriptor files, or ignoring specific descriptor files, improving code generation efficiency for large projects
21+
* Built-in common development templates with enhanced template features, supports **custom templates** to build proprietary enterprise code templates, significantly reducing development costs
22+
* Supports **plugin architecture**, where functional modules can be dynamically loaded as independent plugins, supporting plugin creation, compilation, and uninstallation, perfectly adapted for team collaboration and module decoupling
2323

24-
更多详情请参阅:[https://docs.jzero.io](https://docs.jzero.io)
24+
For more details, please visit: [https://docs.jzero.io](https://docs.jzero.io)
2525

26-
## 设计理念
26+
## Design Philosophy
2727

28-
* **开发体验**: 提供简单好用的一站式生产可用的解决方案, 提升开发体验感
29-
* **模板驱动**: 所有代码生成均基于模板渲染, 默认生成即最佳实践, 且支持自定义模板内容
30-
* **生态兼容**: 不修改 go-zero go-zero/goctl, 保持生态兼容, 同时解决已有的痛点问题并扩展新的功能
31-
* **团队开发**: 通过模块**分层**, **插件**设计, 团队开发友好
32-
* **接口设计**: 不依赖特定数据库/缓存/配置中心等基础设施, 根据实际需求自由选择
28+
* **Developer Experience**: Provides a simple, easy-to-use, one-stop production-ready solution that enhances the development experience
29+
* **Template-Driven**: All code generation is based on template rendering, with default generation following best practices, and supports custom template content
30+
* **Ecosystem Compatibility**: Does not modify go-zero and go-zero/goctl, maintains ecosystem compatibility while addressing existing pain points and extending new features
31+
* **Team Development**: Through module **layering** and **plugin** design, it's friendly to team development
32+
* **Interface Design**: Does not depend on specific databases/cache/config centers and other infrastructure, allowing free choice based on actual needs
3333

34-
## 快速开始
34+
## Quick Start
3535

3636
::: code-tabs#shell
3737
@tab jzero cli
3838

3939
```bash
40-
# 安装 jzero
40+
# Install jzero
4141
go install github.com/jzero-io/jzero/cmd/jzero@latest
42-
# 一键安装所需的工具
42+
# One-click install required tools
4343
jzero check
44-
# 一键创建项目
44+
# One-click create project
4545
jzero new your_project
4646
cd your_project
47-
# 下载依赖
47+
# Download dependencies
4848
go mod tidy
49-
# 启动服务端程序
49+
# Start server
5050
go run main.go server
51-
# 访问 swagger ui
51+
# Visit swagger ui
5252
http://localhost:8001/swagger
5353
```
5454

5555
@tab jzero Docker
5656

5757
```bash
58-
# 一键创建项目
58+
# One-click create project
5959
docker run --rm -v ${PWD}:/app ghcr.io/jzero-io/jzero:latest new your_project
6060
cd your_project
61-
# 下载依赖
61+
# Download dependencies
6262
go mod tidy
63-
# 启动服务端程序
63+
# Start server
6464
go run main.go server
65-
# 访问 swagger ui
65+
# Visit swagger ui
6666
http://localhost:8001/swagger
6767
```
6868
:::
69-
70-
71-

0 commit comments

Comments
 (0)