Skip to content

Commit dab4e5d

Browse files
authored
Merge pull request #33757 from Sea-n/zh-readme
[zh] Sync README.md with upstream
2 parents 4bde3d5 + 48d4308 commit dab4e5d

File tree

1 file changed

+170
-30
lines changed

1 file changed

+170
-30
lines changed

README-zh.md

Lines changed: 170 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ This repository contains the assets required to build the [Kubernetes website an
1313
我们非常高兴您想要参与贡献!
1414

1515
<!--
16-
# Using this repository
16+
- [Contributing to the docs](#contributing-to-the-docs)
17+
- [Localization ReadMes](#localization-readmemds)
18+
-->
19+
- [为文档做贡献](#为文档做贡献)
20+
- [README.md 本地化](#readmemd-本地化)
21+
22+
<!--
23+
## Using this repository
1724
1825
You can run the website locally using Hugo (Extended version), or you can run it in a container runtime. We strongly recommend using the container runtime, as it gives deployment consistency with the live website.
1926
-->
@@ -46,7 +53,7 @@ Before you start, install the dependencies. Clone the repository and navigate to
4653
-->
4754
开始前,先安装这些依赖。克隆本仓库并进入对应目录:
4855

49-
```
56+
```bash
5057
git clone https://github.com/kubernetes/website.git
5158
cd website
5259
```
@@ -57,7 +64,7 @@ The Kubernetes website uses the [Docsy Hugo theme](https://github.com/google/doc
5764

5865
Kubernetes 网站使用的是 [Docsy Hugo 主题](https://github.com/google/docsy#readme)。 即使你打算在容器中运行网站,我们也强烈建议你通过运行以下命令来引入子模块和其他开发依赖项:
5966

60-
```
67+
```bash
6168
# pull in the Docsy submodule
6269
git submodule update --init --recursive --depth 1
6370
```
@@ -72,15 +79,23 @@ To build the site in a container, run the following to build the container image
7279

7380
要在容器中构建网站,请通过以下命令来构建容器镜像并运行:
7481

75-
```
82+
```bash
7683
make container-image
7784
make container-serve
7885
```
7986

8087
<!--
81-
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.
88+
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)).
8289
-->
83-
启动浏览器,打开 http://localhost:1313 来查看网站。
90+
如果您看到错误,这可能意味着 hugo 容器没有足够的可用计算资源。
91+
要解决这个问题,请增加机器([MacOSX](https://docs.docker.com/docker-for-mac/#resources)
92+
[Windows](https://docs.docker.com/docker-for-windows/#resources))上
93+
Docker 允许的 CPU 和内存使用量。
94+
95+
<!--
96+
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.
97+
-->
98+
启动浏览器,打开 <http://localhost:1313> 来查看网站。
8499
当你对源文件作出修改时,Hugo 会更新网站并强制浏览器执行刷新操作。
85100

86101
<!--
@@ -104,18 +119,84 @@ make serve
104119
```
105120

106121
<!--
107-
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.
122+
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.
108123
-->
109124
上述命令会在端口 1313 上启动本地 Hugo 服务器。
110-
启动浏览器,打开 http://localhost:1313 来查看网站。
125+
启动浏览器,打开 <http://localhost:1313> 来查看网站。
111126
当你对源文件作出修改时,Hugo 会更新网站并强制浏览器执行刷新操作。
112127

128+
<!--
129+
## Building the API reference pages
130+
-->
131+
## 构建 API 参考页面
132+
133+
<!--
134+
The API reference pages located in `content/en/docs/reference/kubernetes-api` are built from the Swagger specification, using <https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs>.
135+
136+
To update the reference pages for a new Kubernetes release follow these steps:
137+
-->
138+
位于 `content/en/docs/reference/kubernetes-api` 的 API 参考页面是根据 Swagger 规范构建的,使用 <https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs>
139+
140+
要更新新 Kubernetes 版本的参考页面,请执行以下步骤:
141+
142+
<!--
143+
1. Pull in the `api-ref-generator` submodule:
144+
-->
145+
1. 拉取 `api-ref-generator` 子模块:
146+
147+
```bash
148+
git submodule update --init --recursive --depth 1
149+
```
150+
151+
<!--
152+
2. Update the Swagger specification:
153+
-->
154+
2. 更新 Swagger 规范:
155+
156+
```bash
157+
curl 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json' > api-ref-assets/api/swagger.json
158+
```
159+
160+
<!--
161+
3. In `api-ref-assets/config/`, adapt the files `toc.yaml` and `fields.yaml` to reflect the changes of the new release.
162+
-->
163+
3.`api-ref-assets/config/` 中,调整文件 `toc.yaml``fields.yaml` 以反映新版本的变化。
164+
165+
<!--
166+
4. Next, build the pages:
167+
-->
168+
4. 接下来,构建页面:
169+
170+
```bash
171+
make api-reference
172+
```
173+
174+
<!--
175+
You can test the results locally by making and serving the site from a container image:
176+
-->
177+
您可以通过从容器映像创建和提供站点来在本地测试结果:
178+
179+
```bash
180+
make container-image
181+
make container-serve
182+
```
183+
184+
<!--
185+
In a web browser, go to <http://localhost:1313/docs/reference/kubernetes-api/> to view the API reference.
186+
-->
187+
在 Web 浏览器中,打开 <http://localhost:1313/docs/reference/kubernetes-api/> 查看 API 参考。
188+
189+
<!--
190+
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.
191+
-->
192+
5. 当所有新的更改都反映到配置文件 `toc.yaml``fields.yaml` 中时,使用新生成的 API 参考页面创建一个 Pull Request。
193+
113194
<!--
114195
## Troubleshooting
196+
115197
### error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
116198
117199
Hugo is shipped in two set of binaries for technical reasons. The current website runs based on the **Hugo Extended** version only. In the [release page](https://github.com/gohugoio/hugo/releases) look for archives with `extended` in the name. To confirm, run `hugo version` and look for the word `extended`.
118-
119200
-->
120201
## 故障排除
121202

@@ -135,18 +216,24 @@ If you run `make serve` on macOS and receive the following error:
135216

136217
如果在 macOS 上运行 `make serve` 收到以下错误:
137218

138-
```
219+
```bash
139220
ERROR 2020/08/01 19:09:18 Error: listen tcp 127.0.0.1:1313: socket: too many open files
140221
make: *** [serve] Error 1
141222
```
142223

224+
<!--
225+
Try checking the current limit for open files:
226+
-->
143227
试着查看一下当前打开文件数的限制:
144228

145229
`launchctl limit maxfiles`
146230

147-
然后运行以下命令(参考https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c):
231+
<!--
232+
Then run the following commands (adapted from <https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c>):
233+
-->
234+
然后运行以下命令(参考 <https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c>):
148235

149-
```
236+
```shell
150237
#!/bin/sh
151238

152239
# These are the original gist links, linking to my gists now.
@@ -165,6 +252,9 @@ sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist
165252
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
166253
```
167254

255+
<!--
256+
This works for Catalina as well as Mojave macOS.
257+
-->
168258
这适用于 Catalina 和 Mojave macOS。
169259

170260
<!--
@@ -174,7 +264,8 @@ Learn more about SIG Docs Kubernetes community and meetings on the [community pa
174264
175265
You can also reach the maintainers of this project at:
176266
177-
- [Slack](https://kubernetes.slack.com/messages/sig-docs) [Get an invite for this Slack](https://slack.k8s.io/)
267+
- [Slack](https://kubernetes.slack.com/messages/sig-docs)
268+
- [Get an invite for this Slack](https://slack.k8s.io/)
178269
- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-docs)
179270
-->
180271
# 参与 SIG Docs 工作
@@ -184,20 +275,21 @@ You can also reach the maintainers of this project at:
184275

185276
你也可以通过以下渠道联系本项目的维护人员:
186277

187-
- [Slack](https://kubernetes.slack.com/messages/sig-docs) [加入Slack](https://slack.k8s.io/)
278+
- [Slack](https://kubernetes.slack.com/messages/sig-docs)
279+
- [获得此 Slack 的邀请](https://slack.k8s.io/)
188280
- [邮件列表](https://groups.google.com/forum/#!forum/kubernetes-sig-docs)
189281

190282
<!--
191283
## Contributing to the docs
192284
193-
You can click the **Fork** button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called a *fork*. Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it.
285+
You can click the **Fork** button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called a _fork_. Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it.
194286
195-
Once your pull request is created, a Kubernetes reviewer will take responsibility for providing clear, actionable feedback. As the owner of the pull request, **it is your responsibility to modify your pull request to address the feedback that has been provided to you by the Kubernetes reviewer.**
287+
Once your pull request is created, a Kubernetes reviewer will take responsibility for providing clear, actionable feedback. As the owner of the pull request, **it is your responsibility to modify your pull request to address the feedback that has been provided to you by the Kubernetes reviewer.**
196288
-->
197289
# 为文档做贡献
198290

199291
你也可以点击屏幕右上方区域的 **Fork** 按钮,在你自己的 GitHub
200-
账号下创建本仓库的拷贝。此拷贝被称作 *fork*
292+
账号下创建本仓库的拷贝。此拷贝被称作 _fork_
201293
你可以在自己的拷贝中任意地修改文档,并在你已准备好将所作修改提交给我们时,
202294
在你自己的拷贝下创建一个拉取请求(Pull Request),以便让我们知道。
203295

@@ -208,7 +300,7 @@ Once your pull request is created, a Kubernetes reviewer will take responsibilit
208300
<!--
209301
Also, note that you may end up having more than one Kubernetes reviewer provide you feedback or you may end up getting feedback from a Kubernetes reviewer that is different than the one initially assigned to provide you feedback.
210302
211-
Furthermore, in some cases, one of your reviewers might ask for a technical review from a Kubernetes tech reviewer when needed. Reviewers will do their best to provide feedback in a timely fashion but response time can vary based on circumstances.
303+
Furthermore, in some cases, one of your reviewers might ask for a technical review from a Kubernetes tech reviewer when needed. Reviewers will do their best to provide feedback in a timely fashion but response time can vary based on circumstances.
212304
-->
213305
还要提醒的一点,有时可能会有不止一个 Kubernetes 评审人为你提供反馈意见。
214306
有时候,某个评审人的意见和另一个最初被指派的评审人的意见不同。
@@ -220,17 +312,65 @@ Furthermore, in some cases, one of your reviewers might ask for a technical revi
220312
<!--
221313
For more information about contributing to the Kubernetes documentation, see:
222314
223-
* [Contribute to Kubernetes docs](https://kubernetes.io/docs/contribute/)
224-
* [Page Content Types](https://kubernetes.io/docs/contribute/style/page-content-types/)
225-
* [Documentation Style Guide](https://kubernetes.io/docs/contribute/style/style-guide/)
226-
* [Localizing Kubernetes Documentation](https://kubernetes.io/docs/contribute/localization/)
315+
- [Contribute to Kubernetes docs](https://kubernetes.io/docs/contribute/)
316+
- [Page Content Types](https://kubernetes.io/docs/contribute/style/page-content-types/)
317+
- [Documentation Style Guide](https://kubernetes.io/docs/contribute/style/style-guide/)
318+
- [Localizing Kubernetes Documentation](https://kubernetes.io/docs/contribute/localization/)
227319
-->
228320
有关为 Kubernetes 文档做出贡献的更多信息,请参阅:
229321

230-
* [贡献 Kubernetes 文档](https://kubernetes.io/docs/contribute/)
231-
* [页面内容类型](https://kubernetes.io/docs/contribute/style/page-content-types/)
232-
* [文档风格指南](https://kubernetes.io/docs/contribute/style/style-guide/)
233-
* [本地化 Kubernetes 文档](https://kubernetes.io/docs/contribute/localization/)
322+
- [贡献 Kubernetes 文档](https://kubernetes.io/docs/contribute/)
323+
- [页面内容类型](https://kubernetes.io/docs/contribute/style/page-content-types/)
324+
- [文档风格指南](https://kubernetes.io/docs/contribute/style/style-guide/)
325+
- [本地化 Kubernetes 文档](https://kubernetes.io/docs/contribute/localization/)
326+
327+
<!--
328+
### New contributor ambassadors
329+
-->
330+
### 新贡献者大使
331+
332+
<!--
333+
If you need help at any point when contributing, the [New Contributor Ambassadors](https://kubernetes.io/docs/contribute/advanced/#serve-as-a-new-contributor-ambassador) are a good point of contact. These are SIG Docs approvers whose responsibilities include mentoring new contributors and helping them through their first few pull requests. The best place to contact the New Contributors Ambassadors would be on the [Kubernetes Slack](https://slack.k8s.io/). Current New Contributors Ambassadors for SIG Docs:
334+
-->
335+
如果您在贡献时需要帮助,[新贡献者大使](https://kubernetes.io/docs/contribute/advanced/#serve-as-a-new-contributor-ambassador)是一个很好的联系人。
336+
这些是 SIG Docs 批准者,其职责包括指导新贡献者并帮助他们完成最初的几个拉取请求。
337+
联系新贡献者大使的最佳地点是 [Kubernetes Slack](https://slack.k8s.io/)
338+
SIG Docs 的当前新贡献者大使:
339+
340+
<!--
341+
| Name | Slack | GitHub |
342+
| -------------------------- | -------------------------- | -------------------------- |
343+
| Arsh Sharma | @arsh | @RinkiyaKeDad |
344+
-->
345+
| 姓名 | Slack | GitHub |
346+
| -------------------------- | -------------------------- | -------------------------- |
347+
| Arsh Sharma | @arsh | @RinkiyaKeDad |
348+
349+
<!--
350+
## Localization `README.md`'s
351+
-->
352+
## `README.md` 本地化
353+
354+
<!--
355+
| Language | Language |
356+
| -------------------------- | -------------------------- |
357+
| [Chinese](README-zh.md) | [Korean](README-ko.md) |
358+
| [French](README-fr.md) | [Polish](README-pl.md) |
359+
| [German](README-de.md) | [Portuguese](README-pt.md) |
360+
| [Hindi](README-hi.md) | [Russian](README-ru.md) |
361+
| [Indonesian](README-id.md) | [Spanish](README-es.md) |
362+
| [Italian](README-it.md) | [Ukrainian](README-uk.md) |
363+
| [Japanese](README-ja.md) | [Vietnamese](README-vi.md) |
364+
-->
365+
| 语言 | 语言 |
366+
| -------------------------- | -------------------------- |
367+
| [中文](README-zh.md) | [韩语](README-ko.md) |
368+
| [法语](README-fr.md) | [波兰语](README-pl.md) |
369+
| [德语](README-de.md) | [葡萄牙语](README-pt.md) |
370+
| [印地语](README-hi.md) | [俄语](README-ru.md) |
371+
| [印尼语](README-id.md) | [西班牙语](README-es.md) |
372+
| [意大利语](README-it.md) | [乌克兰语](README-uk.md) |
373+
| [日语](README-ja.md) | [越南语](README-vi.md) |
234374

235375
# 中文本地化
236376

@@ -241,19 +381,19 @@ For more information about contributing to the Kubernetes documentation, see:
241381
* [Slack channel](https://kubernetes.slack.com/messages/kubernetes-docs-zh)
242382

243383
<!--
244-
### Code of conduct
384+
## Code of conduct
245385
246386
Participation in the Kubernetes community is governed by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
247387
-->
248-
# 行为准则
388+
## 行为准则
249389

250390
参与 Kubernetes 社区受 [CNCF 行为准则](https://github.com/cncf/foundation/blob/master/code-of-conduct.md) 约束。
251391

252392
<!--
253-
## Thank you!
393+
## Thank you
254394
255395
Kubernetes thrives on community participation, and we appreciate your contributions to our website and our documentation!
256396
-->
257-
# 感谢!
397+
## 感谢你
258398

259399
Kubernetes 因为社区的参与而蓬勃发展,感谢您对我们网站和文档的贡献!

0 commit comments

Comments
 (0)