Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6a89140

Browse files
committed
readme
1 parent f489145 commit 6a89140

File tree

1 file changed

+152
-21
lines changed

1 file changed

+152
-21
lines changed

‎README.md‎

Lines changed: 152 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,170 @@
1-
# The Modern JavaScript Tutorial
1+
# The Modern JavaScript Tutorial in v2
22

3-
This repository hosts the English content of the Modern JavaScript Tutorial, published at [https://javascript.info](https://javascript.info).
3+
This repository hosts the translation of <https://javascript.info> in v2.
44

5-
## Translations
65

7-
We'd like to make the tutorial available in many languages. Please help us to translate.
6+
**That's how you can contribute:**
87

9-
See <https://javascript.info/translate> for the details.
8+
- See the [v2 Translate Progress](https://github.com/javascript-tutorial/v2.javascript.info/issues/1) issue.
9+
- Choose an unchecked article you'd like to translate.
10+
- Add a comment with the article title to the issue, e.g. `An Introduction to JavaScript`.
11+
- Our bot will mark it in the issue, for everyone to know that you're translating it.
12+
- Your comment should contain only the title.
13+
- Fork the repository, translate and send a PR when done.
14+
- PR title should match article title, the bot will write it's number into the issue.
1015

11-
## Contributions
16+
Please kindly allow maintainers to review and merge or request changes in your translation.
17+
18+
If maintainers do not respond, or if you'd like to become a maintainer, write us at the [main repo](https://github.com/javascript-tutorial/en.javascript.info/issues/new).
19+
20+
**Let others know what you're translating, in message boards or chats in your language. Invite them to join!**
1221

13-
We'd also like to collaborate on the tutorial with other people.
22+
🎉 Thank you!
1423

15-
Something's wrong? A topic is missing? Explain it to people, add as PR 👏
24+
Your name and the contribution size will appear in the "About project" page when the translation gets published.
1625

17-
**You can edit the text in any editor.** The tutorial uses enhanced "markdown" format, easy to grasp. And if you want to see how it looks on-site, there's a server to run the tutorial locally at <https://github.com/javascript-tutorial/server>.
18-
19-
The list of contributors is available at <https://javascript.info/about#contributors>.
26+
P.S. The full list of languages can be found at <https://javascript.info/translate>.
2027

2128
## Structure
2229

23-
Every chapter, article or a task has its folder.
30+
Every chapter, an article or a task resides in its own folder.
31+
32+
The folder is named `N-url`, where `N` – is the number for sorting (articles are ordered), and `url` is the URL-slug on the site.
33+
34+
The folder has one of files:
35+
36+
- `index.md` for a section,
37+
- `article.md` for an article,
38+
- `task.md` for a task formulation (+`solution.md` with the solution text if any).
39+
40+
A file starts with the `# Title Header`, and then the text in Markdown-like format, editable in a simple text editor.
41+
42+
Additional resources and examples for the article or the task, are also in the same folder.
43+
44+
## Translation Tips
45+
46+
Please keep line breaks and paragraphs "as is": don't add newlines and don't remove existing ones. Makes it easy to merge future changes from the English version into the translation.
47+
48+
If you see that the English version can be improved – great, please send a PR to it.
49+
50+
### Terms
51+
52+
- Some specification terms are not to be translated, e.g. "Function Declaration" can be left "as is".
53+
- For other terms like `resolved promise`, `slash`, `regexp`, and so on - look for a glossary, hopefully there's one for your language already. If not, look for translations in manuals, such as [MDN](https://developer.mozilla.org/en-US/).
54+
55+
56+
### Terms with meaning
57+
58+
In English many terms have an obvious meaning. For a person who doesn't understand English, there's no such meaning.
59+
60+
Please keep that in mind, sometimes explanations or additional translations are needed, e.g.
61+
62+
```md
63+
`ReadableStream` objects allows to read data chunk-by-chunk.
64+
```
65+
66+
```md
67+
`ReadableStream` ("flujo legible") objeto ...
68+
```
69+
70+
### Text in Code Blocks
71+
72+
- Translate comments.
73+
- Translate user-messages and example strings.
74+
- Don't translate variables, classes, identifiers.
75+
- Ensure that the code works after the translation :)
76+
77+
Example:
78+
79+
```js
80+
// Example
81+
const text = "Hello, world";
82+
document.querySelector('.hello').innerHTML = text;
83+
```
84+
85+
✅ DO (translate comment):
86+
87+
```js
88+
// Ejemplo
89+
const text = 'Hola mundo';
90+
document.querySelector('.hello').innerHTML = text;
91+
```
92+
93+
❌ DON'T (translate class):
2494

25-
The folder is named like `N-url`, where `N` is a number for the sorting purposes and `url` is the URL part with title of the material.
95+
```js
96+
// Ejemplo
97+
const text = 'Hola mundo';
98+
// ".hello" is a class
99+
// DO NOT TRANSLATE
100+
document.querySelector('.hola').innerHTML = text;
101+
```
26102

27-
The type of the material is defined by the file inside the folder:
103+
Please note, that sometimes code is followed by pictures, and if you translate text `Hello` -> `Hola` in the code, you need to translate text in picturess as well.
28104

29-
- `index.md` stands for a chapter
30-
- `article.md` stands for an article
31-
- `task.md` stands for a task (solution must be provided in `solution.md` file aswell)
105+
In that case it's probably easier not to translate such text. See more about translating images later.
32106

33-
Each of these files starts from the `# Main header`.
34107

35-
It's very easy to add something new.
108+
### External Links
109+
110+
If an external link is to Wikipedia, e.g. `https://en.wikipedia.org/wiki/JavaScript`, and a version of that article exists in your language that is of decent quality, link to that version instead.
111+
112+
Example:
113+
114+
```md
115+
[JavaScript](https://en.wikipedia.org/wiki/JavaScript) is a programming language.
116+
```
117+
118+
✅ OK (en -> es):
119+
120+
```md
121+
[JavaScript](https://es.wikipedia.org/wiki/JavaScript) es un lenguaje de programación.
122+
```
123+
124+
For links to MDN, a partially translated version is ok.
125+
126+
If a linked article has no translated version, leave the link "as is".
127+
128+
### Metadata
129+
130+
Some files, usually tasks, have YAML metadata at the top, delimited by `---`:
131+
132+
```md
133+
importance: 5
36134

37135
---
38-
39-
Ilya Kantor @iliakan
136+
...
137+
```
138+
139+
Please don't translate "importance" (and other top metadata).
140+
141+
### Anchors
142+
143+
Some headers have `[#anchor]` at the end, e.g.
144+
145+
```md
146+
## Spread operator [#spread-operator]
147+
```
148+
149+
Please don't translate or remove the `[#...]` part, it's for URL anchors.
150+
151+
152+
### Images
153+
154+
Most illustrations use SVG format, the text in there can be replaced with a translated variant.
155+
156+
The translated text is in `images.yml` file in the tutorial root.
157+
158+
The file format is YAML:
159+
```yaml
160+
image.svg: # image file
161+
"hello world": # English phrase
162+
text: "Hola mundo" # translation
163+
position: "centre" # "center" or "right", if needed to center or right-align the translation
164+
```
165+
166+
## Running locally
167+
168+
You can run the tutorial server locally to see how the translation looks.
169+
170+
The server and install instructions are at <https://github.com/javascript-tutorial/server>.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /