Skip to content

Commit b5a83d8

Browse files
committed
docs: improve chinese translation
1 parent 9d5b888 commit b5a83d8

File tree

1 file changed

+20
-24
lines changed
  • content/zh/docs/contribute/style/hugo-shortcodes

1 file changed

+20
-24
lines changed

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

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -358,36 +358,37 @@ The two most commonly used version parameters are `latest` and `version`.
358358
-->
359359
## 版本号信息
360360

361-
文档中的版本号信息可以通过短代码的方式生成。在配置文件 `config.toml` 中,定义了一些版本号信息,通过短代码及版本号参数可以从配置文件中提取并展示指定的版本号信息。
362-
最常见的版本号短代码参数包括 `latest``version`
361+
要在文档中生成版本号信息,可以从以下几种短代码中选择。每个短代码可以基于站点配置文件
362+
`config.toml` 中的版本参数生成一个版本号取值。最常用的参数为 `latest``version`
363363

364364
<!--
365365
### `{{</* param "version" */>}}`
366366
367367
The `{{</* param "version" */>}}` shortcode generates the value of the current version of
368-
the Kubernetes documentation from the `version` site parameter. The `param` shortcode accepts the name of one site parameter, in this case: `version`.
368+
the Kubernetes documentation from the `version` site parameter. The `param` shortcode accepts
369+
the name of one site parameter, in this case: `version`.
369370
-->
370371
### `{{</* param "version" */>}}`
371372

372-
`{{</* param "version" */>}}` 短代码可以转换为 Kubernetes 文档的当前版本,具体的版本号来源于配置文件中的 `version` 参数。
373-
短代码 `param` 允许传入一个配置参数,例子里的参数为 `version`
373+
`{{</* param "version" */>}}` 短代码可以基于站点参数 `version` 生成 Kubernetes
374+
文档的当前版本号取值。短代码 `param` 允许传入一个站点参数名称,在这里是 `version`
374375

375376
<!--
376377
{{< note >}}
377378
In previously released documentation, `latest` and `version` parameter values are not equivalent.
378-
After a new version is released, `latest` is incremented and the value of `version` for the documentation set remains unchanged. For example, a previously released version of the documentation displays `version` as
379-
`v1.19` and `latest` as `v1.20`.
379+
After a new version is released, `latest` is incremented and the value of `version` for the
380+
documentation set remains unchanged. For example, a previously released version of the
381+
documentation displays `version` as `v1.19` and `latest` as `v1.20`.
380382
{{< /note >}}
381383
-->
382384
{{< note >}}
383-
在先前已经发布的文档中,`latest``version` 参数转换得到的版本号并不相同。
384-
新版本文档发布后,参数 `latest` 会增加,而 `version` 则保持不变。例如,在上一版本的文档中使用 `version` 会得到 `v1.19`,而使用 `latest` 则会得到 `v1.20`
385+
在先前已经发布的文档中,`latest``version` 参数值并不完全等价。新版本文档发布后,参数
386+
`latest` 会增加,而 `version` 则保持不变。例如,在上一版本的文档中使用 `version` 会得到
387+
`v1.19`,而使用 `latest` 则会得到 `v1.20`
385388
{{< /note >}}
386389

387390
<!--
388391
Renders to:
389-
390-
{{< param "version" >}}
391392
-->
392393
转换为:
393394

@@ -401,12 +402,10 @@ The `latest` site parameter is updated when a new version of the documentation i
401402
This parameter does not always match the value of `version` in a documentation set.
402403
403404
Renders to:
404-
405-
{{< latest-version >}}
406405
-->
407406
### `{{</* latest-version */>}}`
408407

409-
`{{</* latest-version */>}}` 会转换为配置文件中参数 `latest` 对应的值。每当有新版本文档发布时,该参数均会更新
408+
`{{</* latest-version */>}}` 返回站点参数 `latest` 的取值。每当新版本文档发布时,该参数均会被更新
410409
因此,参数 `latest``version` 并不总是相同。
411410

412411
转换为:
@@ -419,12 +418,10 @@ Renders to:
419418
The `{{</* latest-semver */>}}` shortcode generates the value of `latest` without the "v" prefix.
420419
421420
Renders to:
422-
423-
{{< latest-semver >}}
424421
-->
425422
### `{{</* latest-semver */>}}`
426423

427-
`{{</* latest-semver */>}}` 会转换为配置文件中参数 `latest` 对应的值,并且会删除前缀 `v`
424+
`{{</* latest-semver */>}}` 短代码可以生成站点参数 `latest` 不含前缀 `v` 的版本号取值
428425

429426
转换为:
430427

@@ -437,12 +434,11 @@ The `{{</* version-check */>}}` shortcode checks if the `min-kubernetes-server-v
437434
page parameter is present and then uses this value to compare to `version`.
438435
439436
Renders to:
440-
441-
{{< version-check >}}
442437
-->
443438
### `{{</* version-check */>}}`
444439

445-
`{{</* version-check */>}}` 会检查是否设置了页面参数 `min-kubernetes-server-version` 并将其与 `version` 进行比较。
440+
`{{</* version-check */>}}` 会检查是否设置了页面参数 `min-kubernetes-server-version`
441+
并将其与 `version` 进行比较。
446442

447443
转换为:
448444

@@ -452,15 +448,15 @@ Renders to:
452448
### `{{</* latest-release-notes */>}}`
453449
454450
The `{{</* latest-release-notes */>}}` shortcode generates a version string from `latest` and removes
455-
the "v" prefix. The shortcode prints a new URL for the release note CHANGELOG page with the modified version string.
451+
the "v" prefix. The shortcode prints a new URL for the release note CHANGELOG page with the modified
452+
version string.
456453
457454
Renders to:
458-
459-
{{< latest-release-notes >}}
460455
-->
461456
### `{{</* latest-release-notes */>}}`
462457

463-
`{{</* latest-release-notes */>}}` 会转换为 `latest` 版本的更新日志的超链接。
458+
`{{</* latest-release-notes */>}}` 短代码基于站点参数 `latest` 生成不含前缀 `v`
459+
的版本号取值,并输出该版本更新日志的超链接地址。
464460

465461
转换为:
466462

0 commit comments

Comments
 (0)