Skip to content

Commit a56e36f

Browse files
authored
Merge pull request #43079 from windsonsea/readmey
[zh] Sync README-zh.md
2 parents 2bf7b9f + dc3ca21 commit a56e36f

File tree

1 file changed

+54
-25
lines changed

1 file changed

+54
-25
lines changed

README-zh.md

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ This repository contains the assets required to build the [Kubernetes website an
1414

1515
<!--
1616
- [Contributing to the docs](#contributing-to-the-docs)
17-
- [Localization ReadMes](#localization-readmemds)
17+
- [Localization READMEs](#localization-readmemds)
1818
-->
1919
- [为文档做贡献](#为文档做贡献)
20-
- [README.md 本地化](#readmemd-本地化)
20+
- [README 本地化](#readme-本地化)
2121

2222
<!--
2323
## Using this repository
@@ -26,7 +26,8 @@ You can run the website locally using [Hugo (Extended version)](https://gohugo.i
2626
-->
2727
## 使用这个仓库
2828

29-
可以使用 [Hugo(扩展版)](https://gohugo.io/)在本地运行网站,也可以在容器中运行它。强烈建议使用容器,因为这样可以和在线网站的部署保持一致。
29+
可以使用 [Hugo(扩展版)](https://gohugo.io/)在本地运行网站,也可以在容器中运行它。
30+
强烈建议使用容器,因为这样可以和在线网站的部署保持一致。
3031

3132
<!--
3233
## Prerequisites
@@ -71,10 +72,11 @@ git submodule update --init --recursive --depth 1
7172
```
7273
-->
7374
### Windows
75+
7476
```powershell
7577
# 获取子模块依赖
7678
git submodule update --init --recursive --depth 1
77-
```
79+
```
7880

7981
<!--
8082
### Linux / other Unix
@@ -84,10 +86,11 @@ make module-init
8486
```
8587
-->
8688
### Linux / 其它 Unix
89+
8790
```bash
8891
# 获取子模块依赖
8992
make module-init
90-
```
93+
```
9194

9295
<!--
9396
## Running the website using a container
@@ -98,17 +101,23 @@ To build the site in a container, run the following:
98101

99102
要在容器中构建网站,请运行以下命令:
100103

104+
<!--
105+
```bash
106+
# You can set $CONTAINER_ENGINE to the name of any Docker-like container tool
107+
make container-serve
108+
```
109+
-->
101110
```bash
102111
# 你可以将 $CONTAINER_ENGINE 设置为任何 Docker 类容器工具的名称
103112
make container-serve
104113
```
105114

106115
<!--
107-
If you see errors, it probably means that the hugo container did not have enough computing resources available. To solve it, increase the amount of allowed CPU and memory usage for Docker on your machine ([MacOSX](https://docs.docker.com/docker-for-mac/#resources) and [Windows](https://docs.docker.com/docker-for-windows/#resources)).
116+
If you see errors, it probably means that the hugo container did not have enough computing resources available. To solve it, increase the amount of allowed CPU and memory usage for Docker on your machine ([MacOS](https://docs.docker.com/desktop/settings/mac/) and [Windows](https://docs.docker.com/desktop/settings/windows/)).
108117
-->
109118
如果你看到错误,这可能意味着 Hugo 容器没有足够的可用计算资源。
110-
要解决这个问题,请增加机器([MacOSX](https://docs.docker.com/docker-for-mac/#resources)
111-
[Windows](https://docs.docker.com/docker-for-windows/#resources))上
119+
要解决这个问题,请增加机器([MacOS](https://docs.docker.com/desktop/settings/mac/)
120+
[Windows](https://docs.docker.com/desktop/settings/windows/))上
112121
Docker 允许的 CPU 和内存使用量。
113122

114123
<!--
@@ -122,20 +131,34 @@ Open up your browser to <http://localhost:1313> to view the website. As you make
122131
123132
Make sure to install the Hugo extended version specified by the `HUGO_VERSION` environment variable in the [`netlify.toml`](netlify.toml#L11) file.
124133
125-
To build and test the site locally, run:
134+
To install dependencies, deploy and test the site locally, run:
126135
-->
127136
## 在本地使用 Hugo 来运行网站
128137

129138
请确保安装的是 [`netlify.toml`](netlify.toml#L11) 文件中环境变量 `HUGO_VERSION` 所指定的
130139
Hugo Extended 版本。
131140

132-
若要在本地构造和测试网站,请运行
141+
若要在本地安装依赖,构建和测试网站,运行以下命令
133142

134-
```bash
135-
# 安装依赖
136-
npm ci
137-
make serve
138-
```
143+
<!--
144+
- For macOS and Linux
145+
-->
146+
- 对于 macOS 和 Linux
147+
148+
```bash
149+
npm ci
150+
make serve
151+
```
152+
153+
<!--
154+
- For Windows (PowerShell)
155+
-->
156+
- 对于 Windows (PowerShell)
157+
158+
```powershell
159+
npm ci
160+
hugo.exe server --buildFuture --environment development
161+
```
139162

140163
<!--
141164
This will start the local Hugo server on port 1313. Open up your browser to <http://localhost:1313> to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
@@ -154,7 +177,9 @@ The API reference pages located in `content/en/docs/reference/kubernetes-api` ar
154177
155178
To update the reference pages for a new Kubernetes release follow these steps:
156179
-->
157-
位于 `content/en/docs/reference/kubernetes-api` 的 API 参考页面是使用 <https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs> 根据 Swagger 规范(也称为 OpenAPI 规范)构建的。
180+
位于 `content/en/docs/reference/kubernetes-api` 的 API 参考页面是使用
181+
<https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs>
182+
根据 Swagger 规范(也称为 OpenAPI 规范)构建的。
158183

159184
要更新 Kubernetes 新版本的参考页面,请执行以下步骤:
160185

@@ -193,7 +218,7 @@ To update the reference pages for a new Kubernetes release follow these steps:
193218
<!--
194219
You can test the results locally by making and serving the site from a container image:
195220
-->
196-
你可以通过从容器映像创建和提供站点来在本地测试结果
221+
你可以通过从容器镜像创建和提供站点来在本地测试结果
197222

198223
```bash
199224
make container-image
@@ -203,12 +228,13 @@ To update the reference pages for a new Kubernetes release follow these steps:
203228
<!--
204229
In a web browser, go to <http://localhost:1313/docs/reference/kubernetes-api/> to view the API reference.
205230
-->
206-
在 Web 浏览器中,打开 <http://localhost:1313/docs/reference/kubernetes-api/> 查看 API 参考
231+
在 Web 浏览器中,打开 <http://localhost:1313/docs/reference/kubernetes-api/> 查看 API 参考页面
207232

208233
<!--
209234
5. When all changes of the new contract are reflected into the configuration files `toc.yaml` and `fields.yaml`, create a Pull Request with the newly generated API reference pages.
210235
-->
211-
5. 当所有新的更改都反映到配置文件 `toc.yaml``fields.yaml` 中时,使用新生成的 API 参考页面创建一个 Pull Request。
236+
5. 当所有新的更改都反映到配置文件 `toc.yaml``fields.yaml` 中时,使用新生成的 API
237+
参考页面创建一个 Pull Request。
212238

213239
<!--
214240
## Troubleshooting
@@ -252,10 +278,13 @@ Then run the following commands (adapted from <https://gist.github.com/tombigel/
252278
-->
253279
然后运行以下命令(参考 <https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c>):
254280

281+
<!--
282+
# These are the original gist links, linking to my gists now.
283+
-->
255284
```shell
256285
#!/bin/sh
257286

258-
# 这些是原始的 gist 链接,立即链接到我的 gist
287+
# 这些是原始的 gist 链接,立即链接到我的 gist
259288
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
260289
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist
261290

@@ -319,7 +348,7 @@ ARG HUGO_VERSION
319348

320349
将 "https://proxy.golang.org" 替换为本地可以使用的代理地址。
321350

322-
**注意:** 此部分仅适用于中国大陆
351+
**注意:** 此部分仅适用于中国大陆
323352

324353
<!--
325354
## Get involved with SIG Docs
@@ -404,14 +433,14 @@ SIG Docs 的当前新贡献者大使:
404433
| -------------------------- | -------------------------- | -------------------------- |
405434
| Arsh Sharma | @arsh | @RinkiyaKeDad |
406435
-->
407-
| 姓名 | Slack | GitHub |
436+
| 姓名 | Slack | GitHub |
408437
| -------------------------- | -------------------------- | -------------------------- |
409438
| Arsh Sharma | @arsh | @RinkiyaKeDad |
410439

411440
<!--
412-
## Localization `README.md`'s
441+
## Localization READMEs
413442
-->
414-
## `README.md` 本地化
443+
## README 本地化
415444

416445
<!--
417446
| Language | Language |
@@ -434,7 +463,7 @@ SIG Docs 的当前新贡献者大使:
434463
| [意大利语](README-it.md) | [乌克兰语](README-uk.md) |
435464
| [日语](README-ja.md) | [越南语](README-vi.md) |
436465

437-
# 中文本地化
466+
## 中文本地化
438467

439468
可以通过以下方式联系中文本地化的维护人员:
440469

0 commit comments

Comments
 (0)