@@ -77,7 +77,6 @@ language code is `pt-br`.
77
77
一些语言使用 ISO-3166 定义的国家代码的小写版本及其语言代码。
78
78
例如,巴西葡萄牙语代码是 ` pt-br ` 。
79
79
80
-
81
80
<!--
82
81
### Fork and clone the repo
83
82
@@ -87,8 +86,8 @@ fork](/docs/contribute/new-content/open-a-pr/#fork-the-repo) of the
87
86
-->
88
87
### 派生(fork)并且克隆仓库 {#fork-and-clone-the-repo}
89
88
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 ) 。
92
91
93
92
<!--
94
93
Then, clone your fork and `cd` into it:
@@ -274,7 +273,7 @@ new localization branches to coordinate translation efforts. Members of
274
273
对于每个本地化,` @kubernetes/sig-docs-**-reviews ` 团队被自动分派新 PR 的审阅任务。
275
274
` @kubernetes/website-maintainers ` 成员可以创建新的本地化分支来协调翻译工作。
276
275
` @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 设定里程碑。
278
277
279
278
<!--
280
279
### Configure the workflow
@@ -289,7 +288,7 @@ For an example of adding a label, see the PR for adding the
289
288
### 配置工作流程 {#configure-the-workflow}
290
289
291
290
接下来,在 ` kubernetes/test-infra ` 仓库中为你的本地化添加一个 GitHub 标签。
292
- 标签可让你过滤 issues 和针对特定语言的 PR。
291
+ 标签可让你过滤 Issue 和针对特定语言的 PR。
293
292
294
293
有关添加标签的示例,请参见添加[ 意大利语标签] ( https://github.com/kubernetes/test-infra/pull/11316 ) 的 PR。
295
294
@@ -307,7 +306,7 @@ existing `[languages]` block. The German block, for example, looks like:
307
306
### 修改站点配置 {#configure-the-workflow}
308
307
309
308
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 ) 文件中。
311
310
为了支持新的本地化,你需要修改 ` hugo.toml ` 。
312
311
313
312
在现有的 ` [languages] ` 下,将新语言的配置添加到 ` hugo.toml ` 中。
@@ -381,7 +380,7 @@ link).
381
380
For example, for German the strings live in `data/i18n/de/de.toml`, and
382
381
`i18n/de.toml` is a symbolic link to `data/i18n/de/de.toml`.
383
382
-->
384
- 你还需要在 ` data/i18n ` 中为 [ localized strings ] ( #site-strings-in-i18n ) 创建一个目录;
383
+ 你还需要在 ` data/i18n ` 中为[ 本地化字符串 ] ( #site-strings-in-i18n ) 创建一个目录;
385
384
以现有的本地化为例。要使用这些新字符串,
386
385
你还必须创建从 ` i18n/<localization>.toml `
387
386
到 ` data/i18n/<localization>/<localization>.toml `
@@ -419,10 +418,10 @@ To set the roles of each user contributing to the localization, create an
419
418
420
419
要设置每个对本地化做出贡献用户的角色,请在特定于语言的子目录内创建一个 ` OWNERS ` 文件,其中:
421
420
422
- - ** reviewers** : 具有评审人角色的 kubernetes 团队的列表,
421
+ - ** reviewers** : 具有评审人角色的 Kubernetes 团队的列表,
423
422
在本例中为在[ 在 GitHub 中添加你的本地化团队] ( #add-your-localization-team-in-github ) 中创建的
424
423
` sig-docs-**-reviews ` 团队。
425
- - ** approvers** : 具有批准人角色的 kubernetes 团队的列表,
424
+ - ** approvers** : 具有批准人角色的 Kubernetes 团队的列表,
426
425
在本例中为在[ 在 GitHub 中添加你的本地化团队] ( #add-your-localization-team-in-github ) 中创建的
427
426
` sig-docs-**-owners ` 团队。
428
427
- ** labels** : 可以自动应用于 PR 的 GitHub 标签列表,
@@ -439,11 +438,17 @@ language code `es`, looks like this:
439
438
440
439
语言代码为 ` es ` 的[ 西班牙语 OWNERS 文件] ( https://git.k8s.io/website/content/es/OWNERS ) 看起来像:
441
440
442
- ``` yaml
441
+ <!--
443
442
# See the OWNERS docs at https://go.k8s.io/owners
444
443
445
444
# This is the localization project for Spanish.
446
445
# 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
447
452
448
453
reviewers :
449
454
- sig-docs-es-reviews
@@ -466,12 +471,12 @@ For each team, add the list of GitHub users requested in
466
471
in alphabetical order.
467
472
-->
468
473
添加了特定语言的 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) 文件。
471
476
472
- 对于每个团队,请按字母顺序添加
473
- [在 GitHub 中添加你的本地化团队](#add-your-localization-team-in-github)
474
- 中所请求的 GitHub 用户列表。
477
+ 对于每个团队,
478
+ 请按字母顺序添加 [在 GitHub 中添加你的本地化团队](#add-your-localization-team-in-github)中所请求的
479
+ GitHub 用户列表。
475
480
476
481
` ` ` diff
477
482
--- a/OWNERS_ALIASES
@@ -640,6 +645,83 @@ should carefully review all machine-generated translations before publishing.
640
645
-->
641
646
为了确保语法和含义的准确性,本地化团队的成员应在发布之前仔细检查所有由机器生成的翻译。
642
647
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
+
643
725
<!--
644
726
# ## Source files
645
727
@@ -651,16 +733,6 @@ To find source files for your target version:
651
733
652
734
1. Navigate to the Kubernetes website repository at https://github.com/kubernetes/website.
653
735
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 >}}.
664
736
-->
665
737
# ## 源文件 {#source-files}
666
738
@@ -672,6 +744,17 @@ release: v{{< skew nextMinorVersion >}}.
672
744
1. 导航到 Kubernetes website 仓库,网址为 https://github.com/kubernetes/website。
673
745
2. 从下面的表格中选择你的目标版本分支:
674
746
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
+ -->
675
758
目标版本 | 分支
676
759
-----|-----
677
760
最新版本 | [`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
748
831
Docs YouTube playlist. A SIG Docs Co-Chair or Tech Lead can help with the
749
832
process until SIG Docs automates it.
750
833
-->
751
-
752
834
# ## 特定语言的 Zoom 会议 {#language-specific-zoom-meetings}
753
835
754
836
如果本地化项目需要单独的会议时间,
0 commit comments