Skip to content

Commit ad3cabe

Browse files
Revert "Revert "feat: add Simplified Chinese (zh) translations for docs product"" (#5314)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent b44ac97 commit ad3cabe

1,815 files changed

Lines changed: 61905 additions & 6 deletions

File tree

Some content is hidden

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

.github/workflows/preview-docs.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ jobs:
3030
id: generate-docs
3131
env:
3232
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
33-
HEAD_REF: ${{ github.head_ref }}
3433
run: |
35-
OUTPUT=$(fern generate --docs --preview --id "$HEAD_REF" --instance fern-api.docs.buildwithfern.com/learn 2>&1) || true
34+
# Omit --id so each run gets a fresh preview hash. Pinning the id to the
35+
# branch name makes the CLI reuse the same preview deploy across pushes,
36+
# which masks staleness when reviewers re-test after a force-push or a
37+
# CDN cache pin to old content. A throwaway preview per push is cheap
38+
# and lines up 1:1 with the comment posted by this workflow.
39+
OUTPUT=$(fern generate --docs --preview --instance fern-api.docs.buildwithfern.com/learn 2>&1) || true
3640
echo "$OUTPUT"
3741
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
3842
echo "preview_url=$URL" >> $GITHUB_OUTPUT
@@ -80,5 +84,4 @@ jobs:
8084
uses: thollander/actions-comment-pull-request@v2.4.3
8185
with:
8286
filePath: comment.md
83-
comment_tag: preview-docs
84-
mode: upsert
87+
mode: create

fern/docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ instances:
1010

1111
title: Fern Documentation
1212

13+
translations:
14+
- lang: en
15+
default: true
16+
- lang: zh
17+
1318
ai-search:
1419
location:
1520
- docs

fern/fern.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"organization": "fern",
3-
"version": "4.62.3"
3+
"version": "5.7.5"
44
}

fern/products/cli-api-reference/cli-changelog/2026-05-01.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec.
3737

3838

3939
## 5.6.1
40-
**`(fix):`** Fix translated docs pages failing to resolve shared snippets (`<Markdown src="..."/>` and `<Code src="..."/>`).
40+
**`(fix):`** Fix translated docs pages failing to resolve shared snippets (Markdown and Code `src` includes).
4141
Snippet references are now resolved before registering translations, with locale-aware loading that prefers
4242
translated snippets (e.g., `translations/zh/snippets/foo.mdx`) when available.
4343

fern/translations/zh/fern/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
products:
2+
- display-name: 首页
3+
path: ./products/home/home.yml
4+
subtitle: 提升开发者体验的产品
5+
6+
- slug: sdks
7+
display-name: SDK
8+
path: ./products/sdks/sdks.yml
9+
subtitle: 生成多种语言的客户端库
10+
11+
- slug: docs
12+
display-name: 文档
13+
path: ./products/docs/docs.yml
14+
subtitle: 生成精美的交互式文档网站
15+
16+
- slug: dashboard
17+
display-name: 仪表板
18+
path: ./products/dashboard/dashboard.yml
19+
subtitle: 管理您的 Fern 项目和设置
20+
21+
- slug: cli-api-reference
22+
display-name: CLI 参考
23+
path: ./products/cli-api-reference/cli-api-reference.yml
24+
subtitle: 管理和配置您的 Fern 项目
25+
26+
- slug: api-definitions
27+
display-name: API 定义
28+
path: ./products/api-def/api-def.yml
29+
subtitle: 导入和配置您的 API 规范
30+
31+
- display-name: OpenAPI
32+
subtitle: 定义 REST 和 webhook API
33+
34+
- display-name: AsyncAPI
35+
subtitle: 定义事件驱动和 WebSocket API
36+
37+
- display-name: OpenRPC
38+
subtitle: 定义 JSON-RPC API
39+
40+
- display-name: gRPC
41+
subtitle: 使用 Protocol Buffers 定义 API
42+
43+
- display-name: Fern 定义
44+
subtitle: 使用 Fern 的 YAML 格式定义 API
45+
46+
navbar-links:
47+
- type: minimal
48+
text: 预约演示
49+
url: https://buildwithfern.com/book-demo?utm_source=fern-docs
50+
- type: secondary
51+
text: 登录
52+
url: https://dashboard.buildwithfern.com/login?utm_source=fern-docs
53+
- type: filled
54+
text: 免费开始
55+
url: https://dashboard.buildwithfern.com/sign-up?redirect_on_login=%2Fget-started&utm_source=fern-docs
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
navigation:
2+
- section: 概览
3+
contents:
4+
- page: 什么是 API 定义?
5+
- page: 项目结构
6+
- section: OpenAPI
7+
slug: openapi
8+
contents:
9+
- page: 概览
10+
- page: 覆盖层(Overlays)
11+
- page: 覆盖(Overrides)
12+
- page: 身份验证
13+
- page: 服务器
14+
- page: 同步您的规范
15+
slug: sync-your-open-api-specification
16+
- section: 端点
17+
slug: endpoints
18+
contents:
19+
- page: HTTP JSON 端点
20+
slug: http
21+
- page: Webhooks
22+
- page: 多部分表单上传
23+
slug: multipart
24+
- page: 服务器发送事件
25+
slug: sse
26+
- section: 扩展
27+
slug: extensions
28+
contents:
29+
- page: 概览
30+
- page: API 版本
31+
- page: 受众
32+
- page: 可用性
33+
- page: 基础路径
34+
- page: 默认值
35+
- page: 枚举描述、名称和可用性
36+
slug: enum-descriptions-and-names
37+
- page: 请求与响应示例
38+
- page: API Explorer 控制
39+
- page: 全局请求头
40+
- page: 忽略元素
41+
- page: SDK 方法名称
42+
slug: method-names
43+
- page: SDK 变量
44+
- page: 标签显示名称
45+
- page: 参数名称
46+
- page: 属性名称
47+
- page: 幂等性
48+
- page: 分页
49+
- page: 重试行为
50+
- page: Schema 名称
51+
- page: 服务器名称和 URL 模板化
52+
- section: 集成您的服务器框架
53+
slug: frameworks
54+
contents:
55+
- page: FastAPI
56+
slug: fastapi
57+
- page: generators.yml 参考
58+
- section: AsyncAPI
59+
slug: asyncapi
60+
contents:
61+
- page: 概览
62+
- page: 覆盖(Overrides)
63+
- page: 身份验证
64+
- page: 服务器
65+
- page: 同步您的规范
66+
slug: sync-your-async-api-specification
67+
- section: 通道
68+
slug: channels
69+
contents:
70+
- page: 发布/订阅操作
71+
slug: pubsub
72+
- page: 消息格式
73+
slug: messages
74+
- page: 消息绑定
75+
slug: bindings
76+
- section: 扩展
77+
slug: extensions
78+
contents:
79+
- page: 概览
80+
- page: 受众
81+
- page: 可用性
82+
- page: 请求与响应示例
83+
- page: 忽略元素
84+
- page: 服务器名称
85+
- section: OpenRPC
86+
slug: openrpc
87+
contents:
88+
- page: 概览
89+
- page: 覆盖(Overrides)
90+
- page: 身份验证
91+
- page: 服务器
92+
- page: 同步您的规范
93+
slug: sync-your-open-rpc-specification
94+
- section: 方法
95+
slug: methods
96+
contents:
97+
- page: JSON-RPC 方法
98+
slug: rpc-methods
99+
- section: 扩展
100+
slug: extensions
101+
contents:
102+
- page: 概览
103+
- page: 受众
104+
- page: 可用性
105+
- page: 请求与响应示例
106+
- page: 忽略元素
107+
- page: SDK 方法名称
108+
slug: method-names
109+
- page: SDK 组名称
110+
- page: 服务器名称
111+
- section: gRPC
112+
slug: grpc
113+
contents:
114+
- page: 概览
115+
- page: 覆盖(Overrides)
116+
- page: 身份验证
117+
- page: 服务器
118+
- page: 同步您的规范
119+
slug: sync-your-g-rpc-specification
120+
- section: 服务
121+
slug: services
122+
contents:
123+
- page: gRPC 服务
124+
slug: grpc-services
125+
- page: 流式传输
126+
slug: streaming
127+
- page: 错误处理
128+
slug: errors
129+
- page: generators.yml 参考
130+
- section: Fern 定义
131+
slug: ferndef
132+
contents:
133+
- page: 概览
134+
- page: 身份验证
135+
- page: 类型
136+
- section: 端点
137+
contents:
138+
- page: 概览
139+
- page: HTTP JSON 端点
140+
slug: http
141+
- page: 多部分表单上传
142+
slug: multipart
143+
- page: 字节
144+
slug: bytes
145+
- page: 服务器发送事件
146+
slug: sse
147+
- section: 高级
148+
contents:
149+
- page: Webhooks
150+
- page: WebSockets
151+
slug: websockets
152+
- page: 错误
153+
- page: 导入
154+
- page: 示例
155+
- page: 受众
156+
- page: 可用性
157+
- section: api.yml 参考
158+
slug: api-yml
159+
contents:
160+
- page: 概览
161+
- page: 环境
162+
- page: 全局请求头
163+
- page: 错误
164+
- section: 集成
165+
contents:
166+
- page:
167+
- page: 依赖其他 API
168+
- page: 导出到 OpenAPI
169+
slug: export-openapi
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
navigation:
2+
- section: CLI 参考
3+
contents:
4+
- page: 开始使用 Fern CLI
5+
slug: overview
6+
- page: 全局选项
7+
slug: options
8+
- page: 命令
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
navigation:
2+
- section: 入门
3+
contents:
4+
- page: 概览
5+
- section: 配置
6+
contents:
7+
- page: 成员权限
8+
slug: permissions
9+
- page: 连接 GitHub 仓库
10+
slug: github-repo
11+
- page: 设置 SSO
12+
slug: sso
13+
- page: 密码保护
14+
- page: 自定义域名
15+
- page: PDF 导出

0 commit comments

Comments
 (0)