Skip to content

Commit c765642

Browse files
authored
Merge pull request #27654 from tengqm/zh-sync-contribute
[zh] Resync contribute section for Chinese localization
2 parents 44acf9c + 3b8786e commit c765642

File tree

9 files changed

+294
-179
lines changed

9 files changed

+294
-179
lines changed

content/zh/docs/contribute/advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ For weekly meetings, copypaste the previous week's notes into the "Past meetings
359359
<!--
360360
### Recording meetings on Zoom
361361
362-
When youre ready to start the recording, click Record to Cloud.
362+
When you're ready to start the recording, click Record to Cloud.
363363
364-
When youre ready to stop recording, click Stop.
364+
When you're ready to stop recording, click Stop.
365365
366366
The video uploads automatically to YouTube.
367367
-->

content/zh/docs/contribute/localization.md

Lines changed: 78 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ First, consult the [ISO 639-1 standard](https://www.loc.gov/standards/iso639-2/p
5151
5252
### Fork and clone the repo
5353
54-
First, [create your own fork](/docs/contribute/start/#improve-existing-content) of the [kubernetes/website](https://github.com/kubernetes/website) repository.
54+
First, [create your own fork](/docs/contribute/new-content/open-a-pr/#fork-the-repo) of the [kubernetes/website](https://github.com/kubernetes/website) repository.
5555
-->
5656
### 找到两个字母的语言代码
5757

@@ -122,11 +122,11 @@ The `@kubernetes/sig-docs-**-reviews` team automates review assignment for new P
122122
`@kubernetes/sig-docs-**-reviews` 团队被自动分派新 PR 的审阅任务。
123123

124124
<!--
125-
Members of `@kubernetes/website-maintainers` can create new development branches to coordinate translation efforts.
125+
Members of `@kubernetes/website-maintainers` can create new localization branches to coordinate translation efforts.
126126
127127
Members of `website-milestone-maintainers` can use the `/milestone` [Prow command](https://prow.k8s.io/command-help) to assign a milestone to issues or PRs.
128128
-->
129-
`@kubernetes/website-maintainers` 成员可以创建新的开发分支来协调翻译工作
129+
`@kubernetes/website-maintainers` 成员可以创建新的本地化分支来协调翻译工作
130130

131131
`@kubernetes/website-milestone-maintainers` 成员可以使用 `/milestone`
132132
[Prow 命令](https://prow.k8s.io/command-help) 为 issues 或 PR 设定里程碑。
@@ -394,26 +394,40 @@ To ensure accuracy in grammar and meaning, members of your localization team sho
394394
<!--
395395
### Source files
396396

397-
Localizations must be based on the English files from the most recent release, {{< latest-version >}}.
397+
Localizations must be based on the English files from a specific release targeted by the localization team.
398+
Each localization team can decide which release to target which is referred to as the _target version_ below.
398399

399-
To find source files for the most recent release:
400+
To find source files for your target version:
400401

401402
1. Navigate to the Kubernetes website repository at https://github.com/kubernetes/website.
402-
2. Select the `release-1.X` branch for the most recent version.
403+
2. Select a branch for your target version from the following table:
404+
Target version | Branch
405+
-----|-----
406+
Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
407+
Latest version | [`master`](https://github.com/kubernetes/website/tree/master)
408+
Previous version | `release-*.**`
403409

404-
The latest version is {{< latest-version >}}, so the most recent release branch is [`{{< release-branch >}}`](https://github.com/kubernetes/website/tree/{{< release-branch >}}).
410+
The `master` branch holds content for the current release `{{< latest-version >}}`. The release team will create `{{< release-branch >}}` branch shortly before the next release: v{{< skew nextMinorVersion >}}.
405411
-->
406412
### 源文件
407413

408-
本地化必须基于最新版本 {{< latest-version >}} 中的英文文件。
414+
本地化必须基于本地化团队所针对的特定发行版本中的英文文件。
415+
每个本地化团队可以决定要针对哪个发行版本,在下文中称作目标版本(target version)。)
409416

410-
要查找最新版本的源文件
417+
要查找你的目标版本的源文件
411418

412419
1. 导航到 Kubernetes website 仓库,网址为 https://github.com/kubernetes/website。
413-
1. 选择最新版本的 `release-1.X` 分支。
420+
2. 从下面的表格中选择你的目标版本分支:
414421

415-
最新版本是 {{< latest-version >}},所以最新的发行分支是
416-
[`{{< release-branch >}}`](https://github.com/kubernetes/website/tree/{{< release-branch >}})。
422+
目标版本 | 分支
423+
-----|-----
424+
下一个版本 | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
425+
最新版本 | [`master`](https://github.com/kubernetes/website/tree/master)
426+
之前的版本 | `release-*.**`
427+
428+
`master` 分支中保存的是当前发行版本 `{{< latest-version >}}` 的内容。
429+
发行团队会在下一个发行版本 v{{< skew nextMinorVersion >}} 出现之前创建
430+
`{{< release-branch >}}` 分支。
417431

418432
<!--
419433
### Site strings in i18n/
@@ -460,28 +474,29 @@ Some language teams have their own language-specific style guide and glossary. F
460474
<!--
461475
## Branching strategy
462476

463-
Because localization projects are highly collaborative efforts, we encourage teams to work in shared development branches.
477+
Because localization projects are highly collaborative efforts, we encourage teams to work in shared localization branches.
464478

465-
To collaborate on a development branch:
479+
To collaborate on a localization branch:
466480
-->
467-
### 分支策略
468-
因为本地化项目是高度协同的工作,所以我们鼓励团队基于共享的开发分支工作。
481+
### 分支策略 {#branching-strategy}
482+
483+
因为本地化项目是高度协同的工作,所以我们鼓励团队基于共享的本地化分支工作。
469484

470-
在开发分支上协作需要
485+
在本地化分支上协作需要
471486

472487
<!--
473-
1. A team member of [@kubernetes/sig-docs-l10n-admins](https://github.com/orgs/kubernetes/teams/sig-docs-l10n-admins) opens a development branch from a source branch on https://github.com/kubernetes/website.
488+
1. A team member of [@kubernetes/website-maintainers](https://github.com/orgs/kubernetes/teams/website-maintainers) opens a localization branch from a source branch on https://github.com/kubernetes/website.
474489

475-
Your team approvers joined the `sig-docs-l10n-admins` team when you [added your localization team](#add-your-localization-team-in-github) to the `kubernetes/org` repository.
490+
Your team approvers joined the `@kubernetes/website-maintainers` team when you [added your localization team](#add-your-localization-team-in-github) to the [`kubernetes/org`](https://github.com/kubernetes/org) repository.
476491

477492
We recommend the following branch naming scheme:
478493

479494
`dev-<source version>-<language code>.<team milestone>`
480495

481-
For example, an approver on a German localization team opens the development branch `dev-1.12-de.1` directly against the k/website repository, based on the source branch for Kubernetes v1.12.
496+
For example, an approver on a German localization team opens the localization branch `dev-1.12-de.1` directly against the k/website repository, based on the source branch for Kubernetes v1.12.
482497
-->
483498
1. [@kubernetes/website-maintainers](https://github.com/orgs/kubernetes/teams/website-maintainers)
484-
中的团队成员从 https://github.com/kubernetes/website 原有分支新建一个开发分支
499+
中的团队成员从 https://github.com/kubernetes/website 原有分支新建一个本地化分支
485500
当你给 `kubernetes/org` 仓库[添加你的本地化团队](#add-your-localization-team-in-github)时,
486501
你的团队批准人便加入了 `@kubernetes/website-maintainers` 团队。
487502

@@ -490,52 +505,72 @@ To collaborate on a development branch:
490505
`dev-<source version>-<language code>.<team milestone>`
491506

492507
例如,一个德语本地化团队的批准人基于 Kubernetes v1.12 版本的源分支,
493-
直接新建了 k/website 仓库的开发分支 `dev-1.12-de.1`。
508+
直接新建了 k/website 仓库的本地化分支 `dev-1.12-de.1`。
494509

495510
<!--
496-
2. Individual contributors open feature branches based on the development branch.
511+
2. Individual contributors open feature branches based on the localization branch.
497512

498513
For example, a German contributor opens a pull request with changes to `kubernetes:dev-1.12-de.1` from `username:local-branch-name`.
499514

500-
3. Approvers review and merge feature branches into the development branch.
515+
3. Approvers review and merge feature branches into the localization branch.
501516

502-
4. Periodically, an approver merges the development branch to its source branch by opening and approving a new pull request. Be sure to squash the commits before approving the pull request.
517+
4. Periodically, an approver merges the localization branch to its source branch by opening and approving a new pull request. Be sure to squash the commits before approving the pull request.
503518
-->
504-
2. 个人贡献者基于开发分支创建新的特性分支
519+
2. 个人贡献者基于本地化分支创建新的特性分支
505520

506521
例如,一个德语贡献者新建了一个拉取请求,并将 `username:local-branch-name` 更改为 `kubernetes:dev-1.12-de.1`。
507522

508-
3. 批准人审查功能分支并将其合并到开发分支中
523+
3. 批准人审查功能分支并将其合并到本地化分支中
509524

510-
4. 批准人会定期发起并批准新的 PR,将开发分支合并到其源分支。在批准 PR 之前,请确保先 squash commits。
525+
4. 批准人会定期发起并批准新的 PR,将本地化分支合并到其源分支。
526+
在批准 PR 之前,请确保先 squash commits。
511527

512528
<!--
513-
Repeat steps 1-4 as needed until the localization is complete. For example, subsequent German development branches would be: `dev-1.12-de.2`, `dev-1.12-de.3`, etc.
529+
Repeat steps 1-4 as needed until the localization is complete. For example, subsequent German localization branches would be: `dev-1.12-de.2`, `dev-1.12-de.3`, etc.
514530
-->
515-
根据需要重复步骤 1-4,直到完成本地化工作。例如,随后的德语开发分支将是
531+
根据需要重复步骤 1-4,直到完成本地化工作。例如,随后的德语本地化分支将是
516532
`dev-1.12-de.2`、`dev-1.12-de.3`,等等。
517533

518534
<!--
519-
Teams must merge localized content into the same release branch from which the content was sourced. For example, a development branch sourced from {{< release-branch >}} must be based on {{< release-branch >}}.
535+
Teams must merge localized content into the same branch from which the content was sourced.
536+
537+
For example:
538+
539+
- a localization branch sourced from `master` must be merged into `master`.
540+
- a localization branch sourced from `release-1.19` must be merged into `release-1.19`.
520541

521-
An approver must maintain a development branch by keeping it current with its source branch and resolving merge conflicts. The longer a development branch stays open, the more maintenance it typically requires. Consider periodically merging development branches and opening new ones, rather than maintaining one extremely long-running development branch.
542+
{{< note >}}
543+
If your localization branch was created from `master` branch but it is not merged into `master` before new release branch `{{< release-branch >}}` created, merge it into both `master` and new release branch `{{< release-branch >}}`. To merge your localization branch into new release branch `{{< release-branch >}}`, you need to switch upstream branch of your localization branch to `{{< release-branch >}}`.
544+
{{< /note >}}
522545
-->
523-
团队必须将本地化内容合入到发布分支中,该发布分支也正是内容的来源。
524-
例如,源于 {{< release-branch >}} 的开发分支必须基于 {{< release-branch >}}。
546+
团队必须将本地化内容合入到发布分支中,该发布分支是内容的来源。
525547

526-
approver 必须通过使开发分支与源分支保持最新并解决合并冲突来维护开发分支。
527-
开发分支的存在时间越长,通常需要的维护工作就越多。
528-
考虑定期合并开发分支并新建分支,而不是维护一个持续时间很长的开发分支。
548+
例如:
549+
550+
- 源于 `master` 分支的本地化分支必须被合并到 `master`。
551+
- 源于 `release-1.19` 的本地化分支必须被合并到 `release-1.19`。
552+
553+
如果你的本地化分支是基于 `master` 分支创建的,但最终没有在新的发行
554+
分支 `{{< release-branch >}}` 被创建之前合并到 `master` 中,需要将其
555+
同时将其合并到 `master` 和新的发行分支 `{{< release-branch >}}` 中。
556+
要将本地化分支合并到新的发行分支 `{{< release-branch >}}` 中,你需要
557+
将你本地化分支的上游分支切换到 `{{< release-branch >}}`。
529558

530559
<!--
531-
At the beginning of every team milestone, it's helpful to open an issue comparing upstream changes between the previous development branch and the current development branch.
560+
At the beginning of every team milestone, it's helpful to open an issue comparing upstream changes between the previous localization branch and the current localization branch. There are two scripts for comparing upstream changes. [`upstream_changes.py`](https://github.com/kubernetes/website/tree/master/scripts#upstream_changespy) is useful for checking the changes made to a specific file. And [`diff_l10n_branches.py`](https://github.com/kubernetes/website/tree/master/scripts#diff_l10n_branchespy) is useful for creating a list of outdated files for a specific localization branch.
532561

533-
While only approvers can open a new development branch and merge pull requests, anyone can open a pull request for a new development branch. No special permissions are required.
562+
While only approvers can open a new localization branch and merge pull requests, anyone can open a pull request for a new localization branch. No special permissions are required.
534563
-->
535-
536-
在团队每个里程碑的起点,创建一个 issue 来比较先前的开发分支和当前的开发分支之间的上游变化很有帮助。
537-
虽然只有批准人才能创建新的开发分支并合并 PR,但任何人都可以为新的开发分支提交一个拉取请求(PR)。
538-
不需要特殊权限。
564+
在团队每个里程碑的开始时段,创建一个 issue 来比较先前的本地化分支
565+
和当前的本地化分支之间的上游变化很有帮助。
566+
现在有两个脚本用来比较上游的变化。
567+
[`upstream_changes.py`](https://github.com/kubernetes/website/tree/master/scripts#upstream_changespy)
568+
对于检查对某个文件的变更很有用。
569+
[`diff_l10n_branches.py`](https://github.com/kubernetes/website/tree/master/scripts#diff_l10n_branchespy)
570+
可以用来为某个特定本地化分支创建过时文件的列表。
571+
572+
虽然只有批准人才能创建新的本地化分支并合并 PR,任何人都可以
573+
为新的本地化分支提交一个拉取请求(PR)。不需要特殊权限。
539574

540575
<!--
541576
For more information about working from forks or directly from the repository, see ["fork and clone the repo"](#fork-and-clone-the-repo).

content/zh/docs/contribute/new-content/blogs-case-studies.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Kubernetes 博客用于项目发布新功能特性、社区报告以及其他一
4646
### Guidelines and expectations
4747
4848
- Blog posts should not be vendor pitches.
49-
- Articles must contain content that applies broadly to the Kubernetes community. For example, a submission should focus on upstream Kubernetes as opposed to vendor-specific configurations. Check the [Documentation style guide](https://kubernetes.io/docs/contribute/style/content-guide/#what-s-allowed) for what is typically allowed on Kubernetes properties.
49+
- Articles must contain content that applies broadly to the Kubernetes community. For example, a submission should focus on upstream Kubernetes as opposed to vendor-specific configurations. Check the [Documentation style guide](/docs/contribute/style/content-guide/#what-s-allowed) for what is typically allowed on Kubernetes properties.
5050
- Links should primarily be to the official Kubernetes documentation. When using external references, links should be diverse - For example a submission shouldn't contain only links back to a single company's blog.
5151
- Sometimes this is a delicate balance. The [blog team](https://kubernetes.slack.com/messages/sig-docs-blog/) is there to give guidance on whether a post is appropriate for the Kubernetes blog, so don't hesitate to reach out.
5252
-->
@@ -100,8 +100,8 @@ Kubernetes 博客用于项目发布新功能特性、社区报告以及其他一
100100
Kubernetes 博客上阅读的内容。
101101
<!--
102102
- Blog posts should be original content
103-
- The official blog is not for repurposing existing content from a third party as new content.
104-
- The [license](https://github.com/kubernetes/website/blob/master/LICENSE) for the blog does allow commercial use of the content for commercial purposes, just not the other way around.
103+
- The official blog is not for repurposing existing content from a third party as new content.
104+
- 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.
105105
- Blog posts should aim to be future proof
106106
- Given the development velocity of the project, we want evergreen content that won't require updates to stay accurate for the reader.
107107
- 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.
@@ -144,7 +144,7 @@ SIG Docs [博客子项目](https://github.com/kubernetes/community/tree/master/s
144144

145145
要提交博文,你可以遵从以下指南:
146146
<!--
147-
- [Open a pull request](/docs/contribute/new-content/new-content/#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.
147+
- [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.
148148
149149
- Ensure that your blog post follows the correct naming conventions and the following frontmatter (metadata) information:
150150

0 commit comments

Comments
 (0)