Skip to content

Commit e657ca6

Browse files
authored
Merge pull request #48172 from my-git9/pp-11579
[zh-cn]sync pr-wranglers linkchecker/README
2 parents 5808756 + be29c56 commit e657ca6

File tree

2 files changed

+60
-41
lines changed

2 files changed

+60
-41
lines changed

content/zh-cn/docs/contribute/participate/pr-wranglers.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ for the repository.
1818
This section covers the duties of a PR wrangler. For more information on giving good reviews,
1919
see [Reviewing changes](/docs/contribute/review/).
2020
-->
21-
SIG Docs 的[批准人(Approver)](/zh-cn/docs/contribute/participate/roles-and-responsibilities/#approvers)们每周轮流负责
22-
[管理仓库的 PR](https://github.com/kubernetes/website/wiki/PR-Wranglers)
21+
SIG Docs 的[批准人(Approver)](/zh-cn/docs/contribute/participate/roles-and-responsibilities/#approvers)
22+
们每周轮流负责[管理仓库的 PR](https://github.com/kubernetes/website/wiki/PR-Wranglers)
2323

2424
本节介绍 PR 管理者的职责。关于如何提供较好的评审意见,
2525
可参阅[评审变更](/zh-cn/docs/contribute/review/)
@@ -33,7 +33,8 @@ Each day in a week-long shift as PR Wrangler:
3333
- Review [open pull requests](https://github.com/kubernetes/website/pulls) for quality
3434
and adherence to the [Style](/docs/contribute/style/style-guide/) and
3535
[Content](/docs/contribute/style/content-guide/) guides.
36-
- Start with the smallest PRs (`size/XS`) first, and end with the largest (`size/XXL`). Review as many PRs as you can.
36+
- Start with the smallest PRs (`size/XS`) first, and end with the largest (`size/XXL`).
37+
Review as many PRs as you can.
3738
-->
3839
## 职责 {#duties}
3940

@@ -47,15 +48,15 @@ Each day in a week-long shift as PR Wrangler:
4748
PR(`size/XXL`),尽可能多地评审 PR。
4849
<!--
4950
- Make sure PR contributors sign the [CLA](https://github.com/kubernetes/community/blob/master/CLA.md).
50-
- Use [this](https://github.com/zparnold/k8s-docs-pr-botherer) script to remind contributors
51-
that haven't signed the CLA to do so.
51+
- Use [this](https://github.com/zparnold/k8s-docs-pr-botherer) script to remind contributors
52+
that haven't signed the CLA to do so.
5253
- Provide feedback on changes and ask for technical reviews from members of other SIGs.
53-
- Provide inline suggestions on the PR for the proposed content changes.
54-
- If you need to verify content, comment on the PR and request more details.
55-
- Assign relevant `sig/` label(s).
56-
- If needed, assign reviewers from the `reviewers:` block in the file's front matter.
57-
- You can also tag a [SIG](https://github.com/kubernetes/community/blob/master/sig-list.md)
58-
for a review by commenting `@kubernetes/<sig>-pr-reviews` on the PR.
54+
- Provide inline suggestions on the PR for the proposed content changes.
55+
- If you need to verify content, comment on the PR and request more details.
56+
- Assign relevant `sig/` label(s).
57+
- If needed, assign reviewers from the `reviewers:` block in the file's front matter.
58+
- You can also tag a [SIG](https://github.com/kubernetes/community/blob/master/sig-list.md)
59+
for a review by commenting `@kubernetes/<sig>-pr-reviews` on the PR.
5960
-->
6061
- 确保贡献者签署 [CLA](https://github.com/kubernetes/community/blob/master/CLA.md)
6162
- 使用[此脚本](https://github.com/zparnold/k8s-docs-pr-botherer)自动提醒尚未签署
@@ -69,13 +70,13 @@ Each day in a week-long shift as PR Wrangler:
6970
[SIG](https://github.com/kubernetes/community/blob/master/sig-list.md) 来评审。
7071
<!--
7172
- Use the `/approve` comment to approve a PR for merging. Merge the PR when ready.
72-
- PRs should have a `/lgtm` comment from another member before merging.
73-
- Consider accepting technically accurate content that doesn't meet the
74-
[style guidelines](/docs/contribute/style/style-guide/). As you approve the change,
75-
open a new issue to address the style concern. You can usually write these style fix
76-
issues as [good first issues](https://kubernetes.dev/docs/guide/help-wanted/#good-first-issue).
77-
- Using style fixups as good first issues is a good way to ensure a supply of easier tasks
78-
to help onboard new contributors.
73+
- PRs should have a `/lgtm` comment from another member before merging.
74+
- Consider accepting technically accurate content that doesn't meet the
75+
[style guidelines](/docs/contribute/style/style-guide/). As you approve the change,
76+
open a new issue to address the style concern. You can usually write these style fix
77+
issues as [good first issues](https://kubernetes.dev/docs/guide/help-wanted/#good-first-issue).
78+
- Using style fixups as good first issues is a good way to ensure a supply of easier tasks
79+
to help onboard new contributors.
7980
-->
8081
- 使用 `/approve` 评论来批准可以合并的 PR,在 PR 就绪时将其合并。
8182
- PR 在被合并之前,应该有来自其他成员的 `/lgtm` 评论。
@@ -87,7 +88,8 @@ Each day in a week-long shift as PR Wrangler:
8788
这有助于接纳新的贡献者。
8889

8990
<!--
90-
- Also check for pull requests against the [reference docs generator](https://github.com/kubernetes-sigs/reference-docs) code, and review those (or bring in help).
91+
- Also check for pull requests against the [reference docs generator](https://github.com/kubernetes-sigs/reference-docs)
92+
code, and review those (or bring in help).
9193
- Support the [issue wrangler](/docs/contribute/participate/issue-wrangler/) to
9294
triage and tag incoming issues daily.
9395
See [Triage and categorize issues](/docs/contribute/review/for-approvers/#triage-and-categorize-issues)
@@ -101,11 +103,12 @@ Each day in a week-long shift as PR Wrangler:
101103

102104
{{< note >}}
103105
<!--
104-
PR wrangler duties do not apply to localization PRs (non-English PRs).
105-
Localization teams have their own processes and teams for reviewing their language PRs.
106-
However, it's often helpful to ensure language PRs are labeled correctly,
107-
review small non-language dependent PRs (like a link update),
108-
or tag reviewers or contributors in long-running PRs (ones opened more than 6 months ago and have not been updated in a month or more).
106+
PR wrangler duties do not apply to localization PRs (non-English PRs).
107+
Localization teams have their own processes and teams for reviewing their language PRs.
108+
However, it's often helpful to ensure language PRs are labeled correctly,
109+
review small non-language dependent PRs (like a link update),
110+
or tag reviewers or contributors in long-running PRs
111+
(ones opened more than 6 months ago and have not been updated in a month or more).
109112
-->
110113
PR 管理者的职责不适用于本地化 PR(非英语 PR)。
111114
本地化团队有自己的流程和团队来审查其语言 PR。
@@ -201,10 +204,11 @@ These queries exclude localization PRs. All queries are against the main branch
201204
Reviews and approvals are one tool to keep our PR queue short and current. Another tool is closure.
202205
203206
Close PRs where:
207+
204208
- The author hasn't signed the CLA for two weeks.
205209
206-
Authors can reopen the PR after signing the CLA. This is a low-risk way to make
207-
sure nothing gets merged without a signed CLA.
210+
Authors can reopen the PR after signing the CLA. This is a low-risk way to make
211+
sure nothing gets merged without a signed CLA.
208212
209213
- The author has not responded to comments or feedback in 2 or more weeks.
210214
@@ -237,7 +241,7 @@ and closes them. PR wranglers should close issues after 14-30 days of inactivity
237241
-->
238242
一个名为 [`k8s-ci-robot`](https://github.com/k8s-ci-robot) 的自动服务会在 Issue 停滞 90
239243
天后自动将其标记为过期;然后再等 30 天,如果仍然无人过问,则将其关闭。
240-
PR 管理者应该在 issues 处于无人过问状态 14-30 天后关闭它们。
244+
PR 管理者应该在 Issue 处于无人过问状态 14-30 天后关闭它们。
241245
{{< /note >}}
242246

243247
<!--
@@ -273,7 +277,7 @@ The program was introduced to help new contributors understand the PR wrangling
273277
PR 管理轮值表,然后注册报名。
274278

275279
- 其他人可以通过 [#sig-docs Slack 频道](https://kubernetes.slack.com/messages/sig-docs)申请成为指定
276-
PR 管理者某一周的影子。可以随时咨询 (`@bradtopol`) 或某一位
280+
PR 管理者某一周的影子。可以随时咨询`@bradtopol`或某一位
277281
[SIG Docs 联席主席/主管](https://github.com/kubernetes/community/tree/master/sig-docs#leadership)
278282

279283
- 注册成为一名 PR 管理者的影子时,

content/zh-cn/docs/doc-contributor-tools/linkchecker/README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# 内置链接检查工具
55

66
<!--
7-
You can use [htmltest](https://github.com/wjdp/htmltest) to check for broken links in [`/content/en/`](https://git.k8s.io/website/content/en/). This is useful when refactoring sections of content, moving pages around, or renaming files or page headers.
7+
You can use [htmltest](https://github.com/wjdp/htmltest) to check for broken links in
8+
[`/content/en/`](https://git.k8s.io/website/content/en/). This is useful when refactoring
9+
sections of content, moving pages around, or renaming files or page headers.
810
-->
911
你可以使用 [htmltest](https://github.com/wjdp/htmltest) 来检查
1012
[`/content/en/`](https://git.k8s.io/website/content/en/) 下面的失效链接。
@@ -16,15 +18,18 @@ You can use [htmltest](https://github.com/wjdp/htmltest) to check for broken lin
1618
## 工作原理 {#how-the-tool-works}
1719

1820
<!--
19-
`htmltest` scans links in the generated HTML files of the kubernetes website repository. It runs using a `make` command which does the following:
21+
`htmltest` scans links in the generated HTML files of the kubernetes website repository.
22+
It runs using a `make` command which does the following:
2023
-->
2124
`htmltest` 会扫描 Kubernetes website 仓库构建生成的 HTML 文件。通过执行 `make` 命令进行了下列操作:
2225

2326
<!--
24-
- Builds the site and generates output HTML in the `/public` directory of your local `kubernetes/website` repository
27+
- Builds the site and generates output HTML in the `/public` directory of your
28+
local `kubernetes/website` repository
2529
- Pulls the `wdjp/htmltest` Docker image
2630
- Mounts your local `kubernetes/website` repository to the Docker image
27-
- Scans the files generated in the `/public` directory and provides command line output when it encounters broken internal links
31+
- Scans the files generated in the `/public` directory and provides command line output
32+
when it encounters broken internal links
2833
-->
2934
- 构建站点并输出 HTML 到本地 `kubernetes/website` 仓库下的 `/public` 目录中
3035
- 拉取 Docker 镜像 `wdjp/htmltest`
@@ -37,7 +42,10 @@ You can use [htmltest](https://github.com/wjdp/htmltest) to check for broken lin
3742
## 哪些链接不会检查 {#what-it-does-and-doesnot-check}
3843

3944
<!--
40-
The link checker scans generated HTML files, not raw Markdown. The htmltest tool depends on a configuration file, [`.htmltest.yml`](https://git.k8s.io/website/.htmltest.yml), to determine which content to examine.
45+
The link checker scans generated HTML files, not raw Markdown.
46+
The htmltest tool depends on a configuration file,
47+
[`.htmltest.yml`](https://git.k8s.io/website/.htmltest.yml),
48+
to determine which content to examine.
4149
4250
The link checker scans the following:
4351
-->
@@ -47,8 +55,10 @@ The link checker scans the following:
4755
该链接检查器扫描以下内容:
4856

4957
<!--
50-
- All content generated from Markdown in [`/content/en/docs`](https://git.k8s.io/website/content/en/docs/) directory, excluding:
51-
- Generated API references, for example https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
58+
- All content generated from Markdown in
59+
[`/content/en/docs`](https://git.k8s.io/website/content/en/docs/) directory, excluding:
60+
- Generated API references, for example
61+
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
5262
- All internal links, excluding:
5363
- Empty hashes (`<a href="#">` or `[title](#)`) and empty hrefs (`<a href="">` or `[title]()`)
5464
- Internal links to images and other media files
@@ -66,16 +76,18 @@ The link checker does not scan the following:
6676
该链接检查器不会扫描以下内容:
6777

6878
<!--
69-
- Links included in the top and side nav bars, footer links, or links in a page's `<head>` section, such as links to CSS stylesheets, scripts, and meta information
79+
- Links included in the top and side nav bars, footer links, or links in a page's `<head>` section,
80+
such as links to CSS stylesheets, scripts, and meta information
7081
- Top level pages and their children, for example: `/training`, `/community`, `/case-studies/adidas`
7182
- Blog posts
72-
- API Reference documentation, for example: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
83+
- API Reference documentation, for example
84+
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
7385
- Localizations
7486
-->
7587
- 包含在顶部和侧边导航栏的链接,以及页脚链接或者页面的 `<head>` 部分中的链接,例如 CSS 样式表、脚本以及元信息的链接。
7688
- 顶级页面及其子页面,例如:`/training``/community``/case-studies/adidas`
7789
- 博客文章
78-
- API 参考文档,例如 https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
90+
- API 参考文档,例如 https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
7991
- 本地化内容
8092

8193
<!--
@@ -87,6 +99,7 @@ The link checker does not scan the following:
8799
You must install
88100
-->
89101
必须安装:
102+
90103
* [Docker](https://docs.docker.com/get-docker/)
91104
* [make](https://www.gnu.org/software/make/)
92105

@@ -109,7 +122,7 @@ To run the link checker:
109122

110123
2. 执行如下命令:
111124

112-
```
125+
```shell
113126
make container-internal-linkcheck
114127
```
115128

@@ -152,8 +165,10 @@ One way to fix this is to:
152165

153166
<!--
154167
1. Navigate to the Markdown file with a broken link.
155-
2. Using a text editor, do a full-text search (usually Ctrl+F or Command+F) for the broken link's URL, `#preserving-unknown-fields`.
156-
3. Fix the link. For a broken page hash (or _anchor_) link, check whether the topic was renamed or removed.
168+
2. Using a text editor, do a full-text search (usually Ctrl+F or Command+F) for the
169+
broken link's URL, `#preserving-unknown-fields`.
170+
3. Fix the link. For a broken page hash (or _anchor_) link,
171+
check whether the topic was renamed or removed.
157172
-->
158173
1. 转到含有失效链接的 Markdown 文件。
159174
2. 使用文本编辑器全文搜索失效链接的 URL(通常使用 Ctrl+F 或 Command+F)`#preserving-unknown-fields`

0 commit comments

Comments
 (0)