Skip to content

Commit 56ae781

Browse files
committed
[zh-cn]sync localization.md
Signed-off-by: xin.li <[email protected]>
1 parent 94b01e8 commit 56ae781

File tree

1 file changed

+59
-46
lines changed

1 file changed

+59
-46
lines changed

content/zh-cn/docs/contribute/localization.md

Lines changed: 59 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ where you can say hello.
4343
-->
4444
## 为现有的本地化做出贡献 {#contribute-to-an-existing-localization}
4545

46-
你可以帮助添加或改进现有本地化的内容。在 [Kubernetes Slack](https://slack.k8s.io/) 中,
47-
你能找到每个本地化的频道。还有一个通用的
46+
你可以帮助添加或改进现有本地化的内容。在 [Kubernetes Slack](https://slack.k8s.io/)
47+
中,你能找到每个本地化的频道。还有一个通用的
4848
[SIG Docs Localizations Slack 频道](https://kubernetes.slack.com/messages/sig-docs-localizations)
4949
你可以在这里打个招呼。
5050

@@ -113,13 +113,6 @@ Create or update your chosen localized page based on the English original. See
113113
If you notice a technical inaccuracy or other problem with the upstream
114114
(English) documentation, you should fix the upstream documentation first and
115115
then repeat the equivalent fix by updating the localization you're working on.
116-
117-
Limit changes in a pull requests to a single localization. Reviewing pull
118-
requests that change content in multiple localizations is problematic.
119-
120-
Follow [Suggesting Content Improvements](/docs/contribute/suggesting-improvements/)
121-
to propose changes to that localization. The process is similar to proposing
122-
changes to the upstream (English) content.
123116
-->
124117
### 建议更改 {#suggest-changes}
125118

@@ -129,6 +122,14 @@ changes to the upstream (English) content.
129122
如果你发现上游(英文)文档存在技术错误或其他问题,
130123
你应该先修复上游文档,然后通过更新你正在处理的本地化来重复等效的修复。
131124

125+
<!--
126+
Limit changes in a pull requests to a single localization. Reviewing pull
127+
requests that change content in multiple localizations is problematic.
128+
129+
Follow [Suggesting Content Improvements](/docs/contribute/suggesting-improvements/)
130+
to propose changes to that localization. The process is similar to proposing
131+
changes to the upstream (English) content.
132+
-->
132133
请将 PR 限制为单个语言版本,因为多语言的 PR 内容修改可能难以审查。
133134

134135
按照[内容改进建议](/zh-cn/docs/contribute/suggesting-improvements/)提出对该本地化的更改。
@@ -201,8 +202,8 @@ questions.
201202
### 找到社区 {#find-community}
202203

203204
让 Kubernetes SIG Docs 知道你有兴趣创建本地化!
204-
加入 [SIG Docs Slack 频道](https://kubernetes.slack.com/messages/sig-docs)
205-
[SIG Docs Localizations Slack 频道](https://kubernetes.slack.com/messages/sig-docs-localizations)
205+
加入 [SIG Docs Slack 频道](https://kubernetes.slack.com/messages/sig-docs)
206+
[SIG Docs Localizations Slack 频道](https://kubernetes.slack.com/messages/sig-docs-localizations)
206207
其他本地化团队很乐意帮助你入门并回答你的问题。
207208

208209
<!--
@@ -240,7 +241,7 @@ GitHub organization. Each person on the team needs to create their own
240241
[Organization Membership Request](https://github.com/kubernetes/org/issues/new/choose)
241242
in the `kubernetes/org` repository.
242243
-->
243-
### 加入到 Kubernetes GitHub 组织 {#join-the-kubernetes-github-organization}
244+
### 加入到 Kubernetes GitHub 组织 {#join-the-kubernetes-github-organization}
244245

245246
提交本地化 PR 后,你可以成为 Kubernetes GitHub 组织的成员。
246247
团队中的每个人都需要在 `kubernetes/org`
@@ -253,7 +254,14 @@ Next, add your Kubernetes localization team to
253254
[`sig-docs/teams.yaml`](https://github.com/kubernetes/org/blob/main/config/kubernetes/sig-docs/teams.yaml).
254255
For an example of adding a localization team, see the PR to add the
255256
[Spanish localization team](https://github.com/kubernetes/org/pull/685).
257+
-->
258+
### 在 GitHub 中添加你的本地化团队 {#add-your-localization-team-in-github}
259+
260+
接下来,将你的 Kubernetes 本地化团队添加到
261+
[`sig-docs/teams.yaml`](https://github.com/kubernetes/org/blob/main/config/kubernetes/sig-docs/teams.yaml)
262+
有关添加本地化团队的示例,请参见添加[西班牙本地化团队](https://github.com/kubernetes/org/pull/685)的 PR。
256263

264+
<!--
257265
Members of `@kubernetes/sig-docs-**-owners` can approve PRs that change content
258266
within (and only within) your localization directory: `/content/**/`. For each
259267
localization, The `@kubernetes/sig-docs-**-reviews` team automates review
@@ -262,12 +270,6 @@ new localization branches to coordinate translation efforts. Members of
262270
`@kubernetes/website-milestone-maintainers` can use the `/milestone`
263271
[Prow command](https://prow.k8s.io/command-help) to assign a milestone to issues or PRs.
264272
-->
265-
### 在 GitHub 中添加你的本地化团队 {#add-your-localization-team-in-github}
266-
267-
接下来,将你的 Kubernetes 本地化团队添加到
268-
[`sig-docs/teams.yaml`](https://github.com/kubernetes/org/blob/main/config/kubernetes/sig-docs/teams.yaml)
269-
有关添加本地化团队的示例,请参见添加[西班牙本地化团队](https://github.com/kubernetes/org/pull/685)的 PR。
270-
271273
`@kubernetes/sig-docs-**-owners` 成员可以批准更改对应本地化目录 `/content/**/` 中内容的 PR,并仅限这类 PR。
272274
对于每个本地化,`@kubernetes/sig-docs-**-reviews` 团队被自动分派新 PR 的审阅任务。
273275
`@kubernetes/website-maintainers` 成员可以创建新的本地化分支来协调翻译工作。
@@ -314,11 +316,16 @@ Kubernetes 网站使用 Hugo 作为其 Web 框架。网站的 Hugo 配置位于
314316
```toml
315317
[languages.de]
316318
title = "Kubernetes"
317-
description = "Produktionsreife Container-Verwaltung"
318319
languageName = "Deutsch (German)"
319-
languageNameLatinScript = "Deutsch"
320+
weight = 5
320321
contentDir = "content/de"
321-
weight = 8
322+
languagedirection = "ltr"
323+
324+
[languages.de.params]
325+
time_format_blog = "02.01.2006"
326+
language_alternatives = ["en"]
327+
description = "Produktionsreife Container-Orchestrierung"
328+
languageNameLatinScript = "Deutsch"
322329
```
323330

324331
<!--
@@ -377,24 +384,16 @@ mkdir content/de
377384
```
378385

379386
<!--
380-
You also need to create a directory inside `data/i18n` for
387+
You also need to create a directory inside `i18n` for
381388
[localized strings](#site-strings-in-i18n); look at existing localizations
382-
for an example. To use these new strings, you must also create a symbolic link
383-
from `i18n/<localization>.toml` to the actual string configuration in
384-
`data/i18n/<localization>/<localization>.toml` (remember to commit the symbolic
385-
link).
389+
for an example.
386390
387-
For example, for German the strings live in `data/i18n/de/de.toml`, and
388-
`i18n/de.toml` is a symbolic link to `data/i18n/de/de.toml`.
391+
For example, for German the strings live in `i18n/de/de.toml`.
389392
-->
390-
你还需要在 `data/i18n` 中为[本地化字符串](#site-strings-in-i18n)创建一个目录;
391-
以现有的本地化为例。要使用这些新字符串,
392-
你还必须创建从 `i18n/<localization>.toml`
393-
`data/i18n/<localization>/<localization>.toml`
394-
中实际字符串配置的符号链接(记得提交符号链接关联)。
393+
你还需要在 `i18n` 中为[本地化字符串](#site-strings-in-i18n)创建一个目录;
394+
以现有的本地化为例。
395395

396-
例如,对于德语,字符串位于 `data/i18n/de/de.toml` 中,
397-
`i18n/de.toml` 是指向 `data/i18n/de/de.toml` 的符号链接。
396+
例如,对于德语,字符串位于 `i18n/de/de.toml`
398397

399398
<!--
400399
### Localize the community code of conduct
@@ -446,13 +445,25 @@ language code `es`, looks like this:
446445
语言代码为 `es`[西班牙语 OWNERS 文件](https://git.k8s.io/website/content/es/OWNERS)看起来像:
447446

448447
<!--
448+
```yaml
449449
# See the OWNERS docs at https://go.k8s.io/owners
450450
451451
# This is the localization project for Spanish.
452452
# Teams and members are visible at https://github.com/orgs/kubernetes/teams.
453+
454+
reviewers:
455+
- sig-docs-es-reviews
456+
457+
approvers:
458+
- sig-docs-es-owners
459+
460+
labels:
461+
- area/localization
462+
- language/es
463+
```
453464
-->
454465
```yaml
455-
# 参见 OWNERS 文档,位于 https://go.k8s.io/owners
466+
# 参见 OWNERS 文档https://go.k8s.io/owners
456467

457468
# 这是西班牙语的本地化项目
458469
# 各团队和成员名单位于 https://github.com/orgs/kubernetes/teams
@@ -464,6 +475,7 @@ approvers:
464475
- sig-docs-es-owners
465476

466477
labels:
478+
- area/localization
467479
- language/es
468480
```
469481
@@ -479,7 +491,8 @@ in alphabetical order.
479491
-->
480492
添加了特定语言的 OWNERS 文件之后,使用新的 Kubernetes 本地化团队、
481493
`sig-docs-**-owners` 和 `sig-docs-**-reviews`
482-
列表更新[根目录下的 OWNERS_ALIAES](https://git.k8s.io/website/OWNERS_ALIASES) 文件。
494+
列表更新[根目录下的 OWNERS_ALIAES](https://git.k8s.io/website/OWNERS_ALIASES)
495+
文件。
483496

484497
对于每个团队,
485498
请按字母顺序添加[在 GitHub 中添加你的本地化团队](#add-your-localization-team-in-github)中所请求的
@@ -613,7 +626,7 @@ Releases | [All heading and subheading URLs](/releases)
613626
-----|-----
614627
主页 | [所有标题和副标题网址](/zh-cn/docs/home/)
615628
安装 | [所有标题和副标题网址](/zh-cn/docs/setup/)
616-
教程 | [Kubernetes 基础](/zh-cn/docs/tutorials/kubernetes-basics/), [Hello Minikube](/zh-cn/docs/tutorials/hello-minikube/)
629+
教程 | [Kubernetes 基础](/zh-cn/docs/tutorials/kubernetes-basics/)[Hello Minikube](/zh-cn/docs/tutorials/hello-minikube/)
617630
网站字符串 | [所有网站字符串](#site-strings-in-i18n)
618631
发行版本 | [所有标题和副标题 URL](/zh-cn/releases)
619632

@@ -776,24 +789,24 @@ release: v{{< skew nextMinorVersion >}}.
776789
### Site strings in i18n
777790

778791
Localizations must include the contents of
779-
[`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/data/i18n/en/en.toml)
792+
[`i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/i18n/en/en.toml)
780793
in a new language-specific file. Using German as an example:
781-
`data/i18n/de/de.toml`.
794+
`i18n/de/de.toml`.
782795

783-
Add a new localization directory and file to `data/i18n/`. For example, with
796+
Add a new localization directory and file to `i18n/`. For example, with
784797
German (`de`):
785798
-->
786799
### i18n/ 中的网站字符串 {#site-strings-in-i18n}
787800

788801
本地化必须在新的语言特定文件中包含
789-
[`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/data/i18n/en/en.toml)
790-
的内容。以德语为例:`data/i18n/de/de.toml`。
802+
[`i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/i18n/en/en.toml)
803+
的内容。以德语为例:`i18n/de/de.toml`。
791804

792-
将新的本地化文件和目录添加到 `data/i18n/`。例如德语(`de`):
805+
将新的本地化文件和目录添加到 `i18n/`。例如德语(`de`):
793806

794807
```bash
795-
mkdir -p data/i18n/de
796-
cp data/i18n/en/en.toml data/i18n/de/de.toml
808+
mkdir -p i18n/de
809+
cp i18n/en/en.toml i18n/de/de.toml
797810
```
798811

799812
<!--

0 commit comments

Comments
 (0)