Skip to content

Commit f5bd03f

Browse files
committed
docs: update localization guide
1 parent be32500 commit f5bd03f

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎LOCALIZING.md‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
In computing, localization is the process of adapting software to different languages, regional differences, cultural preferences, and technical requirements of a target audience.
44

5-
This guide explains how to contribute a new localization to this workshopper. If you are an international user and would like to bring Nodeschool workshops to a broader audience, please consider contributing a localization! It is simple, fun, and enables more people to learn and practice.
5+
This guide explains how to contribute a new localization to this workshopper. If you are an international user and would like to bring NodeSchool workshops to a broader audience, please consider contributing a localization! It enables more people to learn and practice.
66

77
## Menu
88

9-
The menu of the workshopper greets the user with a list of problem names. The strings for these names are contained in the top level `menu.json` file. Translations of problem names should be placed in a JSON file inside the `i18n` folder named with the language code, e.g. `es.json`. Use an existing translation file as reference, ensuring it's up to date with the contents of `menu.json`.
9+
The menu of the workshopper greets the user with a list of problem names. The strings for these names are contained in the top-level `menu.json` file. Translations of problem names should be placed in a JSON file inside the `i18n` folder named with the language code, e.g. `es.json`. Use an existing translation file as a reference, ensuring it is up to date with the contents of `menu.json`.
10+
11+
The workshopper automatically detects languages from the JSON files in `i18n`, so adding this file also adds the language to the `CHOOSE LANGUAGE` menu. You do not need to edit `index.js`.
1012

1113
```json
1214
{
@@ -27,7 +29,7 @@ In order to add a localized footer for Spanish, create a `es.md` file inside the
2729

2830
## Troubleshooting tips
2931

30-
Similarly, workshoppers display troubleshooting tips when the user submits a wrong solution for the exercise. Tips are contained in a [Markdown](https://en.wikipedia.org/wiki/Markdown) file located inside the `i18n` directory, named after the language code, e.g. `troubleshooting-ja.md`.
32+
Similarly, workshoppers display troubleshooting tips when the user submits a wrong solution for the exercise. Tips are contained in a [Markdown](https://en.wikipedia.org/wiki/Markdown) file located inside the `i18n` directory, named after the language code, e.g. `troubleshooting_ja.md`.
3133

3234
In order to add translated troubleshooting tips for Spanish, create a `troubleshooting_es.md` file inside the `i18n` directory, containing the translation of the English file `troubleshooting.md`.
3335

@@ -38,15 +40,13 @@ The text of each problem and the message printed when the user solves it can be
3840
```
3941
+-- problems
4042
| +-- problem-1
41-
| | +-- index.js
4243
| | +-- problem.md
4344
| | +-- problem_ja.md
4445
| | +-- problem_zh-cn.md
4546
| | +-- solution.md
4647
| | +-- solution_ja.md
4748
| | `-- solution_zh-cn.md
4849
| +-- problem-2
49-
| | +-- index.js
5050
| | +-- problem.md
5151
| | +-- problem_ja.md
5252
| | +-- problem_zh-cn.md
@@ -63,7 +63,6 @@ In order to add the Spanish localization, we must add new `problem_es.md` and `s
6363
```
6464
+-- problems
6565
| +-- problem-1
66-
| | +-- index.js
6766
| | +-- problem.md
6867
| | +-- problem_es.md
6968
| | +-- problem_ja.md
@@ -73,7 +72,6 @@ In order to add the Spanish localization, we must add new `problem_es.md` and `s
7372
| | +-- solution_ja.md
7473
| | `-- solution_zh-cn.md
7574
| +-- problem-2
76-
| | +-- index.js
7775
| | +-- problem.md
7876
| | +-- problem_es.md
7977
| | +-- problem_ja.md
@@ -87,10 +85,10 @@ In order to add the Spanish localization, we must add new `problem_es.md` and `s
8785

8886
This is probably the most complex and time consuming task of localizing a workshopper, as problems often interleave paragraphs of text, code snippets and suggestions.
8987

90-
Please remember to use welcoming and inclusive language. The [Contributor Covenant](http://contributor-covenant.org/) offers guidelines if you're unsure.
88+
Please remember to use welcoming and inclusive language. The [Contributor Covenant](https://www.contributor-covenant.org/) offers guidelines if you're unsure.
9189

9290
## Testing
9391

94-
In order to test a translation, launch the workshopper and choose the desired language selecting the menu option `CHOOSE LANGUAGE`. If you don't see the language you contributed listed in the options, chances are you didn't save your updates to the list of languages in the `index.js`.
92+
Run `npm test`, then launch the workshopper and choose the desired language by selecting the menu option `CHOOSE LANGUAGE`. Check that the menu, problem descriptions, solutions, troubleshooting tips, and footer are displayed correctly. If the language is not listed, check that its JSON file exists in `i18n` and has the correct language-code filename.
9593

9694
Once you're satisfied with the results, commit your changes and push to your repo, then submit a PR to the main workshopper repo!

0 commit comments

Comments
 (0)