[zh]sync contribution files for 1.22(Part-1)

This commit is contained in:
howieyuen
2021-08-19 20:50:01 +08:00
parent d12f42161e
commit 55c7993e9b
6 changed files with 39 additions and 38 deletions
@@ -101,7 +101,7 @@ Kubernetes 博客用于项目发布新功能特性、社区报告以及其他一
<!--
- Blog posts should be original content
- The official blog is not for repurposing existing content from a third party as new content.
- The [license](https://github.com/kubernetes/website/blob/master/LICENSE) for the blog allows commercial use of the content for commercial purposes, just not the other way around.
- The [license](https://github.com/kubernetes/website/blob/main/LICENSE) for the blog allows commercial use of the content for commercial purposes, just not the other way around.
- Blog posts should aim to be future proof
- Given the development velocity of the project, we want evergreen content that won't require updates to stay accurate for the reader.
- It can be a better choice to add a tutorial or update official documentation than to write a high level overview as a blog post.
@@ -109,7 +109,7 @@ Kubernetes 博客用于项目发布新功能特性、社区报告以及其他一
-->
- 博客文章应该是原创内容。
- 官方博客的目的不是将某第三方已发表的内容重新作为新内容发表。
- 博客的[授权协议](https://github.com/kubernetes/website/blob/master/LICENSE)
- 博客的[授权协议](https://github.com/kubernetes/website/blob/main/LICENSE)
的确允许出于商业目的来使用博客内容;但并不是所有可以商用的内容都适合在这里发表。
- 博客文章的内容应该在一段时间内不过期。
- 考虑到项目的开发速度,我们希望读者看到的是不必更新就能保持长期准确的内容。
@@ -144,7 +144,7 @@ SIG Docs [博客子项目](https://github.com/kubernetes/community/tree/master/s
要提交博文,你可以遵从以下指南:
<!--
- [Open a pull request](/docs/contribute/new-content/open-a-pr/#fork-the-repo) with a new blog post. New blog posts go under the [`content/en/blog/_posts`](https://github.com/kubernetes/website/tree/master/content/en/blog/_posts) directory.
- [Open a pull request](/docs/contribute/new-content/open-a-pr/#fork-the-repo) with a new blog post. New blog posts go under the [`content/en/blog/_posts`](https://github.com/kubernetes/website/tree/main/content/en/blog/_posts) directory.
- Ensure that your blog post follows the correct naming conventions and the following frontmatter (metadata) information:
@@ -153,7 +153,7 @@ SIG Docs [博客子项目](https://github.com/kubernetes/community/tree/master/s
- The front matter must include the following:
-->
- [发起一个包含博文的 PR](/zh/docs/contribute/new-content/open-a-pr/#fork-the-repo)。
新博文要创建于 [`content/en/blog/_posts`](https://github.com/kubernetes/website/tree/master/content/en/blog/_posts) 目录下。
新博文要创建于 [`content/en/blog/_posts`](https://github.com/kubernetes/website/tree/main/content/en/blog/_posts) 目录下。
- 确保你的博文遵从合适的命名规范,并带有下面的引言(元数据)信息:
@@ -205,7 +205,7 @@ Case studies highlight how organizations are using Kubernetes to solve
real-world problems. The Kubernetes marketing team and members of the {{< glossary_tooltip text="CNCF" term_id="cncf" >}} collaborate with you on all case studies.
Have a look at the source for the
[existing case studies](https://github.com/kubernetes/website/tree/master/content/en/case-studies).
[existing case studies](https://github.com/kubernetes/website/tree/main/content/en/case-studies).
Refer to the [case study guidelines](https://github.com/cncf/foundation/blob/master/case-study-guidelines.md) and submit your request as outlined in the guidelines.
-->
@@ -216,7 +216,7 @@ Kubernetes 市场化团队和 {{< glossary_tooltip text="CNCF" term_id="cncf" >}
会与你一起工作,撰写所有的案例分析。
请查看
[现有案例分析](https://github.com/kubernetes/website/tree/master/content/en/case-studies)
[现有案例分析](https://github.com/kubernetes/website/tree/main/content/en/case-studies)
的源码。
参考[案例分析指南](https://github.com/cncf/foundation/blob/master/case-study-guidelines.md)
@@ -222,9 +222,9 @@ Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installi
upstream https://github.com/kubernetes/website.git (push)
```
<!--
6. Fetch commits from your fork's `origin/master` and `kubernetes/website`'s `upstream/master`:
6. Fetch commits from your fork's `origin/master` and `kubernetes/website`'s `upstream/main`:
-->
6. 从你的克隆副本取回 `origin/master` 分支,从 `kubernetes/website` 取回 `upstream/master`
6. 从你的克隆副本取回 `origin/master` 分支,从 `kubernetes/website` 取回 `upstream/main`
```bash
git fetch origin
@@ -236,10 +236,11 @@ Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installi
这样可以确保你本地的仓库在开始工作前是最新的。
<!--
This workflow is different than the [Kubernetes Community GitHub Workflow](https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md). You do not need to merge your local copy of `master` with `upstream/master` before pushing updates to your fork.
This workflow is different than the [Kubernetes Community GitHub Workflow](https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md). You do not need to merge your local copy of `main` with `upstream/main` before pushing updates to your fork.
-->
{{< note >}}
此工作流程与 [Kubernetes 社区 GitHub 工作流](https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md)有所不同。在推送你的变更到你的远程派生副本库之前,你不需要将你本地的 `master` 与 `upstream/master` 合并。
此工作流程与 [Kubernetes 社区 GitHub 工作流](https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md)有所不同。
在推送你的变更到你的远程派生副本库之前,你不需要将你本地的 `main` 与 `upstream/main` 合并。
{{< /note >}}
<!--
@@ -247,8 +248,8 @@ Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installi
1. Decide which branch base to your work on:
- For improvements to existing content, use `upstream/master`.
- For new content about existing features, use `upstream/master`.
- For improvements to existing content, use `upstream/main`.
- For new content about existing features, use `upstream/main`.
- For localized content, use the localization's conventions. For more information, see [localizing Kubernetes documentation](/docs/contribute/localization/).
- For new features in an upcoming Kubernetes release, use the feature branch. For more information, see [documenting for a release](/docs/contribute/new-content/new-features/).
- For long-running efforts that multiple SIG Docs contributors collaborate on,
@@ -261,8 +262,8 @@ Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installi
1. 决定你要基于哪个分支来开展工作:
- 针对已有内容的改进,请使用 `upstream/master`
- 针对已有功能特性的新文档内容,请使用 `upstream/master`
- 针对已有内容的改进,请使用 `upstream/main`
- 针对已有功能特性的新文档内容,请使用 `upstream/main`
- 对于本地化内容,请基于本地化的约定。
可参考[对 Kubernetes 文档进行本地化](/zh/docs/contribute/localization/)了解详细信息。
- 对于在下一个 Kubernetes 版本中新功能特性的文档,使用独立的功能特性分支。
@@ -273,13 +274,13 @@ Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installi
如果你在选择分支上需要帮助,请在 `#sig-docs` Slack 频道提问。
<!--
2. Create a new branch based on the branch identified in step 1. This example assumes the base branch is `upstream/master`:
2. Create a new branch based on the branch identified in step 1. This example assumes the base branch is `upstream/main`:
-->
2. 基于第一步中选定的分支,创建新分支。
下面的例子假定基础分支是 `upstream/master`
下面的例子假定基础分支是 `upstream/main`
```bash
git checkout -b <my_new_branch> upstream/master
git checkout -b <my_new_branch> upstream/main
```
<!--
3. Make your changes using a text editor.
@@ -471,10 +472,10 @@ Alternately, install and use the `hugo` command on your computer:
另一种方式是,在你的本地计算机上安装并使用 `hugo` 命令:
<!--
1. Install the [Hugo](https://gohugo.io/getting-started/installing/) version specified in [`website/netlify.toml`](https://raw.githubusercontent.com/kubernetes/website/master/netlify.toml).
1. Install the [Hugo](https://gohugo.io/getting-started/installing/) version specified in [`website/netlify.toml`](https://raw.githubusercontent.com/kubernetes/website/main/netlify.toml).
2. In a terminal, go to your Kubernetes website repository and start the Hugo server:
-->
1. 安装 [`website/netlify.toml`](https://raw.githubusercontent.com/kubernetes/website/master/netlify.toml)
1. 安装 [`website/netlify.toml`](https://raw.githubusercontent.com/kubernetes/website/main/netlify.toml)
文件中指定的 [Hugo](https://gohugo.io/getting-started/installing/) 版本。
2. 启动一个终端窗口,进入 Kubernetes 网站仓库目录,启动 Hugo 服务器:
@@ -651,13 +652,13 @@ If another contributor commits changes to the same file in another PR, it can cr
git push --force-with-lease origin <your-branch-name>
```
<!--
2. Fetch changes from `kubernetes/website`'s `upstream/master` and rebase your branch:
2. Fetch changes from `kubernetes/website`'s `upstream/main` and rebase your branch:
-->
2. 从 `kubernetes/website` 的 `upstream/master` 分支取回更改,然后重设本地分支的基线:
2. 从 `kubernetes/website` 的 `upstream/main` 分支取回更改,然后重设本地分支的基线:
```bash
git fetch upstream
git rebase upstream/master
git rebase upstream/main
```
<!--
3. Inspect the results of the rebase:
@@ -74,7 +74,7 @@ When opening a pull request, you need to know in advance which branch to base yo
Scenario | Branch
:---------|:------------
Existing or new English language content for the current release | `master`
Existing or new English language content for the current release | `main`
Content for a feature change release | The branch which corresponds to the major and minor version the feature change is in, using the pattern `dev-release-<version>`. For example, if a feature changes in the `{{< latest-version >}}` release, then add documentation changes to the ``dev-{{< release-branch >}}`` branch.
Content in other languages (localizations) | Use the localization's convention. See the [Localization branching strategy](/docs/contribute/localization/#branching-strategy) for more information.
@@ -86,7 +86,7 @@ If you're still not sure which branch to choose, ask in `#sig-docs` on Slack.
场景 | 分支
:---------|:------------
针对当前发行版本的,对现有英文内容的修改或新的英文内容 | `master`
针对当前发行版本的,对现有英文内容的修改或新的英文内容 | `main`
针对功能特性变更的内容 | 功能特性所对应的版本所对应的分支,分支名字模式为 `dev-<version>`。例如,如果某功能特性在 `v{{< skew nextMinorVersion >}}` 版本发生变化,则对应的文档变化要添加到 ``dev-{{< skew nextMinorVersion >}}`` 分支。
其他语言的内容(本地化)| 基于本地化团队的约定。参见[本地化分支策略](/zh/docs/contribute/localization/#branching-strategy)了解更多信息。
@@ -111,12 +111,12 @@ Limit pull requests to one language per PR. If you need to make an identical cha
<!--
## Tools for contributors
The [doc contributors tools](https://github.com/kubernetes/website/tree/master/content/en/docs/doc-contributor-tools) directory in the `kubernetes/website` repository contains tools to help your contribution journey go more smoothly.
The [doc contributors tools](https://github.com/kubernetes/website/tree/main/content/en/docs/doc-contributor-tools) directory in the `kubernetes/website` repository contains tools to help your contribution journey go more smoothly.
-->
## 为贡献者提供的工具
`kubernetes/website` 仓库的
[文档贡献者工具](https://github.com/kubernetes/website/tree/master/content/en/docs/doc-contributor-tools)
[文档贡献者工具](https://github.com/kubernetes/website/tree/main/content/en/docs/doc-contributor-tools)
目录中包含了一些工具,能够助你的贡献过程更为顺畅。