You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page shows you how to [localize](https://blog.mozilla.org/l10n/2011/12/14/i18n-vs-l10n-whats-the-diff/) the docs for a different language.
17
17
18
18
19
-
20
19
<!-- body -->
21
20
22
-
## Getting started
21
+
## Contribute to an existing localization
23
22
24
-
Because contributors can't approve their own pull requests, you need at least two contributors to begin a localization.
23
+
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.
25
24
26
-
All localization teams must be self-sustaining with their own resources. The Kubernetes website is happy to host your work, but it's up to you to translate it.
25
+
{{< note >}}
26
+
If you want to work on a localization that already exists, check
27
+
this page in that localization (if it exists), rather than the
28
+
English original. You might see extra details there.
29
+
{{< /note >}}
27
30
28
31
### Find your two-letter language code
29
32
30
-
First, consult the [ISO 639-1 standard](https://www.loc.gov/standards/iso639-2/php/code_list.php) to find your localization's two-letter country code. For example, the two-letter code for Korean is `ko`.
33
+
First, consult the [ISO 639-1 standard](https://www.loc.gov/standards/iso639-2/php/code_list.php) to find your localization's two-letter language code. For example, the two-letter code for Korean is `ko`.
The website content directory includes sub-directories for each language. The localization you want to help out with is inside `content/<two-letter-code>`.
44
47
45
-
Next, [open a pull request](/docs/contribute/new-content/open-a-pr/#open-a-pr) (PR) to add a localization to the `kubernetes/website` repository.
48
+
### Suggest changes
46
49
47
-
The PR must include all of the [minimum required content](#minimum-required-content) before it can be approved.
50
+
Create or update your chosen localized page based on the English original. See
51
+
[translating content](#translating-content) for more details.
48
52
49
-
For an example of adding a new localization, see the PR to enable [docs in French](https://github.com/kubernetes/website/pull/12548).
53
+
If you notice a technical inaccuracy or other problem with the upstream (English)
54
+
documentation, you should fix the upstream documentation first and then repeat the
55
+
equivalent fix by updating the localization you're working on.
56
+
57
+
Please limit pull requests to a single localization, since pull requests that change
58
+
content in multiple localizations could be difficult to review.
59
+
60
+
Follow [Suggesting Content Improvements](/docs/contribute/suggest-improvements/) to propose changes to
61
+
that localization. The process is very similar to proposing changes to the upstream (English) content.
62
+
63
+
## Start a new localization
64
+
65
+
If you want the Kubernetes documentation localized into a new language, here's what
66
+
you need to do.
67
+
68
+
Because contributors can't approve their own pull requests, you need _at least two contributors_
69
+
to begin a localization.
70
+
71
+
All localization teams must be self-sustaining. The Kubernetes website is happy to host your work, but
72
+
it's up to you to translate it and keep existing localized content current.
73
+
74
+
You'll need to know the two-letter language code for your language. Consult the
75
+
[ISO 639-1 standard](https://www.loc.gov/standards/iso639-2/php/code_list.php) to find your
76
+
localization's two-letter language code. For example, the two-letter code for Korean is
77
+
`ko`.
78
+
79
+
When you start a new localization, you must localize all the
80
+
[minimum required content](#minimum-required-content) before
81
+
the Kubernetes project can publish your changes to the live
82
+
website.
83
+
84
+
SIG Docs can help you work on a separate branch so that you
85
+
can incrementally work towards that goal.
86
+
87
+
### Find community
88
+
89
+
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.
90
+
91
+
Please also consider participating in the [SIG Docs Localization Subgroup meeting](https://github.com/kubernetes/community/tree/master/sig-docs). The mission of the SIG Docs localization subgroup is to work across the SIG Docs localization teams to collaborate on defining and documenting the processes for creating localized contribution guides. In addition, the SIG Docs localization subgroup will look for opportunities for the creation and sharing of common tools across localization teams and also serve to identify new requirements to the SIG Docs Leadership team. If you have questions about this meeting, please inquire on the [SIG Docs Localizations Slack channel](https://kubernetes.slack.com/messages/sig-docs-localizations).
92
+
93
+
You can also create a Slack channel for your localization in the `kubernetes/community` repository. For an example of adding a Slack channel, see the PR for [adding a channel for Persian](https://github.com/kubernetes/community/pull/4980).
50
94
51
95
### Join the Kubernetes GitHub organization
52
96
@@ -70,15 +114,6 @@ Next, add a GitHub label for your localization in the `kubernetes/test-infra` re
70
114
71
115
For an example of adding a label, see the PR for adding the [Italian language label](https://github.com/kubernetes/test-infra/pull/11316).
72
116
73
-
### Find community
74
-
75
-
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.
76
-
77
-
Please also consider participating in the [SIG Docs Localization Subgroup meeting](https://github.com/kubernetes/community/tree/master/sig-docs). The mission of the SIG Docs localization subgroup is to work across the SIG Docs localization teams to collaborate on defining and documenting the processes for creating localized contribution guides. In addition, the SIG Docs localization subgroup will look for opportunities for the creation and sharing of common tools across localization teams and also serve to identify new requirements to the SIG Docs Leadership team. If you have questions about this meeting, please inquire on the [SIG Docs Localizations Slack channel](https://kubernetes.slack.com/messages/sig-docs-localizations).
78
-
79
-
You can also create a Slack channel for your localization in the `kubernetes/community` repository. For an example of adding a Slack channel, see the PR for [adding a channel for Persian](https://github.com/kubernetes/community/pull/4980).
80
-
81
-
## Minimum required content
82
117
83
118
### Modify the site configuration
84
119
@@ -107,20 +142,20 @@ Add a language-specific subdirectory to the [`content`](https://github.com/kuber
107
142
mkdir content/de
108
143
```
109
144
110
-
### Localize the community code of conduct
111
-
112
-
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.
113
-
114
-
### Add a localized README file
145
+
You also need to create a directory inside `data/i18n` for
146
+
[localized strings](#site-strings-in-i18n); look at existing localizations
147
+
for an example. To use these new strings, you must also create a symbolic link
148
+
from `i18n/<localization>.toml` to the actual string configuration in
149
+
`data/i18n/<localization>/<localization>.toml` (remember to commit the symbolic
150
+
link).
115
151
116
-
To guide other localization contributors, add a new [`README-**.md`](https://help.github.com/articles/about-readmes/) to the top level of k/website, where `**` is the two-letter language code. For example, a German README file would be `README-de.md`.
152
+
For example, for German the strings live in `data/i18n/de/de.toml`, and
153
+
`i18n/de.toml` is a symbolic link to `data/i18n/de/de.toml`.
117
154
118
-
Provide guidance to localization contributors in the localized `README-**.md` file. Include the same information contained in `README.md` as well as:
155
+
### Localize the community code of conduct
119
156
120
-
- A point of contact for the localization project
121
-
- Any information specific to the localization
157
+
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.
122
158
123
-
After you create the localized README, add a link to the file from the main English `README.md`, and include contact information in English. You can provide a GitHub ID, email address, [Slack channel](https://slack.com/), or other method of contact. You must also provide a link to your localized Community Code of Conduct.
124
159
125
160
### Setting up the OWNERS files
126
161
@@ -174,18 +209,46 @@ For each team, add the list of GitHub users requested in [Add your localization
174
209
- remyleone
175
210
```
176
211
212
+
### Open a pull request
213
+
214
+
Next, [open a pull request](/docs/contribute/new-content/open-a-pr/#open-a-pr) (PR) to add a localization to the `kubernetes/website` repository.
215
+
216
+
The PR must include all of the [minimum required content](#minimum-required-content) before it can be approved.
217
+
218
+
For an example of adding a new localization, see the PR to enable [docs in French](https://github.com/kubernetes/website/pull/12548).
219
+
220
+
### Add a localized README file
221
+
222
+
To guide other localization contributors, add a new [`README-**.md`](https://help.github.com/articles/about-readmes/) to the top level of k/website, where `**` is the two-letter language code. For example, a German README file would be `README-de.md`.
223
+
224
+
Provide guidance to localization contributors in the localized `README-**.md` file. Include the same information contained in `README.md` as well as:
225
+
226
+
- A point of contact for the localization project
227
+
- Any information specific to the localization
228
+
229
+
After you create the localized README, add a link to the file from the main English `README.md`, and include contact information in English. You can provide a GitHub ID, email address, [Slack channel](https://slack.com/), or other method of contact. You must also provide a link to your localized Community Code of Conduct.
230
+
231
+
### Launching your new localization
232
+
233
+
Once a localization meets requirements for workflow and minimum output, SIG Docs will:
234
+
235
+
- Enable language selection on the website
236
+
- 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/).
237
+
177
238
## Translating content
178
239
179
240
Localizing *all* of the Kubernetes documentation is an enormous task. It's okay to start small and expand over time.
180
241
242
+
### Minimum required content
243
+
181
244
At a minimum, all localizations must include:
182
245
183
246
Description | URLs
184
247
-----|-----
185
248
Home | [All heading and subheading URLs](/docs/home/)
186
249
Setup | [All heading and subheading URLs](/docs/setup/)
Site strings | [All site strings in a new localized TOML file](https://github.com/kubernetes/website/tree/master/i18n)
251
+
Site strings | [All site strings](#Site-strings-in-i18n) in a new localized TOML file
189
252
190
253
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:
191
254
@@ -213,27 +276,30 @@ To find source files for your target version:
213
276
2. Select a branch for your target version from the following table:
214
277
Target version | Branch
215
278
-----|-----
216
-
Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
217
279
Latest version | [`master`](https://github.com/kubernetes/website/tree/master)
218
-
Previous version | `release-*.**`
280
+
Previous version | [`release-{{< skew prevMinorVersion >}}`](https://github.com/kubernetes/website/tree/release-{{< skew prevMinorVersion >}})
281
+
Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
219
282
220
-
The `master` branch holds content for the current release `{{< latest-version >}}`. The release team will create `{{< release-branch >}}` branch shortly before the next release: v{{< skew nextMinorVersion >}}.
283
+
The `master` 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 >}}.
221
284
222
285
### Site strings in i18n
223
286
224
-
Localizations must include the contents of [`i18n/en.toml`](https://github.com/kubernetes/website/blob/master/i18n/en.toml) in a new language-specific file. Using German as an example: `i18n/de.toml`.
287
+
Localizations must include the contents of [`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/master/data/i18n/en/en.toml) in a new language-specific file. Using German as an example: `data/i18n/de/de.toml`.
225
288
226
-
Add a new localization file to `i18n/`. For example, with German (`de`):
289
+
Add a new localization directory and file to `data/i18n/`. For example, with German (`de`):
227
290
228
-
```shell
229
-
cp i18n/en.toml i18n/de.toml
291
+
```bash
292
+
mkdir -p data/i18n/de
293
+
cp data/i18n/en/en.toml data/i18n/de/de.toml
230
294
```
231
295
232
-
Then translate the value of each string:
296
+
Revise the comments at the top of the file to suit your localization,
297
+
then translate the value of each string. For example, this is the German-language
298
+
placeholder text for the search form:
233
299
234
-
```TOML
235
-
[docs_label_i_am]
236
-
other = "ICH BIN..."
300
+
```toml
301
+
[ui_search_placeholder]
302
+
other = "Suchen"
237
303
```
238
304
239
305
Localizing site strings lets you customize site-wide text and features: for example, the legal copyright text in the footer on each page.
@@ -244,7 +310,9 @@ Some language teams have their own language-specific style guide and glossary. F
244
310
245
311
## Branching strategy
246
312
247
-
Because localization projects are highly collaborative efforts, we encourage teams to work in shared localization branches.
313
+
Because localization projects are highly collaborative efforts, we
314
+
encourage teams to work in shared localization branches - especially
315
+
when starting out and the localization is not yet live.
248
316
249
317
To collaborate on a localization branch:
250
318
@@ -288,16 +356,4 @@ For more information about working from forks or directly from the repository, s
288
356
289
357
SIG Docs welcomes upstream contributions and corrections to the English source.
290
358
291
-
## Help an existing localization
292
-
293
-
You can also help add or improve content to an existing localization. Join the [Slack channel](https://kubernetes.slack.com/messages/C1J0BPD2M/) for the localization, and start opening PRs to help. Please limit pull requests to a single localization since pull requests that change content in multiple localizations could be difficult to review.
294
-
295
-
296
359
297
-
## {{% heading "whatsnext" %}}
298
-
299
-
300
-
Once a localization meets requirements for workflow and minimum output, SIG docs will:
301
-
302
-
- Enable language selection on the website
303
-
- 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/).
0 commit comments