Skip to content

Commit e522789

Browse files
docs: update contributor guide to reflect the changes to i18n strings
1 parent ca22e81 commit e522789

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

content/en/docs/contribute/localization.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,16 @@ existing `[languages]` block. The German block, for example, looks like:
170170
```toml
171171
[languages.de]
172172
title = "Kubernetes"
173-
description = "Produktionsreife Container-Verwaltung"
174173
languageName = "Deutsch (German)"
175-
languageNameLatinScript = "Deutsch"
174+
weight = 5
176175
contentDir = "content/de"
177-
weight = 8
176+
languagedirection = "ltr"
177+
178+
[languages.de.params]
179+
time_format_blog = "02.01.2006"
180+
language_alternatives = ["en"]
181+
description = "Produktionsreife Container-Orchestrierung"
182+
languageNameLatinScript = "Deutsch"
178183
```
179184

180185
The language selection bar lists the value for `languageName`. Assign "language
@@ -206,15 +211,11 @@ the repository. For example, the two-letter code for German is `de`:
206211
mkdir content/de
207212
```
208213

209-
You also need to create a directory inside `data/i18n` for
214+
You also need to create a directory inside `i18n` for
210215
[localized strings](#site-strings-in-i18n); look at existing localizations
211-
for an example. To use these new strings, you must also create a symbolic link
212-
from `i18n/<localization>.toml` to the actual string configuration in
213-
`data/i18n/<localization>/<localization>.toml` (remember to commit the symbolic
214-
link).
216+
for an example.
215217

216-
For example, for German the strings live in `data/i18n/de/de.toml`, and
217-
`i18n/de.toml` is a symbolic link to `data/i18n/de/de.toml`.
218+
For example, for German the strings live in `i18n/de/de.toml`.
218219

219220
### Localize the community code of conduct
220221

@@ -253,6 +254,7 @@ approvers:
253254
- sig-docs-es-owners
254255

255256
labels:
257+
- area/localization
256258
- language/es
257259
```
258260
@@ -431,16 +433,16 @@ release: v{{< skew nextMinorVersion >}}.
431433
### Site strings in i18n
432434

433435
Localizations must include the contents of
434-
[`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/data/i18n/en/en.toml)
436+
[`i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/i18n/en/en.toml)
435437
in a new language-specific file. Using German as an example:
436-
`data/i18n/de/de.toml`.
438+
`i18n/de/de.toml`.
437439

438-
Add a new localization directory and file to `data/i18n/`. For example, with
440+
Add a new localization directory and file to `i18n/`. For example, with
439441
German (`de`):
440442

441443
```bash
442-
mkdir -p data/i18n/de
443-
cp data/i18n/en/en.toml data/i18n/de/de.toml
444+
mkdir -p i18n/de
445+
cp i18n/en/en.toml i18n/de/de.toml
444446
```
445447

446448
Revise the comments at the top of the file to suit your localization, then

content/en/docs/contribute/style/page-content-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ You can declare a `prerequisites` heading as follows:
5858
```
5959

6060
The `heading` shortcode expects one string parameter.
61-
The heading string parameter matches the prefix of a variable in the `i18n/<lang>.toml` files.
61+
The heading string parameter matches the prefix of a variable in the `i18n/<lang>/<lang>.toml` files.
6262
For example:
6363

64-
`i18n/en.toml`:
64+
`i18n/en/en.toml`:
6565

6666
```toml
6767
[whatsnext_heading]
6868
other = "What's next"
6969
```
7070

71-
`i18n/ko.toml`:
71+
`i18n/ko/ko.toml`:
7272

7373
```toml
7474
[whatsnext_heading]

0 commit comments

Comments
 (0)