[zh]Update other pages for links with '/zh/' prefix, using new prefix '/zh-cn/'

This commit is contained in:
howieyuen
2022-06-23 20:07:06 +08:00
parent d16f4daeb1
commit f0ccbff316
13 changed files with 40 additions and 40 deletions
@@ -8,7 +8,7 @@ date: 2019-04-26
Last year we optimized the Kubernetes website for [hosting multilingual content](/blog/2018/11/08/kubernetes-docs-updates-international-edition/). Contributors responded by adding multiple new localizations: as of April 2019, Kubernetes docs are partially available in nine different languages, with six added in 2019 alone. You can see a list of available languages in the language selector at the top of each page. Last year we optimized the Kubernetes website for [hosting multilingual content](/blog/2018/11/08/kubernetes-docs-updates-international-edition/). Contributors responded by adding multiple new localizations: as of April 2019, Kubernetes docs are partially available in nine different languages, with six added in 2019 alone. You can see a list of available languages in the language selector at the top of each page.
By _partially available_, I mean that localizations are ongoing projects. They range from mostly complete ([Chinese docs for 1.12](https://v1-12.docs.kubernetes.io/zh/)) to brand new (1.14 docs in [Portuguese](https://kubernetes.io/pt/)). If you're interested in helping an existing localization, read on! By _partially available_, I mean that localizations are ongoing projects. They range from mostly complete ([Chinese docs for 1.12](https://v1-12.docs.kubernetes.io/zh-cn/)) to brand new (1.14 docs in [Portuguese](https://kubernetes.io/pt/)). If you're interested in helping an existing localization, read on!
## What is a localization? ## What is a localization?
+8 -8
View File
@@ -62,7 +62,7 @@ overview:
# title: K8s Release Notes # title: K8s Release Notes
# description: If you are installing Kubernetes or upgrading to the newest version, refer to the current release notes. # description: If you are installing Kubernetes or upgrading to the newest version, refer to the current release notes.
# button: "Download Kubernetes" # button: "Download Kubernetes"
# button_path: "/zh/docs/setup/release/notes" # button_path: "/zh-cn/docs/setup/release/notes"
# - name: about # - name: about
# title: About the documentation # title: About the documentation
# description: This website contains documentation for the current and previous 4 versions of Kubernetes. # description: This website contains documentation for the current and previous 4 versions of Kubernetes.
@@ -71,37 +71,37 @@ cards:
title: "了解 Kubernetes" title: "了解 Kubernetes"
description: "了解 Kubernetes 和其基础概念。" description: "了解 Kubernetes 和其基础概念。"
button: "查看概念" button: "查看概念"
button_path: "/zh/docs/concepts" button_path: "/zh-cn/docs/concepts"
- name: tutorials - name: tutorials
title: "尝试 Kubernetes" title: "尝试 Kubernetes"
description: "按照教程学习如何在 Kubernetes 上部署应用。" description: "按照教程学习如何在 Kubernetes 上部署应用。"
button: "查看教程" button: "查看教程"
button_path: "/zh/docs/tutorials" button_path: "/zh-cn/docs/tutorials"
- name: setup - name: setup
title: "设置 K8s 集群" title: "设置 K8s 集群"
description: "按照你的资源情况和需求运行 Kubernetes。" description: "按照你的资源情况和需求运行 Kubernetes。"
button: "设置 Kubernetes" button: "设置 Kubernetes"
button_path: "/zh/docs/setup" button_path: "/zh-cn/docs/setup"
- name: tasks - name: tasks
title: "了解如何使用 Kubernetes" title: "了解如何使用 Kubernetes"
description: "查看常见任务以及如何使用简单步骤执行它们。" description: "查看常见任务以及如何使用简单步骤执行它们。"
button: "查看任务" button: "查看任务"
button_path: "/zh/docs/tasks" button_path: "/zh-cn/docs/tasks"
- name: training - name: training
title: "培训" title: "培训"
description: "通过 Kubernetes 认证,助你的云原生项目成功!" description: "通过 Kubernetes 认证,助你的云原生项目成功!"
button: "查看培训" button: "查看培训"
button_path: "/zh/training" button_path: "/zh-cn/training"
- name: reference - name: reference
title: 查阅参考信息 title: 查阅参考信息
description: 浏览术语、命令行语法、API 资源类型和安装工具文档。 description: 浏览术语、命令行语法、API 资源类型和安装工具文档。
button: 查看参考 button: 查看参考
button_path: /zh/docs/reference button_path: /zh-cn/docs/reference
- name: contribute - name: contribute
title: 为文档作贡献 title: 为文档作贡献
description: 任何人,无论对该项目熟悉与否,都能贡献自己的力量。 description: 任何人,无论对该项目熟悉与否,都能贡献自己的力量。
button: 为文档作贡献 button: 为文档作贡献
button_path: /zh/docs/contribute button_path: /zh-cn/docs/contribute
- name: release-notes - name: release-notes
title: K8s 发布说明 title: K8s 发布说明
description: 如果你正在安装或升级 Kubernetes,最好参考最新的发布说明。 description: 如果你正在安装或升级 Kubernetes,最好参考最新的发布说明。
@@ -31,4 +31,4 @@ which versions of Kubernetes are officially supported, and for how long.
本网站包含当前版本和之前四个版本的 Kubernetes 文档。 本网站包含当前版本和之前四个版本的 Kubernetes 文档。
Kubernetes 版本的文档可用性与当前是否支持该版本是分开的。 Kubernetes 版本的文档可用性与当前是否支持该版本是分开的。
阅读[支持期限](/zh/releases/patch-releases/#support-period),了解官方支持 Kubernetes 的哪些版本,以及支持多长时间。 阅读[支持期限](/zh-cn/releases/patch-releases/#support-period),了解官方支持 Kubernetes 的哪些版本,以及支持多长时间。
+2 -2
View File
@@ -503,10 +503,10 @@ You can also use HTML, but it is not preferred.
- 指向 Kubernetes 文档的站内链接,需要在英文链接之前添加前缀 `/zh`。 - 指向 Kubernetes 文档的站内链接,需要在英文链接之前添加前缀 `/zh`。
例如,原链接目标为 `/docs/foo/bar` 时,译文中的链接目标应为 例如,原链接目标为 `/docs/foo/bar` 时,译文中的链接目标应为
`/zh/docs/foo/bar`。例如: `/zh-cn/docs/foo/bar`。例如:
- 英文版本链接 [Kubernetes Components](/docs/concepts/overview/components/) - 英文版本链接 [Kubernetes Components](/docs/concepts/overview/components/)
- 对应中文链接 [Kubernetes 组件](/zh/docs/concepts/overview/components/) - 对应中文链接 [Kubernetes 组件](/zh-cn/docs/concepts/overview/components/)
- 英文页面子标题会生成对应锚点(Anchor),例如子标题 `## Using object` 会生成 - 英文页面子标题会生成对应锚点(Anchor),例如子标题 `## Using object` 会生成
对应标签 `#using-objects`。在翻译为中文之后,对应锚点可能会失效。对此,有 对应标签 `#using-objects`。在翻译为中文之后,对应锚点可能会失效。对此,有
@@ -1,7 +1,7 @@
你需要有一个带有默认 [StorageClass](/zh/docs/concepts/storage/storage-classes/)的 你需要有一个带有默认 [StorageClass](/zh-cn/docs/concepts/storage/storage-classes/)的
[动态 PersistentVolume 供应程序](/zh/docs/concepts/storage/dynamic-provisioning/) [动态 PersistentVolume 供应程序](/zh-cn/docs/concepts/storage/dynamic-provisioning/)
或者自己[静态的提供 PersistentVolume](/zh/docs/concepts/storage/persistent-volumes/#provisioning) 或者自己[静态的提供 PersistentVolume](/zh-cn/docs/concepts/storage/persistent-volumes/#provisioning)
来满足这里使用的 [PersistentVolumeClaim](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)。 来满足这里使用的 [PersistentVolumeClaim](/zh-cn/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)。
<!-- <!--
You need to either have a [dynamic PersistentVolume provisioner](/docs/concepts/storage/dynamic-provisioning/) with a default You need to either have a [dynamic PersistentVolume provisioner](/docs/concepts/storage/dynamic-provisioning/) with a default
@@ -3,6 +3,6 @@ The topics in the [User Guide](/docs/user-guide/) section of the Kubernetes docs
are being moved to the [Tasks](/docs/tasks/), [Tutorials](/docs/tutorials/), and are being moved to the [Tasks](/docs/tasks/), [Tutorials](/docs/tutorials/), and
[Concepts](/docs/concepts) sections. The content in this topic has moved to: [Concepts](/docs/concepts) sections. The content in this topic has moved to:
--> -->
Kubernetes文档中[用户指南](/zh/docs/user-guide/)部分中的主题被移动到 Kubernetes文档中[用户指南](/zh-cn/docs/user-guide/)部分中的主题被移动到
[任务](/zh/docs/tasks/)、[教程](/zh/docs/tutorials/)和[概念](/zh/docs/concepts)节。 [任务](/zh-cn/docs/tasks/)、[教程](/zh-cn/docs/tutorials/)和[概念](/zh-cn/docs/concepts)节。
本主题内容已移至: 本主题内容已移至:
+2 -2
View File
@@ -16,7 +16,7 @@ type: docs
The Kubernetes project maintains release branches for the most recent three minor releases ({{< skew currentVersion >}}, {{< skew currentVersionAddMinor -1 >}}, {{< skew currentVersionAddMinor -2 >}}). Kubernetes 1.19 and newer receive [approximately 1 year of patch support](/releases/patch-releases/#support-period). Kubernetes 1.18 and older received approximately 9 months of patch support. The Kubernetes project maintains release branches for the most recent three minor releases ({{< skew currentVersion >}}, {{< skew currentVersionAddMinor -1 >}}, {{< skew currentVersionAddMinor -2 >}}). Kubernetes 1.19 and newer receive [approximately 1 year of patch support](/releases/patch-releases/#support-period). Kubernetes 1.18 and older received approximately 9 months of patch support.
--> -->
Kubernetes 项目维护最近三个次要版本({{< skew currentVersion >}}、{{< skew currentVersionAddMinor -1 >}}、{{< skew currentVersionAddMinor -2 >}})的发布分支。 Kubernetes 项目维护最近三个次要版本({{< skew currentVersion >}}、{{< skew currentVersionAddMinor -1 >}}、{{< skew currentVersionAddMinor -2 >}})的发布分支。
Kubernetes 1.19 和更新版本获得[大约 1 年的补丁支持](/zh/releases/patch-releases/#support-period)。 Kubernetes 1.19 和更新版本获得[大约 1 年的补丁支持](/zh-cn/releases/patch-releases/#support-period)。
Kubernetes 1.18 及更早版本获得了大约 9 个月的补丁支持周期。 Kubernetes 1.18 及更早版本获得了大约 9 个月的补丁支持周期。
<!-- <!--
@@ -28,7 +28,7 @@ More information in the [version skew policy](/releases/version-skew-policy/) do
Kubernetes 版本表示为 **x.y.z** Kubernetes 版本表示为 **x.y.z**
其中 **x** 是主要版本,**y** 是次要版本,**z** 是补丁版本,遵循[语义版本控制](https://semver.org/)术语。 其中 **x** 是主要版本,**y** 是次要版本,**z** 是补丁版本,遵循[语义版本控制](https://semver.org/)术语。
更多信息在[版本偏差策略](/zh/releases/version-skew-policy/)文档中。 更多信息在[版本偏差策略](/zh-cn/releases/version-skew-policy/)文档中。
<!-- body --> <!-- body -->
+6 -6
View File
@@ -119,7 +119,7 @@ To manually verify signed container images of Kubernetes core components, refer
--> -->
对于 Kubernetes v{{< skew currentVersion >}},唯一可以验证完整性的代码工件就是容器镜像,它使用实验性签名支持。 对于 Kubernetes v{{< skew currentVersion >}},唯一可以验证完整性的代码工件就是容器镜像,它使用实验性签名支持。
如需手动验证 Kubernetes 核心组件的签名容器镜像,请参考[验证签名容器镜像](/zh/docs/tasks/administer-cluster/verify-signed-images)。 如需手动验证 Kubernetes 核心组件的签名容器镜像,请参考[验证签名容器镜像](/zh-cn/docs/tasks/administer-cluster/verify-signed-images)。
<!-- <!--
## Binaries ## Binaries
@@ -146,11 +146,11 @@ You can use kubectl to deploy applications, inspect and manage cluster resources
and view logs. For more information including a complete list of kubectl operations, see the and view logs. For more information including a complete list of kubectl operations, see the
[`kubectl` reference documentation](/docs/reference/kubectl/). [`kubectl` reference documentation](/docs/reference/kubectl/).
--> -->
Kubernetes 命令行工具 [kubectl](/zh/docs/reference/kubectl/kubectl/) 允许你对 Kubernetes 集群执行命令。 Kubernetes 命令行工具 [kubectl](/zh-cn/docs/reference/kubectl/kubectl/) 允许你对 Kubernetes 集群执行命令。
你可以使用 kubectl 部署应用程序、检查和管理集群资源以及查看日志。 你可以使用 kubectl 部署应用程序、检查和管理集群资源以及查看日志。
有关更多信息,包括 kubectl 操作的完整列表,请参阅 有关更多信息,包括 kubectl 操作的完整列表,请参阅
[`kubectl` 参考文档](/zh/docs/reference/kubectl/)。 [`kubectl` 参考文档](/zh-cn/docs/reference/kubectl/)。
<!-- <!--
kubectl is installable on a variety of Linux platforms, macOS and Windows. kubectl is installable on a variety of Linux platforms, macOS and Windows.
@@ -163,6 +163,6 @@ Find your preferred operating system below.
kubectl 可安装在各种 Linux 平台、macOS 和 Windows 上。 kubectl 可安装在各种 Linux 平台、macOS 和 Windows 上。
在下方找到你首选的操作系统。 在下方找到你首选的操作系统。
- [在 Linux 上安装 kubectl](/zh/docs/tasks/tools/install-kubectl-linux) - [在 Linux 上安装 kubectl](/zh-cn/docs/tasks/tools/install-kubectl-linux)
- [在 macOS 上安装 kubectl](/zh/docs/tasks/tools/install-kubectl-macos) - [在 macOS 上安装 kubectl](/zh-cn/docs/tasks/tools/install-kubectl-macos)
- [在 Windows 上安装 kubectl](/zh/docs/tasks/tools/install-kubectl-windows) - [在 Windows 上安装 kubectl](/zh-cn/docs/tasks/tools/install-kubectl-windows)
@@ -58,9 +58,9 @@ For more information, see the Kubernetes [patch releases](/releases/patch-releas
适当的修复,包括安全问题修复,可能会被后沿三个发布分支,具体取决于问题的严重性和可行性。 适当的修复,包括安全问题修复,可能会被后沿三个发布分支,具体取决于问题的严重性和可行性。
补丁版本按[常规节奏](https://kubernetes.io/releases/patch-releases/#cadence)从这些分支中删除,并在需要时增加额外的紧急版本。 补丁版本按[常规节奏](https://kubernetes.io/releases/patch-releases/#cadence)从这些分支中删除,并在需要时增加额外的紧急版本。
[发布管理员](/zh/releases/release-managers/)小组拥有这件事的决定权。 [发布管理员](/zh-cn/releases/release-managers/)小组拥有这件事的决定权。
有关更多信息,请参阅 Kubernetes [补丁发布](/zh/releases/patch-releases/)页面。 有关更多信息,请参阅 Kubernetes [补丁发布](/zh-cn/releases/patch-releases/)页面。
<!-- <!--
## Supported version skew ## Supported version skew
@@ -78,7 +78,7 @@ Example:
### kube-apiserver {#kube-apiserver} ### kube-apiserver {#kube-apiserver}
在[高可用性(HA)集群](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/)中, 在[高可用性(HA)集群](/zh-cn/docs/setup/production-environment/tools/kubeadm/high-availability/)中,
最新版和最老版的 `kube-apiserver` 实例版本偏差最多为一个次要版本。 最新版和最老版的 `kube-apiserver` 实例版本偏差最多为一个次要版本。
例如: 例如:
@@ -255,7 +255,7 @@ Pre-requisites:
* 已注册的 admission webhook 能够处理新的 `kube-apiserver` 实例将发送给他们的数据: * 已注册的 admission webhook 能够处理新的 `kube-apiserver` 实例将发送给他们的数据:
* `ValidatingWebhookConfiguration``MutatingWebhookConfiguration` * `ValidatingWebhookConfiguration``MutatingWebhookConfiguration`
对象已更新以包含 **{{< skew currentVersion >}}** 中添加的任何新版本的 REST 资源 对象已更新以包含 **{{< skew currentVersion >}}** 中添加的任何新版本的 REST 资源
(或使用 v1.15+ 中可用的 [`matchPolicy: Equivalent` 选项](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchpolicy) (或使用 v1.15+ 中可用的 [`matchPolicy: Equivalent` 选项](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchpolicy)
* webhook 能够处理将发送给它们的任何新版本的 REST 资源, * webhook 能够处理将发送给它们的任何新版本的 REST 资源,
以及添加到 **{{< skew currentVersion >}}** 中现有版本的任何新字段 以及添加到 **{{< skew currentVersion >}}** 中现有版本的任何新字段
@@ -270,7 +270,7 @@ Project policies for [API deprecation](/docs/reference/using-api/deprecation-pol
[API change guidelines](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md) [API change guidelines](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md)
require `kube-apiserver` to not skip minor versions when upgrading, even in single-instance clusters. require `kube-apiserver` to not skip minor versions when upgrading, even in single-instance clusters.
--> -->
[API 弃用](/zh/docs/reference/using-api/deprecation-policy/)和 [API 弃用](/zh-cn/docs/reference/using-api/deprecation-policy/)和
[API 变更指南](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md) [API 变更指南](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md)
的项目策略要求 `kube-apiserver` 在升级时不跳过次要版本,即使在单实例集群中也是如此。 的项目策略要求 `kube-apiserver` 在升级时不跳过次要版本,即使在单实例集群中也是如此。
{{< /note >}} {{< /note >}}
@@ -318,7 +318,7 @@ Optionally upgrade `kubelet` instances to **{{< skew currentVersion >}}** (or th
Before performing a minor version `kubelet` upgrade, [drain](/docs/tasks/administer-cluster/safely-drain-node/) pods from that node. Before performing a minor version `kubelet` upgrade, [drain](/docs/tasks/administer-cluster/safely-drain-node/) pods from that node.
In-place minor version `kubelet` upgrades are not supported. In-place minor version `kubelet` upgrades are not supported.
--> -->
在执行次要版本 `kubelet` 升级之前,[排空](/zh/docs/tasks/administer-cluster/safely-drain-node/)该节点的 Pod。 在执行次要版本 `kubelet` 升级之前,[排空](/zh-cn/docs/tasks/administer-cluster/safely-drain-node/)该节点的 Pod。
`kubelet` 不支持原地次要版本升级。 `kubelet` 不支持原地次要版本升级。
{{</ note >}} {{</ note >}}
+3 -3
View File
@@ -1,4 +1,4 @@
# i18n strings for the Chinese version of the site (https://kubernetes.io/zh/) # i18n strings for the Chinese version of the site (https://kubernetes.io/zh-cn/)
# 注意:修改此文件时请维持字符串名称的字母顺序并与英文版保持一致 # 注意:修改此文件时请维持字符串名称的字母顺序并与英文版保持一致
[caution] [caution]
@@ -38,7 +38,7 @@ other = " 版本的文档已不再维护。您现在看到的版本来自于一
other = "已过时" other = "已过时"
[dockershim_message] [dockershim_message]
other = """自 1.24 版起,Dockershim 已从 Kubernetes 项目中移除。阅读 <a href="/zh/dockershim">Dockershim 移除的常见问题</a>了解更多详情。""" other = """自 1.24 版起,Dockershim 已从 Kubernetes 项目中移除。阅读 <a href="/zh-cn/dockershim">Dockershim 移除的常见问题</a>了解更多详情。"""
[docs_label_browse] [docs_label_browse]
other = "浏览文档" other = "浏览文档"
@@ -255,7 +255,7 @@ other="""第三方内容建议"""
other = """&#128711; 本条目指向第三方项目或产品,而该项目(产品)不是 Kubernetes 的一部分。<a class="alert-more-info" href="#third-party-content-disclaimer">更多信息</a>""" other = """&#128711; 本条目指向第三方项目或产品,而该项目(产品)不是 Kubernetes 的一部分。<a class="alert-more-info" href="#third-party-content-disclaimer">更多信息</a>"""
[thirdparty_message_disclaimer] [thirdparty_message_disclaimer]
other = """<p>本页面中的条目引用了第三方产品或项目,这些产品(项目)提供了 Kubernetes 所需的功能。Kubernetes 项目的开发人员不对这些第三方产品(项目)负责。请参阅<a href="https://github.com/cncf/foundation/blob/master/website-guidelines.md" target="_blank">CNCF 网站指南</a>了解更多细节。</p><p>在提交更改建议,向本页添加新的第三方链接之前,你应该先阅读<a href="/zh/docs/contribute/style/content-guide/#third-party-content">内容指南。</p>""" other = """<p>本页面中的条目引用了第三方产品或项目,这些产品(项目)提供了 Kubernetes 所需的功能。Kubernetes 项目的开发人员不对这些第三方产品(项目)负责。请参阅<a href="https://github.com/cncf/foundation/blob/master/website-guidelines.md" target="_blank">CNCF 网站指南</a>了解更多细节。</p><p>在提交更改建议,向本页添加新的第三方链接之前,你应该先阅读<a href="/zh-cn/docs/contribute/style/content-guide/#third-party-content">内容指南。</p>"""
[ui_search_placeholder] [ui_search_placeholder]
other = "搜索" other = "搜索"
+2 -2
View File
@@ -147,11 +147,11 @@ since a localized version has been committed.
The following example checks a single file: The following example checks a single file:
./scripts/lsync.sh content/zh/docs/concepts/_index.md ./scripts/lsync.sh content/zh-cn/docs/concepts/_index.md
The following command checks a subdirectory: The following command checks a subdirectory:
./scripts/lsync.sh content/zh/docs/concepts/ ./scripts/lsync.sh content/zh-cn/docs/concepts/
## check-ctrlcode.py ## check-ctrlcode.py
+2 -2
View File
@@ -4,7 +4,7 @@
# #
# If the language to check is not English (`en`), we check if you are actually # If the language to check is not English (`en`), we check if you are actually
# using the localized links. For example, if you checking # using the localized links. For example, if you checking
# `content/zh/docs/foo/bar`, we check if the English version exists AND if the # `content/zh-cn/docs/foo/bar`, we check if the English version exists AND if the
# Chinese version exists as well. A checking record is produced if the link # Chinese version exists as well. A checking record is produced if the link
# can use the localized version. # can use the localized version.
# #
@@ -462,7 +462,7 @@ def main():
if len(parts) != 3 or parts[0] != "content": if len(parts) != 3 or parts[0] != "content":
print("ERROR:\nPlease specify file pattern in the format " print("ERROR:\nPlease specify file pattern in the format "
"'content/<lang>/<path-pattern>', for example:\n" "'content/<lang>/<path-pattern>', for example:\n"
"'content/zh/docs/concepts/**/*.md'\n") "'content/zh-cn/docs/concepts/**/*.md'\n")
PARSER.print_help() PARSER.print_help()
sys.exit(-1) sys.exit(-1)
+1 -1
View File
@@ -7,7 +7,7 @@ if [ "$#" -ne 1 ] ; then
echo -e "\nThis script checks if the English version of a page has changed since a " >&2 echo -e "\nThis script checks if the English version of a page has changed since a " >&2
echo -e "localized page has been committed.\n" >&2 echo -e "localized page has been committed.\n" >&2
echo -e "Usage:\n\t$0 <PATH>\n" >&2 echo -e "Usage:\n\t$0 <PATH>\n" >&2
echo -e "Example:\n\t$0 content/zh/docs/concepts/_index.md\n" >&2 echo -e "Example:\n\t$0 content/zh-cn/docs/concepts/_index.md\n" >&2
exit 1 exit 1
fi fi