Skip to content

Commit fc244c3

Browse files
authored
Merge pull request #25447 from jiaj12/patch-48
Update style-guide.md
2 parents cac080e + 68a0cdb commit fc244c3

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

content/zh/docs/contribute/style/style-guide.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ weight: 10
1212
-->
1313

1414
<!-- overview -->
15+
1516
<!--
1617
This page gives writing style guidelines for the Kubernetes documentation.
1718
These are guidelines, not rules. Use your best judgment, and feel free to
@@ -76,12 +77,11 @@ Kubernetes 文档已经被翻译为多个语种
7677
<!--
7778
## Documentation formatting standards
7879
79-
### Use camel case for API objects
80+
### Use upper camel case for API objects
8081
81-
When you refer to an API object, use the same uppercase and lowercase letters
82-
that are used in the actual object name. Typically, the names of API
83-
objects use
84-
[camel case](https://en.wikipedia.org/wiki/Camel_case).
82+
When you refer specifically to interacting with an API object, use [UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case), also
83+
known as Pascal Case. When you are generally discussing an API object, use [sentence-style capitalization]
84+
(https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
8585
8686
Don't split the API object name into separate words. For example, use
8787
PodTemplateList, not Pod Template List.
@@ -91,10 +91,12 @@ leads to an awkward construction.
9191
-->
9292
## 文档格式标准 {#documentation-formatting-standards}
9393

94-
### 对 API 对象使用驼峰式命名法 {#use-camel-case-for-api-objects}
94+
### 对 API 对象使用大写驼峰式命名法 {#use-upper-camel-case-for-api-objects}
9595

96-
当指代 API 对象时,请使用与实际对象名称中一样的大写和小写字母。
97-
通常 API 对象使用[驼峰式命名](https://en.wikipedia.org/wiki/Camel_case).
96+
当你与指定的 API 对象进行交互时,使用 [大写驼峰式命名法](https://en.wikipedia.org/wiki/Camel_case)
97+
也被称为帕斯卡拼写法.
98+
通常在讨论 API 对象时,使用
99+
[句子式大写](https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
98100

99101
不要将 API 对象的名称切分成多个单词。例如,使用 PodTemplateList,不要
100102
使用 Pod Template List。
@@ -107,7 +109,7 @@ leads to an awkward construction.
107109
Do | Don't
108110
:--| :-----
109111
The Pod has two containers. | The pod has two containers.
110-
The Deployment is responsible for ... | The Deployment object is responsible for ...
112+
The HorizontalPodAutoscaler is responsible for ... | The HorizontalPodAutoscaler object is responsible for ...
111113
A PodList is a list of Pods. | A Pod List is a list of pods.
112114
The two ContainerPorts ... | The two ContainerPort objects ...
113115
The two ContainerStateTerminated objects ... | The two ContainerStateTerminateds ...
@@ -117,7 +119,7 @@ The two ContainerStateTerminated objects ... | The two ContainerStateTerminateds
117119
可以 | 不可以
118120
:--| :-----
119121
Pod 有两个容器 | pod 中有两个容器
120-
Deployment 负责... | 此 Deployment 对象负责 ...
122+
HorizontalPodAutoscaler 负责... | 此 HorizontalPodAutoscaler 对象负责 ...
121123
PodList 是 Pod 的列表 | Pod List 是 pods 的列表
122124
这两个 ContainerPorts ... | 这两个 ContainerPort 对象 ...
123125
这两个 ContainerStateTerminated 对象 ... | 这两个 ContainerStateTerminateds ...
@@ -227,14 +229,14 @@ The copy is called a "fork". | The copy is called a "fork."
227229
<!--
228230
## Inline code formatting
229231
230-
### Use code style for inline code and commands
232+
### Use code style for inline code and commands, and API objects
231233
232234
For inline code in an HTML document, use the `<code>` tag. In a Markdown
233235
document, use the backtick (`` ` ``).
234236
-->
235237
## 行间代码格式 {#inline-code-formatting}
236238

237-
### 为行间代码和命令使用代码样式
239+
### 为行间代码、命令与 API 对象使用代码样式
238240

239241
对于 HTML 文档中的行间代码,使用 `<code>` 标记。
240242
在 Markdown 文档中,使用反引号(`` ` ``)。
@@ -243,7 +245,9 @@ document, use the backtick (`` ` ``).
243245
{{< table caption = "Do and Don't - Use code style for inline code and commands" >}}
244246
Do | Don't
245247
:--| :-----
246-
The `kubectl run`command creates a Deployment. | The "kubectl run" command creates a Deployment.
248+
The `kubectl run` command creates a `Pod`. | The "kubectl run" command creates a pod.
249+
The kubelet on each node acquires a `Lease`… | The kubelet on each node acquires a lease…
250+
A `PersistentVolume` represents durable storage… | A Persistent Volume represents durable storage…
247251
For declarative management, use `kubectl apply`. | For declarative management, use "kubectl apply".
248252
Enclose code samples with triple backticks. (\`\`\`)| Enclose code samples with any other syntax.
249253
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
255259
{{< table caption = "行间代码和命令约定" >}}
256260
可以 | 不可以
257261
:--| :-----
258-
命令 `kubectl run` 会创建一个 Deployment | 命令 "kubectl run" 会创建一个 Deployment。
262+
`kubectl run` 命令会创建一个 `Pod` | "kubectl run" 命令会创建一个 pod。
263+
每个节点上的 kubelet 都会获得一个 `Lease` | 每个节点上的 kubelet 都会获得一个 lease…
264+
一个 `PersistentVolume` 代表持久存储 | 一个 Persistent Volume 代表持久存储…
259265
在声明式管理中,使用 `kubectl apply`。 | 在声明式管理中,使用 "kubectl apply"。
260266
用三个反引号来(\`\`\`)标示代码示例 | 用其他语法来标示代码示例。
261267
使用单个反引号来标示行间代码。例如:`var example = true`。 | 使用两个星号(`**`)或者一个下划线(`_`)来标示行间代码。例如:**var example = true**
@@ -401,7 +407,7 @@ kubectl get pods | $ kubectl get pods
401407
<!--
402408
### Separate commands from output
403409
404-
Verify that the Pod is running on your chosen node:
410+
Verify that the pod is running on your chosen node:
405411
406412
kubectl get pods --output=wide
407413
@@ -789,7 +795,7 @@ Shortcodes will interrupt numbered lists unless you indent four spaces before th
789795
For example:
790796
791797
1. Preheat oven to 350˚F
792-
798+
793799
1. Prepare the batter, and pour into springform pan.
794800
`{{</* note */>}}Grease the pan for best results.{{</* /note */>}}`
795801
@@ -1053,7 +1059,7 @@ Use simple and direct language. Avoid using unnecessary phrases, such as saying
10531059
Do | Don't
10541060
To create a ReplicaSet, ... | In order to create a ReplicaSet, ...
10551061
See the configuration file. | Please see the configuration file.
1056-
View the Pods. | With this next command, we'll view the Pods.
1062+
View the pods. | With this next command, we'll view the Pods.
10571063
{{< /table >}}
10581064
-->
10591065
### 使用简单直接的语言
@@ -1125,7 +1131,7 @@ whether they're part of the "we" you're describing.
11251131
Do | Don't
11261132
Version 1.4 includes ... | In version 1.4, we have added ...
11271133
Kubernetes provides a new feature for ... | We provide a new feature ...
1128-
This page teaches you how to use Pods. | In this page, we are going to learn about Pods.
1134+
This page teaches you how to use pods. | In this page, we are going to learn about pods.
11291135
{{< /table >}}
11301136
-->
11311137
## 应避免的模式

0 commit comments

Comments
 (0)