Skip to content

Commit 359d7f2

Browse files
committed
[zh] sync /contribute/localization.md
1 parent 1eabaee commit 359d7f2

File tree

1 file changed

+108
-26
lines changed

1 file changed

+108
-26
lines changed

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

Lines changed: 108 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ language code is `pt-br`.
7777
一些语言使用 ISO-3166 定义的国家代码的小写版本及其语言代码。
7878
例如,巴西葡萄牙语代码是 `pt-br`
7979

80-
8180
<!--
8281
### Fork and clone the repo
8382
@@ -87,8 +86,8 @@ fork](/docs/contribute/new-content/open-a-pr/#fork-the-repo) of the
8786
-->
8887
### 派生(fork)并且克隆仓库 {#fork-and-clone-the-repo}
8988

90-
首先,为 [kubernetes/website](https://github.com/kubernetes/website) 仓库
91-
[创建你自己的副本](/zh-cn/docs/contribute/new-content/open-a-pr/#fork-the-repo)
89+
首先,为 [kubernetes/website](https://github.com/kubernetes/website)
90+
仓库[创建你自己的副本](/zh-cn/docs/contribute/new-content/open-a-pr/#fork-the-repo)
9291

9392
<!--
9493
Then, clone your fork and `cd` into it:
@@ -274,7 +273,7 @@ new localization branches to coordinate translation efforts. Members of
274273
对于每个本地化,`@kubernetes/sig-docs-**-reviews` 团队被自动分派新 PR 的审阅任务。
275274
`@kubernetes/website-maintainers` 成员可以创建新的本地化分支来协调翻译工作。
276275
`@kubernetes/website-milestone-maintainers` 成员可以使用 `/milestone`
277-
[Prow 命令](https://prow.k8s.io/command-help)issues 或 PR 设定里程碑。
276+
[Prow 命令](https://prow.k8s.io/command-help)Issue 或 PR 设定里程碑。
278277

279278
<!--
280279
### Configure the workflow
@@ -289,7 +288,7 @@ For an example of adding a label, see the PR for adding the
289288
### 配置工作流程 {#configure-the-workflow}
290289

291290
接下来,在 `kubernetes/test-infra` 仓库中为你的本地化添加一个 GitHub 标签。
292-
标签可让你过滤 issues 和针对特定语言的 PR。
291+
标签可让你过滤 Issue 和针对特定语言的 PR。
293292

294293
有关添加标签的示例,请参见添加[意大利语标签](https://github.com/kubernetes/test-infra/pull/11316)的 PR。
295294

@@ -307,7 +306,7 @@ existing `[languages]` block. The German block, for example, looks like:
307306
### 修改站点配置 {#configure-the-workflow}
308307

309308
Kubernetes 网站使用 Hugo 作为其 Web 框架。网站的 Hugo 配置位于
310-
[`hugo.toml`](https://github.com/kubernetes/website/tree/main/hugo.toml)文件中。
309+
[`hugo.toml`](https://github.com/kubernetes/website/tree/main/hugo.toml) 文件中。
311310
为了支持新的本地化,你需要修改 `hugo.toml`
312311

313312
在现有的 `[languages]` 下,将新语言的配置添加到 `hugo.toml` 中。
@@ -381,7 +380,7 @@ link).
381380
For example, for German the strings live in `data/i18n/de/de.toml`, and
382381
`i18n/de.toml` is a symbolic link to `data/i18n/de/de.toml`.
383382
-->
384-
你还需要在 `data/i18n` 中为 [localized strings](#site-strings-in-i18n) 创建一个目录;
383+
你还需要在 `data/i18n` 中为[本地化字符串](#site-strings-in-i18n)创建一个目录;
385384
以现有的本地化为例。要使用这些新字符串,
386385
你还必须创建从 `i18n/<localization>.toml`
387386
`data/i18n/<localization>/<localization>.toml`
@@ -419,10 +418,10 @@ To set the roles of each user contributing to the localization, create an
419418

420419
要设置每个对本地化做出贡献用户的角色,请在特定于语言的子目录内创建一个 `OWNERS` 文件,其中:
421420

422-
- **reviewers**: 具有评审人角色的 kubernetes 团队的列表,
421+
- **reviewers**: 具有评审人角色的 Kubernetes 团队的列表,
423422
在本例中为在[在 GitHub 中添加你的本地化团队](#add-your-localization-team-in-github)中创建的
424423
`sig-docs-**-reviews` 团队。
425-
- **approvers**: 具有批准人角色的 kubernetes 团队的列表,
424+
- **approvers**: 具有批准人角色的 Kubernetes 团队的列表,
426425
在本例中为在[在 GitHub 中添加你的本地化团队](#add-your-localization-team-in-github)中创建的
427426
`sig-docs-**-owners` 团队。
428427
- **labels**: 可以自动应用于 PR 的 GitHub 标签列表,
@@ -439,11 +438,17 @@ language code `es`, looks like this:
439438

440439
语言代码为 `es`[西班牙语 OWNERS 文件](https://git.k8s.io/website/content/es/OWNERS)看起来像:
441440

442-
```yaml
441+
<!--
443442
# See the OWNERS docs at https://go.k8s.io/owners
444443
445444
# This is the localization project for Spanish.
446445
# Teams and members are visible at https://github.com/orgs/kubernetes/teams.
446+
-->
447+
```yaml
448+
# 参见 OWNERS 文档,位于 https://go.k8s.io/owners
449+
450+
# 这是西班牙语的本地化项目
451+
# 各团队和成员名单位于 https://github.com/orgs/kubernetes/teams
447452

448453
reviewers:
449454
- sig-docs-es-reviews
@@ -466,12 +471,12 @@ For each team, add the list of GitHub users requested in
466471
in alphabetical order.
467472
-->
468473
添加了特定语言的 OWNERS 文件之后,使用新的 Kubernetes 本地化团队、
469-
`sig-docs-**-owners` 和 `sig-docs-**-reviews` 列表更新
470-
[根目录下的 OWNERS_ALIAES](https://git.k8s.io/website/OWNERS_ALIASES) 文件。
474+
`sig-docs-**-owners` 和 `sig-docs-**-reviews`
475+
列表更新[根目录下的 OWNERS_ALIAES](https://git.k8s.io/website/OWNERS_ALIASES) 文件。
471476

472-
对于每个团队,请按字母顺序添加
473-
[在 GitHub 中添加你的本地化团队](#add-your-localization-team-in-github)
474-
中所请求的 GitHub 用户列表。
477+
对于每个团队,
478+
请按字母顺序添加[在 GitHub 中添加你的本地化团队](#add-your-localization-team-in-github)中所请求的
479+
GitHub 用户列表。
475480

476481
```diff
477482
--- a/OWNERS_ALIASES
@@ -640,6 +645,83 @@ should carefully review all machine-generated translations before publishing.
640645
-->
641646
为了确保语法和含义的准确性,本地化团队的成员应在发布之前仔细检查所有由机器生成的翻译。
642647

648+
<!--
649+
### Translating SVG images
650+
651+
The Kubernetes project recommends using vector (SVG) images where possible, as
652+
these are much easier for a localization team to edit. If you find a raster
653+
image that needs localizing, consider first redrawing the English version as
654+
a vector image, and then localize that.
655+
-->
656+
### 翻译 SVG 图片 {#translating-svg-images}
657+
658+
Kubernetes 项目建议尽可能使用矢量(SVG)图片,因为这些图片对于本地化团队来说更容易编辑。
659+
如果你发现一个光栅图(位图)需要本地化翻译,先将英文版本重新绘制为矢量图片,然后再进行本地化。
660+
661+
<!--
662+
When translating text within SVG (Scalable Vector Graphics) images, it's
663+
essential to follow certain guidelines to ensure accuracy and maintain
664+
consistency across different language versions. SVG images are commonly
665+
used in the Kubernetes documentation to illustrate concepts, workflows,
666+
and diagrams.
667+
-->
668+
在翻译 SVG(可缩放矢量图)图片中的文本时,需要遵循几点指导方针,
669+
以确保准确性并在不同语言版本之间保持一致。
670+
Kubernetes 文档中常用 SVG 图片来说明概念、工作流和图表。
671+
672+
<!--
673+
1. **Identifying translatable text**: Start by identifying the text elements
674+
within the SVG image that need to be translated. These elements typically
675+
include labels, captions, annotations, or any text that conveys information.
676+
-->
677+
1. **识别可翻译文本**:首先辨别出 SVG 图片中需要翻译的文本元素。
678+
这些元素通常包括标签、标题、注解或任何传达信息的文本。
679+
680+
<!--
681+
2. **Editing SVG files**: SVG files are XML-based, which means they can be
682+
edited using a text editor. However, it's important to note that most of the
683+
documentation images in Kubernetes already convert text to curves to avoid font
684+
compatibility issues. In such cases, it is recommended to use specialized SVG
685+
editing software, such as Inkscape, for editing, open the SVG file and locate
686+
the text elements that require translation.
687+
-->
688+
2. **编辑 SVG 文件**:SVG 文件是基于 XML 的,这意味着可以使用文本编辑器进行编辑。
689+
但请注意 Kubernetes 文档中的大部分图片已经将文本转换为曲线以避免字体兼容性问题。
690+
在这种情况下,建议使用 Inkscape 这类专业的 SVG 编辑软件,
691+
打开 SVG 文件并定位需要翻译的文本元素。
692+
693+
<!--
694+
3. **Translating the text**: Replace the original text with the translated
695+
version in the desired language. Ensure the translated text accurately conveys
696+
the intended meaning and fits within the available space in the image. The Open
697+
Sans font family should be used when working with languages that use the Latin
698+
alphabet. You can download the Open Sans typeface from here:
699+
[Open Sans Typeface](https://fonts.google.com/specimen/Open+Sans).
700+
-->
701+
3. **翻译文本**:将原始的文本替换为目标语言的译文。确保翻译的文本准确传达所需的含义,
702+
并适配图片中可用的空间。在处理使用拉丁字母的语言时,应使用 Open Sans 字体系列。
703+
你可以从此处下载 Open Sans 字体:
704+
[Open Sans Typeface](https://fonts.google.com/specimen/Open+Sans)。
705+
706+
<!--
707+
4. **Converting text to curves**: As already mentioned, to address font
708+
compatibility issues, it is recommended to convert the translated text to
709+
curves or paths. Converting text to curves ensures that the final image
710+
displays the translated text correctly, even if the user's system does not
711+
have the exact font used in the original SVG.
712+
-->
713+
4. **文本转换为曲线**:如前所述,为解决字体兼容性问题,建议将翻译后的文本转换为曲线或路径。
714+
即使用户的系统没有原始 SVG 中所使用的确切字体,将文本转换为曲线也可确保最终图片能正确显示译文。
715+
716+
<!--
717+
5. **Reviewing and testing**: After making the necessary translations and
718+
converting text to curves, save and review the updated SVG image to ensure
719+
the text is properly displayed and aligned. Check
720+
[Preview your changes locally](https://kubernetes.io/docs/contribute/new-content/open-a-pr/#preview-locally).
721+
-->
722+
5. **检查和测试**:完成必要的翻译并将文本转换为曲线后,保存并检查更新后的 SVG 图片,确保文本正确显示和对齐。
723+
参考[在本地预览你的变更](/zh-cn/docs/contribute/new-content/open-a-pr/#preview-locally)。
724+
643725
<!--
644726
### Source files
645727

@@ -651,16 +733,6 @@ To find source files for your target version:
651733

652734
1. Navigate to the Kubernetes website repository at https://github.com/kubernetes/website.
653735
2. Select a branch for your target version from the following table:
654-
655-
Target version | Branch
656-
-----|-----
657-
Latest version | [`main`](https://github.com/kubernetes/website/tree/main)
658-
Previous version | [`release-{{< skew prevMinorVersion >}}`](https://github.com/kubernetes/website/tree/release-{{< skew prevMinorVersion >}})
659-
Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
660-
661-
The `main` branch holds content for the current release `{{< latest-version >}}`.
662-
The release team creates a `{{< release-branch >}}` branch before the next
663-
release: v{{< skew nextMinorVersion >}}.
664736
-->
665737
### 源文件 {#source-files}
666738

@@ -672,6 +744,17 @@ release: v{{< skew nextMinorVersion >}}.
672744
1. 导航到 Kubernetes website 仓库,网址为 https://github.com/kubernetes/website。
673745
2. 从下面的表格中选择你的目标版本分支:
674746

747+
<!--
748+
Target version | Branch
749+
-----|-----
750+
Latest version | [`main`](https://github.com/kubernetes/website/tree/main)
751+
Previous version | [`release-{{< skew prevMinorVersion >}}`](https://github.com/kubernetes/website/tree/release-{{< skew prevMinorVersion >}})
752+
Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
753+
754+
The `main` branch holds content for the current release `{{< latest-version >}}`.
755+
The release team creates a `{{< release-branch >}}` branch before the next
756+
release: v{{< skew nextMinorVersion >}}.
757+
-->
675758
目标版本 | 分支
676759
-----|-----
677760
最新版本 | [`main`](https://github.com/kubernetes/website/tree/main)
@@ -748,7 +831,6 @@ Per CNCF policy, the localization teams must upload their meetings to the SIG
748831
Docs YouTube playlist. A SIG Docs Co-Chair or Tech Lead can help with the
749832
process until SIG Docs automates it.
750833
-->
751-
752834
### 特定语言的 Zoom 会议 {#language-specific-zoom-meetings}
753835

754836
如果本地化项目需要单独的会议时间,

0 commit comments

Comments
 (0)