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
{{ message }}
Repository navigation
Commit f5bd03f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: LOCALIZING.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,13 @@
2
2
3
3
In computing, localization is the process of adapting software to different languages, regional differences, cultural preferences, and technical requirements of a target audience.
4
4
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.
6
6
7
7
## Menu
8
8
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`.
10
12
11
13
```json
12
14
{
@@ -27,7 +29,7 @@ In order to add a localized footer for Spanish, create a `es.md` file inside the
27
29
28
30
## Troubleshooting tips
29
31
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`.
31
33
32
34
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`.
33
35
@@ -38,15 +40,13 @@ The text of each problem and the message printed when the user solves it can be
38
40
```
39
41
+-- problems
40
42
| +-- problem-1
41
-
| | +-- index.js
42
43
| | +-- problem.md
43
44
| | +-- problem_ja.md
44
45
| | +-- problem_zh-cn.md
45
46
| | +-- solution.md
46
47
| | +-- solution_ja.md
47
48
| | `-- solution_zh-cn.md
48
49
| +-- problem-2
49
-
| | +-- index.js
50
50
| | +-- problem.md
51
51
| | +-- problem_ja.md
52
52
| | +-- problem_zh-cn.md
@@ -63,7 +63,6 @@ In order to add the Spanish localization, we must add new `problem_es.md` and `s
63
63
```
64
64
+-- problems
65
65
| +-- problem-1
66
-
| | +-- index.js
67
66
| | +-- problem.md
68
67
| | +-- problem_es.md
69
68
| | +-- problem_ja.md
@@ -73,7 +72,6 @@ In order to add the Spanish localization, we must add new `problem_es.md` and `s
73
72
| | +-- solution_ja.md
74
73
| | `-- solution_zh-cn.md
75
74
| +-- problem-2
76
-
| | +-- index.js
77
75
| | +-- problem.md
78
76
| | +-- problem_es.md
79
77
| | +-- problem_ja.md
@@ -87,10 +85,10 @@ In order to add the Spanish localization, we must add new `problem_es.md` and `s
87
85
88
86
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.
89
87
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.
91
89
92
90
## Testing
93
91
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.
95
93
96
94
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