Skip to content

Commit c8cbc55

Browse files
authored
Merge pull request #48527 from my-git9/pp-29029
[zh-cn]sync hugo-shortcodes/index garbage-collection
2 parents b7b75fb + 305c5c7 commit c8cbc55

File tree

2 files changed

+82
-28
lines changed

2 files changed

+82
-28
lines changed

content/zh-cn/docs/concepts/architecture/garbage-collection.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -296,31 +296,19 @@ regardless of disk usage. This is a kubelet setting that you configure for each
296296
这是一个可以为每个节点配置的 kubelet 设置。
297297

298298
<!--
299-
To configure the setting, you need to set a value for the `imageMaximumGCAge`
299+
To configure the setting, you need to set a value for the `imageMaximumGCAge`
300300
field in the kubelet configuration file.
301301
-->
302302
要配置该设置,你需要在 kubelet 配置文件中为 `imageMaximumGCAge`
303303
字段设置一个值。
304304

305305
<!--
306-
The value is specified as a Kubernetes _duration_;
307-
Valid time units for the `imageMaximumGCAge` field in the kubelet configuration file are:
308-
- "ns" for nanoseconds
309-
- "us" or "µs" for microseconds
310-
- "ms" for milliseconds
311-
- "s" for seconds
312-
- "m" for minutes
313-
- "h" for hours
306+
The value is specified as a Kubernetes {{< glossary_tooltip text="duration" term_id="duration" >}};
307+
See [duration](/docs/reference/glossary/?all=true#term-duration) in the glossary
308+
for more details.
314309
-->
315-
该值应遵循 Kubernetes **持续时间(Duration)** 格式;
316-
在 kubelet 配置文件中,`imageMaximumGCAge` 字段的有效时间单位如下:
317-
318-
- "ns" 表示纳秒
319-
- "us" 或 "µs" 表示微秒
320-
- "ms" 表示毫秒
321-
- "s" 表示秒
322-
- "m" 表示分钟
323-
- "h" 表示小时
310+
该值应遵循 Kubernetes {{< glossary_tooltip text="持续时间(Duration)" term_id="duration" >}}格式;
311+
有关更多详细信息,请参阅词汇表中的[持续时间(Duration)](/zh-cn/docs/reference/glossary/?all=true#term-duration)
324312

325313
<!--
326314
For example, you can set the configuration field to `12h45m`,

content/zh-cn/docs/contribute/style/hugo-shortcodes/index.md

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ stable in the latest Kubernetes version.
141141
<!--
142142
Renders to:
143143
-->
144-
渲染到
144+
会转换为
145145

146146
{{< feature-gate-description name="DryRun" >}}
147147

@@ -202,7 +202,8 @@ Here's a short glossary definition:
202202
which renders as:
203203
{{< glossary_definition prepend="A cluster is" term_id="cluster" length="short" >}}
204204
-->
205-
呈现为:
205+
呈现为:
206+
206207
{{< glossary_definition prepend="A cluster is" term_id="cluster" length="short" >}}
207208

208209
<!--
@@ -217,7 +218,8 @@ You can also include a full definition:
217218
<!--
218219
which renders as:
219220
-->
220-
呈现为:
221+
呈现为:
222+
221223
{{< glossary_definition term_id="cluster" length="all" >}}
222224

223225
<!--
@@ -259,7 +261,6 @@ section of the page:
259261
{{</* api-reference page="workload-resources/pod-v1" anchor="environment-variables" */>}}
260262
```
261263

262-
263264
<!--
264265
You can change the text of the link by specifying a `text` parameter, for
265266
example by linking to the
@@ -377,9 +378,9 @@ The `tabs` shortcode takes these parameters:
377378
under `codelang` or the language is taken based on the file name.
378379
Non-content files are code-highlighted by default.
379380
-->
380-
* `name` 标签页上显示的名字。
381-
* `codelang`: 如果要在 `tab` 短代码中加入内部内容,需要告知 Hugo 使用的是什么代码语言,方便代码高亮。
382-
* `include`: 标签页中所要包含的文件。如果标签页是在 Hugo 的
381+
* `name`:标签页上显示的名字。
382+
* `codelang`如果要在 `tab` 短代码中加入内部内容,需要告知 Hugo 使用的是什么代码语言,方便代码高亮。
383+
* `include`标签页中所要包含的文件。如果标签页是在 Hugo 的
383384
[叶子包](https://gohugo.io/content-management/page-bundles/#leaf-bundles)中定义,
384385
Hugo 会在包内查找文件(可以是 Hugo 所支持的任何 MIME 类型文件)。
385386
否则,Hugo 会在当前路径的相对路径下查找所要包含的内容页面。
@@ -512,6 +513,7 @@ This shortcode is used when the contents of the sample file is generic and reusa
512513
and you want the users to try it out themselves.
513514
-->
514515
## 源代码文件
516+
515517
你可以使用 `{{%/* code_sample */%}}` 短代码将文件内容嵌入代码块中,
516518
以允许用户下载或复制其内容到他们的剪贴板。
517519
当示例文件的内容是通用的、可复用的,并且希望用户自己尝试使用示例文件时,
@@ -531,6 +533,8 @@ For example:
531533
可选参数 `language` 用于指定文件的编程语言。
532534
如果未提供 `language` 参数,短代码将尝试根据文件扩展名推测编程语言。
533535

536+
例如:
537+
534538
```none
535539
{{%/* code_sample language="yaml" file="application/deployment-scale.yaml" */%}}
536540
```
@@ -607,6 +611,7 @@ that uses them.
607611
For a list of several third-party items, add:
608612
-->
609613
对于有关几个第三方项目的列表,请添加:
614+
610615
```
611616
{{%/* thirdparty-content */%}}
612617
```
@@ -636,11 +641,74 @@ Add the shortcode:
636641
637642
before the item, or just below the heading for the specific item.
638643
-->
644+
添加短代码:
645+
639646
在项目之前,或在特定项目的段落下方添加此短代码:
647+
640648
```
641649
{{%/* thirdparty-content single="true" */%}}
642650
```
643651

652+
<!--
653+
## Details
654+
655+
You can render a `<details>` HTML element using a shortcode:
656+
-->
657+
## 详细信息
658+
659+
你可以使用短代码呈现 `<details>` HTML 元素:
660+
661+
<!--
662+
```markdown
663+
{{</* details summary="More about widgets" */>}}
664+
The frobnicator extension API implements _widgets_ using example running text.
665+
666+
Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,
667+
adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et
668+
dolore magnam aliquam quaerat voluptatem.
669+
{{</* /details */>}}
670+
```
671+
-->
672+
```markdown
673+
{{</* details summary="有关 widgets 的更多信息" */>}}
674+
frobnicator 扩展 API 使用示例运行文本实现 **widgets**。
675+
676+
没有哪个人会因为痛苦本身就是令人愉悦的,而选择痛苦,
677+
尽管他们有时因为追求某种快乐而不得不承受痛苦。
678+
但这并不是说他们喜欢痛苦本身,而是因为通过忍受痛苦,他们可以得到更大的快乐。
679+
{{</* /details */>}}
680+
```
681+
682+
<!--
683+
This renders as:
684+
-->
685+
渲染结果如下:
686+
687+
<!--
688+
{{< details summary="More about widgets" >}}
689+
The frobnicator extension API implements _widgets_ using example running text.
690+
691+
Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,
692+
adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et
693+
dolore magnam aliquam quaerat voluptatem.
694+
{{< /details >}}
695+
-->
696+
{{< details summary="有关 widgets 的更多信息" >}}
697+
frobnicator 扩展 API 使用示例运行文本实现 **widgets**
698+
699+
没有哪个人会因为痛苦本身就是令人愉悦的,而选择痛苦,
700+
尽管他们有时因为追求某种快乐而不得不承受痛苦。
701+
但这并不是说他们喜欢痛苦本身,而是因为通过忍受痛苦,他们可以得到更大的快乐。
702+
{{< /details >}}
703+
704+
{{< note >}}
705+
<!--
706+
Use this shortcode sparingly; it is usually best to have all of the text directly shown
707+
to readers.
708+
-->
709+
谨慎使用此短代码;通常最好将所有文本直接显示给读者。
710+
{{< /note >}}
711+
644712
<!--
645713
## Version strings
646714
@@ -667,16 +735,14 @@ version of the Kubernetes documentation from the `version` site parameter. The
667735
`{{</* param "version" */>}}` 短代码可以基于站点参数 `version` 生成 Kubernetes
668736
文档的当前版本号取值。短代码 `param` 允许传入一个站点参数名称,在这里是 `version`
669737

670-
<!--
671738
{{< note >}}
739+
<!--
672740
In previously released documentation, `latest` and `version` parameter values
673741
are not equivalent. After a new version is released, `latest` is incremented
674742
and the value of `version` for the documentation set remains unchanged. For
675743
example, a previously released version of the documentation displays `version`
676744
as `v1.19` and `latest` as `v1.20`.
677-
{{< /note >}}
678745
-->
679-
{{< note >}}
680746
在先前已经发布的文档中,`latest``version` 参数值并不完全等价。新版本文档发布后,参数
681747
`latest` 会增加,而 `version` 则保持不变。例如,在上一版本的文档中使用 `version` 会得到
682748
`v1.19`,而使用 `latest` 则会得到 `v1.20`

0 commit comments

Comments
 (0)