Skip to content

Commit 10196aa

Browse files
authored
Merge pull request #27408 from sftim/20210405_allow_localizations_maintain_own_strings
Allow localization teams to review their own strings
2 parents dacc1ed + b0ad9ff commit 10196aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3958
-3467
lines changed

content/en/docs/contribute/localization.md

Lines changed: 109 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,21 @@ card:
1616
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.
1717

1818

19-
2019
<!-- body -->
2120

22-
## Getting started
21+
## Contribute to an existing localization
2322

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.
2524

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 >}}
2730

2831
### Find your two-letter language code
2932

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`.
3134

3235
### Fork and clone the repo
3336

@@ -40,13 +43,54 @@ git clone https://github.com/<username>/website
4043
cd website
4144
```
4245

43-
### Open a pull request
46+
The website content directory includes sub-directories for each language. The localization you want to help out with is inside `content/<two-letter-code>`.
4447

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
4649

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.
4852

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).
5094

5195
### Join the Kubernetes GitHub organization
5296

@@ -70,15 +114,6 @@ Next, add a GitHub label for your localization in the `kubernetes/test-infra` re
70114

71115
For an example of adding a label, see the PR for adding the [Italian language label](https://github.com/kubernetes/test-infra/pull/11316).
72116

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
82117

83118
### Modify the site configuration
84119

@@ -107,20 +142,20 @@ Add a language-specific subdirectory to the [`content`](https://github.com/kuber
107142
mkdir content/de
108143
```
109144

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).
115151

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`.
117154

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
119156

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.
122158

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.
124159

125160
### Setting up the OWNERS files
126161

@@ -174,18 +209,46 @@ For each team, add the list of GitHub users requested in [Add your localization
174209
- remyleone
175210
```
176211

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+
177238
## Translating content
178239

179240
Localizing *all* of the Kubernetes documentation is an enormous task. It's okay to start small and expand over time.
180241

242+
### Minimum required content
243+
181244
At a minimum, all localizations must include:
182245

183246
Description | URLs
184247
-----|-----
185248
Home | [All heading and subheading URLs](/docs/home/)
186249
Setup | [All heading and subheading URLs](/docs/setup/)
187250
Tutorials | [Kubernetes Basics](/docs/tutorials/kubernetes-basics/), [Hello Minikube](/docs/tutorials/hello-minikube/)
188-
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
189252

190253
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:
191254

@@ -213,27 +276,30 @@ To find source files for your target version:
213276
2. Select a branch for your target version from the following table:
214277
Target version | Branch
215278
-----|-----
216-
Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
217279
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 >}})
219282

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 >}}.
221284

222285
### Site strings in i18n
223286

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`.
225288

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`):
227290

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
230294
```
231295

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:
233299

234-
```TOML
235-
[docs_label_i_am]
236-
other = "ICH BIN..."
300+
```toml
301+
[ui_search_placeholder]
302+
other = "Suchen"
237303
```
238304

239305
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
244310

245311
## Branching strategy
246312

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.
248316

249317
To collaborate on a localization branch:
250318

@@ -288,16 +356,4 @@ For more information about working from forks or directly from the repository, s
288356

289357
SIG Docs welcomes upstream contributions and corrections to the English source.
290358

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-
296359

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/).

data/i18n/de/OWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# See the OWNERS docs at https://go.k8s.io/owners
2+
3+
# Localized strings for German.
4+
# Teams and members are visible at https://github.com/orgs/kubernetes/teams.
5+
6+
reviewers:
7+
- sig-docs-de-reviews
8+
9+
approvers:
10+
- sig-docs-de-owners
11+
12+
labels:
13+
- language/de

0 commit comments

Comments
 (0)