From 954ca51bd1522622333ee703c80006ede2a088a3 Mon Sep 17 00:00:00 2001 From: jiajie Date: Mon, 7 Dec 2020 15:47:19 +0800 Subject: [PATCH 1/2] Update style-guide.md --- .../zh/docs/contribute/style/style-guide.md | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/content/zh/docs/contribute/style/style-guide.md b/content/zh/docs/contribute/style/style-guide.md index 777a0b6ca4..b1d5401540 100644 --- a/content/zh/docs/contribute/style/style-guide.md +++ b/content/zh/docs/contribute/style/style-guide.md @@ -12,6 +12,7 @@ weight: 10 --> + ## 文档格式标准 {#documentation-formatting-standards} -### 对 API 对象使用驼峰式命名法 {#use-camel-case-for-api-objects} +### 对 API 对象使用大写驼峰式命名法 {#use-upper-camel-case-for-api-objects} -当指代 API 对象时,请使用与实际对象名称中一样的大写和小写字母。 -通常 API 对象使用[驼峰式命名](https://en.wikipedia.org/wiki/Camel_case). +当你与指定的 API 对象进行交互时,使用 [大写驼峰式命名法](https://en.wikipedia.org/wiki/Camel_case), +也被称为帕斯卡拼写法. +通常在讨论 API 对象时,使用 +[句子式大写](https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization). 不要将 API 对象的名称切分成多个单词。例如,使用 PodTemplateList,不要 使用 Pod Template List。 @@ -107,7 +109,7 @@ leads to an awkward construction. Do | Don't :--| :----- The Pod has two containers. | The pod has two containers. -The Deployment is responsible for ... | The Deployment object is responsible for ... +The HorizontalPodAutoscaler is responsible for ... | The HorizontalPodAutoscaler object is responsible for ... A PodList is a list of Pods. | A Pod List is a list of pods. The two ContainerPorts ... | The two ContainerPort objects ... The two ContainerStateTerminated objects ... | The two ContainerStateTerminateds ... @@ -117,7 +119,7 @@ The two ContainerStateTerminated objects ... | The two ContainerStateTerminateds 可以 | 不可以 :--| :----- Pod 有两个容器 | pod 中有两个容器 -此 Deployment 负责... | 此 Deployment 对象负责 ... +此 HorizontalPodAutoscaler 负责... | 此 HorizontalPodAutoscaler 对象负责 ... PodList 是 Pod 的列表 | Pod List 是 pods 的列表 这两个 ContainerPorts ... | 这两个 ContainerPort 对象 ... 这两个 ContainerStateTerminated 对象 ... | 这两个 ContainerStateTerminateds ... @@ -227,14 +229,14 @@ The copy is called a "fork". | The copy is called a "fork." ## 行间代码格式 {#inline-code-formatting} -### 为行间代码和命令使用代码样式 +### 为行间代码、命令与 API 对象使用代码样式 对于 HTML 文档中的行间代码,使用 `` 标记。 在 Markdown 文档中,使用反引号(`` ` ``)。 @@ -243,7 +245,9 @@ document, use the backtick (`` ` ``). {{< table caption = "Do and Don't - Use code style for inline code and commands" >}} Do | Don't :--| :----- -The `kubectl run`command creates a Deployment. | The "kubectl run" command creates a Deployment. +The `kubectl run` command creates a `Pod`. | The "kubectl run" command creates a pod. +The kubelet on each node acquires a `Lease`… | The kubelet on each node acquires a lease… +A `PersistentVolume` represents durable storage… | A Persistent Volume represents durable storage… For declarative management, use `kubectl apply`. | For declarative management, use "kubectl apply". Enclose code samples with triple backticks. (\`\`\`)| Enclose code samples with any other syntax. Use single backticks to enclose inline code. For example, `var example = true`. | Use two asterisks (`**`) or an underscore (`_`) to enclose inline code. For example, **var example = true**. @@ -255,7 +259,9 @@ Remove trailing spaces in the code. | Add trailing spaces in the code, where the {{< table caption = "行间代码和命令约定" >}} 可以 | 不可以 :--| :----- -命令 `kubectl run` 会创建一个 Deployment | 命令 "kubectl run" 会创建一个 Deployment。 +`kubectl run` 命令会创建一个 `Pod` | "kubectl run" 命令会创建一个 pod。 +每个节点上的 kubelet 都会获得一个 `Lease` | 每个节点上的 kubelet 都会获得一个 lease… +一个 `PersistentVolume` 代表持久存储 | 一个 Persistent Volume 代表持久存储… 在声明式管理中,使用 `kubectl apply`。 | 在声明式管理中,使用 "kubectl apply"。 用三个反引号来(\`\`\`)标示代码示例 | 用其他语法来标示代码示例。 使用单个反引号来标示行间代码。例如:`var example = true`。 | 使用两个星号(`**`)或者一个下划线(`_`)来标示行间代码。例如:**var example = true**。 @@ -401,7 +407,7 @@ kubectl get pods | $ kubectl get pods ### 使用简单直接的语言 @@ -1125,7 +1131,7 @@ whether they're part of the "we" you're describing. Do | Don't Version 1.4 includes ... | In version 1.4, we have added ... Kubernetes provides a new feature for ... | We provide a new feature ... -This page teaches you how to use Pods. | In this page, we are going to learn about Pods. +This page teaches you how to use pods. | In this page, we are going to learn about pods. {{< /table >}} --> ## 应避免的模式 From 68a0cdb9ea289322f7c89514b8e6ffd4b52b027a Mon Sep 17 00:00:00 2001 From: jiajie Date: Tue, 8 Dec 2020 13:18:34 +0800 Subject: [PATCH 2/2] Update style-guide.md --- content/zh/docs/contribute/style/style-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/zh/docs/contribute/style/style-guide.md b/content/zh/docs/contribute/style/style-guide.md index b1d5401540..f03833cfaa 100644 --- a/content/zh/docs/contribute/style/style-guide.md +++ b/content/zh/docs/contribute/style/style-guide.md @@ -34,8 +34,8 @@ discussion. 样式指南的变更是 SIG Docs 团队集体决定。 如要提议更改或新增条目,请先将其添加到下一次 SIG Docs 例会的 -[议程表] -(https://docs.google.com/document/d/1ddHwLK3kUMX1wVFIwlksjTk0MsqitBnWPe1LRa1Rx5A/edit)上,并按时参加会议讨论。 +[议程表](https://docs.google.com/document/d/1ddHwLK3kUMX1wVFIwlksjTk0MsqitBnWPe1LRa1Rx5A/edit) +上,并按时参加会议讨论。