[zh] Sync localization.md

This commit is contained in:
Sean Wei
2022-05-19 12:55:20 +08:00
parent b026c3a896
commit 3d2670abf6
+38 -30
View File
@@ -36,7 +36,7 @@ This page shows you how to [localize](https://blog.mozilla.org/l10n/2011/12/14/i
You can help add or improve content to an existing localization. In [Kubernetes Slack](https://slack.k8s.io/) you'll find a channel for each localization. There is also a general [SIG Docs Localizations Slack channel](https://kubernetes.slack.com/messages/sig-docs-localizations) where you can say hello. You can help add or improve content to an existing localization. In [Kubernetes Slack](https://slack.k8s.io/) you'll find a channel for each localization. There is also a general [SIG Docs Localizations Slack channel](https://kubernetes.slack.com/messages/sig-docs-localizations) where you can say hello.
--> -->
## 为现有的本地化做出贡献 ## 为现有的本地化做出贡献 {#contribute-to-an-existing-localization}
你可以帮助添加或改进现有本地化的内容。在 [Kubernetes Slack](https://slack.k8s.io/) 中, 你可以帮助添加或改进现有本地化的内容。在 [Kubernetes Slack](https://slack.k8s.io/) 中,
你能找到每个本地化的频道。还有一个通用的 你能找到每个本地化的频道。还有一个通用的
@@ -64,7 +64,7 @@ First, [create your own fork](/docs/contribute/new-content/open-a-pr/#fork-the-r
The website content directory includes sub-directories for each language. The localization you want to help out with is inside `content/<two-letter-code>`. The website content directory includes sub-directories for each language. The localization you want to help out with is inside `content/<two-letter-code>`.
--> -->
### 找到两个字母的语言代码 ### 找到两个字母的语言代码 {#find-your-two-letter-language-code}
首先,有关本地化的两个字母的语言代码,请参考 首先,有关本地化的两个字母的语言代码,请参考
[ISO 639-1 标准](https://www.loc.gov/standards/iso639-2/php/code_list.php)。 [ISO 639-1 标准](https://www.loc.gov/standards/iso639-2/php/code_list.php)。
@@ -85,6 +85,9 @@ git clone https://github.com/<username>/website
cd website cd website
``` ```
<!--
The website content directory includes sub-directories for each language. The localization you want to help out with is inside `content/<two-letter-code>`.
-->
网站内容目录包括每种语言的子目录。你想要助力的本地化位于 `content/<two-letter-code>` 中。 网站内容目录包括每种语言的子目录。你想要助力的本地化位于 `content/<two-letter-code>` 中。
<!-- <!--
@@ -128,7 +131,7 @@ to begin a localization.
All localization teams must be self-sustaining. The Kubernetes website is happy to host your work, but All localization teams must be self-sustaining. The Kubernetes website is happy to host your work, but
it's up to you to translate it and keep existing localized content current. it's up to you to translate it and keep existing localized content current.
--> -->
## 开始新的本地化 ## 开始新的本地化 {#start-a-new-localization}
如果你希望将 Kubernetes 文档本地化为一种新语言,你需要执行以下操作。 如果你希望将 Kubernetes 文档本地化为一种新语言,你需要执行以下操作。
@@ -165,7 +168,7 @@ SIG Docs 可以帮助你在单独的分支上工作,以便你可以逐步实
Let Kubernetes SIG Docs know you're interested in creating a localization! Join the [SIG Docs Slack channel](https://kubernetes.slack.com/messages/sig-docs) and the [SIG Docs Localizations Slack channel](https://kubernetes.slack.com/messages/sig-docs-localizations). Other localization teams are happy to help you get started and answer any questions you have. Let Kubernetes SIG Docs know you're interested in creating a localization! Join the [SIG Docs Slack channel](https://kubernetes.slack.com/messages/sig-docs) and the [SIG Docs Localizations Slack channel](https://kubernetes.slack.com/messages/sig-docs-localizations). Other localization teams are happy to help you get started and answer any questions you have.
--> -->
### 找到社区 ### 找到社区 {#find-community}
让 Kubernetes SIG Docs 知道你有兴趣创建本地化! 让 Kubernetes SIG Docs 知道你有兴趣创建本地化!
加入 [SIG Docs Slack 频道](https://kubernetes.slack.com/messages/sig-docs) 加入 [SIG Docs Slack 频道](https://kubernetes.slack.com/messages/sig-docs)
@@ -192,9 +195,10 @@ SIG Docs 本地化小组的任务是与 SIG Docs 本地化团队合作,
<!-- <!--
### Join the Kubernetes GitHub organization ### Join the Kubernetes GitHub organization
Once you've opened a localization PR, you can become members of the Kubernetes GitHub organization. Each person on the team needs to create their own [Organization Membership Request](https://github.com/kubernetes/org/issues/new/choose) in the `kubernetes/org` repository. Once you've opened a localization PR, you can become members of the Kubernetes GitHub organization. Each person on the team needs to create their own [Organization Membership Request](https://github.com/kubernetes/org/issues/new/choose) in the `kubernetes/org` repository.
--> -->
### 加入到 Kubernetes GitHub 组织 ### 加入到 Kubernetes GitHub 组织 {#join-the-kubernetes-github-organization}
提交本地化 PR 后,你可以成为 Kubernetes GitHub 组织的成员。 提交本地化 PR 后,你可以成为 Kubernetes GitHub 组织的成员。
团队中的每个人都需要在 `kubernetes/org` 仓库中创建自己的 团队中的每个人都需要在 `kubernetes/org` 仓库中创建自己的
@@ -207,7 +211,7 @@ Next, add your Kubernetes localization team to [`sig-docs/teams.yaml`](https://g
Members of `@kubernetes/sig-docs-**-owners` can approve PRs that change content within (and only within) your localization directory: `/content/**/`. Members of `@kubernetes/sig-docs-**-owners` can approve PRs that change content within (and only within) your localization directory: `/content/**/`.
The `@kubernetes/sig-docs-**-reviews` team automates review assignment for new PRs. For each localization, The `@kubernetes/sig-docs-**-reviews` team automates review assignment for new PRs.
--> -->
### 在 GitHub 中添加你的本地化团队 {#add-your-localization-team-in-github} ### 在 GitHub 中添加你的本地化团队 {#add-your-localization-team-in-github}
@@ -217,12 +221,12 @@ The `@kubernetes/sig-docs-**-reviews` team automates review assignment for new P
`@kubernetes/sig-docs-**-owners` 成员可以批准更改对应本地化目录 `/content/**/` 中内容的 PR,并仅限这类 PR。 `@kubernetes/sig-docs-**-owners` 成员可以批准更改对应本地化目录 `/content/**/` 中内容的 PR,并仅限这类 PR。
`@kubernetes/sig-docs-**-reviews` 团队被自动分派新 PR 的审阅任务。 对于每个本地化,`@kubernetes/sig-docs-**-reviews` 团队被自动分派新 PR 的审阅任务。
<!-- <!--
Members of `@kubernetes/website-maintainers` can create new localization branches to coordinate translation efforts. Members of `@kubernetes/website-maintainers` can create new localization branches to coordinate translation efforts.
Members of `website-milestone-maintainers` can use the `/milestone` [Prow command](https://prow.k8s.io/command-help) to assign a milestone to issues or PRs. Members of `@kubernetes/website-milestone-maintainers` can use the `/milestone` [Prow command](https://prow.k8s.io/command-help) to assign a milestone to issues or PRs.
--> -->
`@kubernetes/website-maintainers` 成员可以创建新的本地化分支来协调翻译工作。 `@kubernetes/website-maintainers` 成员可以创建新的本地化分支来协调翻译工作。
@@ -253,9 +257,7 @@ The Kubernetes website uses Hugo as its web framework. The website's Hugo config
Add a configuration block for the new language to `config.toml`, under the existing `[languages]` block. The German block, for example, looks like: Add a configuration block for the new language to `config.toml`, under the existing `[languages]` block. The German block, for example, looks like:
--> -->
## 最低要求内容 {#minimum-required-content} ### 修改站点配置 {#configure-the-workflow}
### 修改站点配置
Kubernetes 网站使用 Hugo 作为其 Web 框架。网站的 Hugo 配置位于 Kubernetes 网站使用 Hugo 作为其 Web 框架。网站的 Hugo 配置位于
[`config.toml`](https://github.com/kubernetes/website/tree/main/config.toml)文件中。 [`config.toml`](https://github.com/kubernetes/website/tree/main/config.toml)文件中。
@@ -296,9 +298,9 @@ For more information about Hugo's multilingual support, see "[Multilingual Mode]
<!-- <!--
### Add a new localization directory ### Add a new localization directory
Add a language-specific subdirectory to the [`content`](https://github.com/kubernetes/website/tree/master/content) folder in the repository. For example, the two-letter code for German is `de`: Add a language-specific subdirectory to the [`content`](https://github.com/kubernetes/website/tree/main/content) folder in the repository. For example, the two-letter code for German is `de`:
--> -->
### 添加一个新的本地化目录 ### 添加一个新的本地化目录 {#add-a-new-localization-directory}
将特定语言的子目录添加到仓库中的 将特定语言的子目录添加到仓库中的
[`content`](https://github.com/kubernetes/website/tree/main/content) 文件夹下。 [`content`](https://github.com/kubernetes/website/tree/main/content) 文件夹下。
@@ -334,7 +336,7 @@ For example, for German the strings live in `data/i18n/de/de.toml`, and
Open a PR against the [`cncf/foundation`](https://github.com/cncf/foundation/tree/master/code-of-conduct-languages) repository to add the code of conduct in your language. Open a PR against the [`cncf/foundation`](https://github.com/cncf/foundation/tree/master/code-of-conduct-languages) repository to add the code of conduct in your language.
--> -->
### 本地化社区行为准则 ### 本地化社区行为准则 {#localize-the-community-code-of-conduct}
在 [`cncf/foundation`](https://github.com/cncf/foundation/tree/master/code-of-conduct-languages) 在 [`cncf/foundation`](https://github.com/cncf/foundation/tree/master/code-of-conduct-languages)
仓库提交 PR,添加你所用语言版本的行为准则。 仓库提交 PR,添加你所用语言版本的行为准则。
@@ -349,7 +351,7 @@ To set the roles of each user contributing to the localization, create an `OWNER
- **approvers**: A list of kubernetes teams with approvers roles, in this case, the `sig-docs-**-owners` team created in [Add your localization team in GitHub](#add-your-localization-team-in-github). - **approvers**: A list of kubernetes teams with approvers roles, in this case, the `sig-docs-**-owners` team created in [Add your localization team in GitHub](#add-your-localization-team-in-github).
- **labels**: A list of GitHub labels to automatically apply to a PR, in this case, the language label created in [Configure the workflow](#configure-the-workflow). - **labels**: A list of GitHub labels to automatically apply to a PR, in this case, the language label created in [Configure the workflow](#configure-the-workflow).
--> -->
### 设置 OWNERS 文件 ### 设置 OWNERS 文件 {#setting-up-the-owners-files}
要设置每个对本地化做出贡献用户的角色,请在特定于语言的子目录内创建一个 `OWNERS` 文件,其中: 要设置每个对本地化做出贡献用户的角色,请在特定于语言的子目录内创建一个 `OWNERS` 文件,其中:
@@ -450,7 +452,7 @@ Provide guidance to localization contributors in the localized `README-**.md` fi
- A point of contact for the localization project - A point of contact for the localization project
- Any information specific to the localization - Any information specific to the localization
--> -->
### 添加本地化的 README 文件 ### 添加本地化的 README 文件 {#add-a-localized-readme-file}
为了指导其他本地化贡献者,请在 [k/website](https://github.com/kubernetes/website/) 为了指导其他本地化贡献者,请在 [k/website](https://github.com/kubernetes/website/)
的根目录添加一个新的 [`README-**.md`](https://help.github.com/articles/about-readmes/) 的根目录添加一个新的 [`README-**.md`](https://help.github.com/articles/about-readmes/)
@@ -476,7 +478,7 @@ Once a localization meets requirements for workflow and minimum output, SIG Docs
- Enable language selection on the website - Enable language selection on the website
- Publicize the localization's availability through [Cloud Native Computing Foundation](https://www.cncf.io/about/) (CNCF) channels, including the [Kubernetes blog](https://kubernetes.io/blog/). - Publicize the localization's availability through [Cloud Native Computing Foundation](https://www.cncf.io/about/) (CNCF) channels, including the [Kubernetes blog](https://kubernetes.io/blog/).
--> -->
### 启动你的新本地化 ### 启动你的新本地化 {#add-a-localized-readme-file}
一旦本地化满足工作流程和最小输出的要求,SIG Docs 将: 一旦本地化满足工作流程和最小输出的要求,SIG Docs 将:
@@ -488,13 +490,18 @@ Once a localization meets requirements for workflow and minimum output, SIG Docs
## Translating content ## Translating content
Localizing *all* of the Kubernetes documentation is an enormous task. It's okay to start small and expand over time. Localizing *all* of the Kubernetes documentation is an enormous task. It's okay to start small and expand over time.
At a minimum, all localizations must include:
--> -->
## 翻译文档 {#translating-content} ## 翻译文档 {#translating-content}
本地化*所有* Kubernetes 文档是一项艰巨的任务。从小做起,循序渐进。 本地化*所有* Kubernetes 文档是一项艰巨的任务。从小做起,循序渐进。
<!--
### Minimum required content
At a minimum, all localizations must include:
-->
### 最低要求内容 {#minimum-required-content}
所有本地化至少必须包括: 所有本地化至少必须包括:
<!-- <!--
@@ -513,6 +520,7 @@ Releases | [All heading and subheading URLs](/releases)
教程 | [Kubernetes 基础](/zh/docs/tutorials/kubernetes-basics/), [Hello Minikube](/zh/docs/tutorials/hello-minikube/) 教程 | [Kubernetes 基础](/zh/docs/tutorials/kubernetes-basics/), [Hello Minikube](/zh/docs/tutorials/hello-minikube/)
网站字符串 | [所有网站字符串](#Site-strings-in-i18n) 网站字符串 | [所有网站字符串](#Site-strings-in-i18n)
发行版本 | [所有标题和副标题 URL](/releases) 发行版本 | [所有标题和副标题 URL](/releases)
<!-- <!--
Translated documents must reside in their own `content/**/` subdirectory, but otherwise follow the same URL path as the English source. For example, to prepare the [Kubernetes Basics](/docs/tutorials/kubernetes-basics/) tutorial for translation into German, create a subfolder under the `content/de/` folder and copy the English source: Translated documents must reside in their own `content/**/` subdirectory, but otherwise follow the same URL path as the English source. For example, to prepare the [Kubernetes Basics](/docs/tutorials/kubernetes-basics/) tutorial for translation into German, create a subfolder under the `content/de/` folder and copy the English source:
--> -->
@@ -531,10 +539,10 @@ Translation tools can speed up the translation process. For example, some editor
翻译工具可以加快翻译过程。例如,某些编辑器提供了用于快速翻译文本的插件。 翻译工具可以加快翻译过程。例如,某些编辑器提供了用于快速翻译文本的插件。
<!-- <!--
Machine-generated translation alone does not meet the minimum standard of quality and requires extensive human review to meet that standard. Machine-generated translation is insufficient on its own. Localization requires extensive human review to meet minimum standards of quality.
--> -->
{{< caution >}} {{< caution >}}
机器生成的翻译不能达到最低质量标准,需要进行大量人工审才能达到该标准。 机器生成的翻译本身是不够的,本地化需要广泛的人工审才能满足最低质量标准。
{{< /caution >}} {{< /caution >}}
<!-- <!--
@@ -558,9 +566,9 @@ To find source files for your target version:
Previous version | [`release-{{< skew prevMinorVersion >}}`](https://github.com/kubernetes/website/tree/release-{{< skew prevMinorVersion >}}) Previous version | [`release-{{< skew prevMinorVersion >}}`](https://github.com/kubernetes/website/tree/release-{{< skew prevMinorVersion >}})
Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}}) Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
The `master` branch holds content for the current release `{{< latest-version >}}`. The release team will create `{{< release-branch >}}` branch before the next release: v{{< skew nextMinorVersion >}}. The `main` branch holds content for the current release `{{< latest-version >}}`. The release team will create a `{{< release-branch >}}` branch before the next release: v{{< skew nextMinorVersion >}}.
--> -->
### 源文件 ### 源文件 {#source-files}
本地化必须基于本地化团队所针对的特定发行版本中的英文文件。 本地化必须基于本地化团队所针对的特定发行版本中的英文文件。
每个本地化团队可以决定要针对哪个发行版本,在下文中称作目标版本(target version)。) 每个本地化团队可以决定要针对哪个发行版本,在下文中称作目标版本(target version)。)
@@ -581,19 +589,19 @@ The `master` branch holds content for the current release `{{< latest-version >}
`{{< release-branch >}}` 分支。 `{{< release-branch >}}` 分支。
<!-- <!--
### Site strings in i18n/ ### Site strings in i18n
Localizations must include the contents of [`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/master/i18n/en.toml) in a new language-specific file. Using German as an example: `data/i18n/de/de.toml`. Localizations must include the contents of [`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/data/i18n/en/en.toml) in a new language-specific file. Using German as an example: `data/i18n/de/de.toml`.
Add a new localization file to `i18n/`. For example, with German (`de`): Add a new localization directory and file to `data/i18n/`. For example, with German (`de`):
--> -->
### i18n/ 中的网站字符串 {#site-strings-in-i18n} ### i18n/ 中的网站字符串 {#site-strings-in-i18n}
本地化必须在新的语言特定文件中包含 本地化必须在新的语言特定文件中包含
[`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/master/i18n/en.toml) [`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/data/i18n/en/en.toml)
的内容。以德语为例:`data/i18n/de/de.toml` 的内容。以德语为例:`data/i18n/de/de.toml`
将新的本地化文件添加到 `i18n/`。例如德语 (`de`) 将新的本地化文件和目录添加到 `data/i18n/`。例如德语 (`de`)
```bash ```bash
mkdir -p data/i18n/de mkdir -p data/i18n/de
@@ -623,7 +631,7 @@ Localizing site strings lets you customize site-wide text and features: for exam
Some language teams have their own language-specific style guide and glossary. For example, see the [Korean Localization Guide](/ko/docs/contribute/localization_ko/). Some language teams have their own language-specific style guide and glossary. For example, see the [Korean Localization Guide](/ko/docs/contribute/localization_ko/).
--> -->
### 特定语言的样式指南和词汇表 ### 特定语言的样式指南和词汇表 {#language-specific-style-guide-and-glossary}
一些语言团队有自己的特定语言样式指南和词汇表。 一些语言团队有自己的特定语言样式指南和词汇表。
例如,请参见[中文本地化指南](/zh/docs/contribute/localization_zh/)。 例如,请参见[中文本地化指南](/zh/docs/contribute/localization_zh/)。
@@ -637,7 +645,7 @@ Per CNCF policy, the localization teams must upload their meetings to the SIG Do
--> -->
### 特定语言的 Zoom 会议 ### 特定语言的 Zoom 会议 {#language-specific-zoom-meetings}
如果本地化项目需要单独的会议时间, 如果本地化项目需要单独的会议时间,
请联系 SIG Docs 联合主席或技术主管以创建新的重复 Zoom 会议和日历邀请。 请联系 SIG Docs 联合主席或技术主管以创建新的重复 Zoom 会议和日历邀请。