feat(zh): add Chinese translations in zh/ directory

Add Chinese (Simplified) translations for all documentation, organized
under a dedicated zh/ directory that mirrors the English folder structure.

Co-authored-by: tanqingkuang <tanqingkuang@users.noreply.github.com>

Translations originally contributed by @tanqingkuang in #45.
Restructured from *-CN.md suffix pattern into zh/ directory to prevent
the EPUB builder (scripts/build_epub.py collect_folder_files) from
picking up Chinese files via glob("*.md") inside module folders.
This commit is contained in:
Luong NGUYEN
2026-04-06 23:08:54 +02:00
committed by GitHub
parent 100c45eef2
commit 89e89d4aa3
100 changed files with 20487 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
# ADR [编号][标题]
## 状态
[提议中 | 已接受 | 已弃用 | 已被替代]
## 背景
我们正在看到的是什么问题,促使我们做出这个决策或变更?
## 决策
我们提出和/或正在执行的变更是什么?
## 影响
由于这项变更,哪些事情变得更容易或更困难?
### 正面影响
- 收益 1
- 收益 2
### 负面影响
- 代价 1
- 代价 2
### 中性影响
- 参考事项 1
- 参考事项 2
## 备选方案
还考虑过哪些其他选项,以及为什么没有选择它们?
### 备选方案 1
描述以及未选择的原因。
### 备选方案 2
描述以及未选择的原因。
## 参考资料
- 相关 ADR
- 外部文档
- 讨论链接

View File

@@ -0,0 +1,101 @@
# [方法] /api/v1/[endpoint]
## 描述
简要说明这个端点的作用。
## 身份验证
所需的身份验证方式,例如 Bearer token。
## 参数
### 路径参数
| 名称 | 类型 | 必填 | 描述 |
|------|------|------|------|
| id | string | 是 | 资源 ID |
### 查询参数
| 名称 | 类型 | 必填 | 描述 |
|------|------|------|------|
| page | integer | 否 | 页码默认1 |
| limit | integer | 否 | 每页条数默认20 |
### 请求体
```json
{
"field": "value"
}
```
## 响应
### 200 OK
```json
{
"success": true,
"data": {
"id": "123",
"name": "示例"
}
}
```
### 400 Bad Request
```json
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "无效输入"
}
}
```
### 404 Not Found
```json
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "资源未找到"
}
}
```
## 示例
### cURL
```bash
curl -X GET "https://api.example.com/api/v1/endpoint" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
```
### JavaScript
```javascript
const response = await fetch('/api/v1/endpoint', {
headers: {
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
}
});
const data = await response.json();
```
### Python
```python
import requests
response = requests.get(
'https://api.example.com/api/v1/endpoint',
headers={'Authorization': 'Bearer token'}
)
data = response.json()
```
## 限流
- 已认证用户每小时 1000 次请求
- 公开端点每小时 100 次请求
## 相关端点
- [GET /api/v1/related](#)
- [POST /api/v1/related](#)

View File

@@ -0,0 +1,50 @@
# 函数:`functionName`
## 描述
简要说明这个函数的作用。
## 签名
```typescript
function functionName(param1: Type1, param2: Type2): ReturnType
```
## 参数
| 参数 | 类型 | 必填 | 描述 |
|------|------|------|------|
| param1 | Type1 | 是 | param1 的说明 |
| param2 | Type2 | 否 | param2 的说明 |
## 返回值
**类型**`ReturnType`
返回内容的说明。
## 抛出异常
- `Error`:在输入无效时抛出
- `TypeError`:在传入错误类型时抛出
## 示例
### 基本用法
```typescript
const result = functionName('value1', 'value2');
console.log(result);
```
### 高级用法
```typescript
const result = functionName(
complexParam1,
{ option: true }
);
```
## 备注
- 其他说明或警告
- 性能注意事项
- 最佳实践
## 另请参阅
- [相关函数](#)
- [API 文档](#)