|
1 |
| -# The Modern JavaScript Tutorial |
| 1 | +# The Modern JavaScript Tutorial in Test |
2 | 2 |
|
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 Test. |
4 | 4 |
|
5 |
| -## Translations |
| 5 | +**That's how you can contribute:** |
6 | 6 |
|
7 |
| -We'd like to make the tutorial available in many languages. Please help us to translate. |
| 7 | +- See the [Test Translate Progress](https://github.com/javascript-tutorial/test.javascript.info/issues/26) issue. |
| 8 | +- Choose an unchecked article you'd like to translate. |
| 9 | +- Add a comment with the article title to the issue, e.g. `An Introduction to JavaScript`. |
| 10 | + - Our bot will mark it in the issue, for everyone to know that you're translating it. |
| 11 | + - The comment should only contain the title. |
| 12 | +- Fork the repository, translate and send a PR when done. |
| 13 | + - PR title should match article title, the bot will write it's number into the issue. |
8 | 14 |
|
9 |
| -See <https://github.com/javascript-tutorial/translate> for the details. |
| 15 | +If you're a maintainer, you can just translate and push, but please check articles as translated in the [issue](https://github.com/javascript-tutorial/test.javascript.info/issues/26), for others to see that. |
10 | 16 |
|
11 |
| -## Contributions |
| 17 | +If you're just a newcomer, without write access to the repo, please kindly allow maintainers to review and merge your translation. |
| 18 | + |
| 19 | +If something's unclear, feel free to ask, make an issue [here](https://github.com/javascript-tutorial/test.javascript.info/issues/new) or in the [English repo](https://github.com/javascript-tutorial/en.javascript.info/issues/new). |
| 20 | + |
| 21 | +**Let others know what you're translating, in message boards or chats in your language. Invite them to join!** |
12 | 22 |
|
13 |
| -We'd also like to collaborate on the tutorial with other people. |
| 23 | +🎉 Thank you! |
14 | 24 |
|
15 |
| -Something's wrong? A topic is missing? Explain it to people, add as PR 👏 |
| 25 | +Your name and the contribution size will appear in the "About project" page when the translation gets published. |
16 | 26 |
|
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>. |
| 27 | +If you'd like to join as a maintainer, write us at <https://github.com/javascript-tutorial/en.javascript.info/issues/new>. |
18 | 28 |
|
19 |
| -The list of contributors is available at <https://javascript.info/about#contributors>. |
| 29 | +P.S. The full list of languages can be found at <https://javascript.info/translate>. |
20 | 30 |
|
21 | 31 | ## Structure
|
22 | 32 |
|
23 |
| -Every chapter, article or a task has its folder. |
| 33 | +Every chapter, an article or a task resides in its own folder. |
24 | 34 |
|
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. |
| 35 | +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. |
26 | 36 |
|
27 |
| -The type of the material is defined by the file inside the folder: |
| 37 | +The folder has one of files: |
28 | 38 |
|
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) |
| 39 | +- `index.md` for a section, |
| 40 | +- `article.md` for an article, |
| 41 | +- `task.md` for a task formulation (+`solution.md` with the solution text if any). |
32 | 42 |
|
33 |
| -Each of these files starts from the `# Main header`. |
| 43 | +A file starts with the `# Title Header`, and then the text in Markdown-like format, editable in a simple text editor. |
34 | 44 |
|
35 |
| -It's very easy to add something new. |
| 45 | +Additional resources and examples for the article or the task, are also in the same folder. |
| 46 | + |
| 47 | +## Translation Tips |
| 48 | + |
| 49 | +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. |
| 50 | + |
| 51 | +If you see that the English version can be improved – great, please send a PR to it. |
| 52 | + |
| 53 | +### Terms |
| 54 | + |
| 55 | +- Some specification terms are not to be translated, e.g. "Function Declaration" can be left "as is". |
| 56 | +- For other terms like `resolved promise`, `slash`, `regexp`, and so on look a good glossary, hopefully there's one for your language already. |
| 57 | + - If there's no dictionary, look for translations in manuals, such as [MDN](https://developer.mozilla.org/en-US/). |
| 58 | + |
| 59 | +### Text in Code Blocks |
| 60 | + |
| 61 | +- Translate comments. |
| 62 | +- Translate user-messages and example strings. |
| 63 | +- Don't translate variables, classes, identifiers. |
| 64 | +- Ensure that the code works after the translation :) |
| 65 | + |
| 66 | +Example: |
| 67 | + |
| 68 | +```js |
| 69 | +// Example |
| 70 | +const text = "Hello, world"; |
| 71 | +document.querySelector('.hello').innerHTML = text; |
| 72 | +``` |
| 73 | + |
| 74 | +✅ DO (translate comment): |
| 75 | + |
| 76 | +```js |
| 77 | +// Ejemplo |
| 78 | +const text = 'Hola mundo'; |
| 79 | +document.querySelector('.hello').innerHTML = text; |
| 80 | +``` |
| 81 | + |
| 82 | +❌ DON'T (translate class): |
| 83 | + |
| 84 | +```js |
| 85 | +// Ejemplo |
| 86 | +const text = 'Hola mundo'; |
| 87 | +// ".hello" is a class |
| 88 | +// DO NOT TRANSLATE |
| 89 | +document.querySelector('.hola').innerHTML = text; |
| 90 | +``` |
| 91 | + |
| 92 | +### External Links |
| 93 | + |
| 94 | +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. |
| 95 | + |
| 96 | +Example: |
| 97 | + |
| 98 | +```md |
| 99 | +[JavaScript](https://en.wikipedia.org/wiki/JavaScript) is a programming language. |
| 100 | +``` |
| 101 | + |
| 102 | +✅ OK (en -> es): |
| 103 | + |
| 104 | +```md |
| 105 | +[JavaScript](https://es.wikipedia.org/wiki/JavaScript) es un lenguaje de programación. |
| 106 | +``` |
| 107 | + |
| 108 | +For links to MDN, a partially translated version is ok. |
| 109 | + |
| 110 | +If a linked article has no translated version, leave the link "as is". |
| 111 | + |
| 112 | +### Metadata |
| 113 | + |
| 114 | +Some files, usually tasks, have YAML metadata at the top, delimited by `---`: |
| 115 | + |
| 116 | +```md |
| 117 | +importance: 5 |
36 | 118 |
|
37 | 119 | ---
|
38 |
| -💓 |
39 |
| -Ilya Kantor @iliakan |
| 120 | +... |
| 121 | +``` |
| 122 | + |
| 123 | +Please don't translate "importance" (and other top metadata). |
| 124 | + |
| 125 | +### Anchors |
| 126 | + |
| 127 | +Some headers have `[#anchor]` at the end, e.g. |
| 128 | + |
| 129 | +```md |
| 130 | +## Spread operator [#spread-operator] |
| 131 | +``` |
| 132 | + |
| 133 | +Please don't translate or remove the `[#...]` part, it's for URL anchors. |
| 134 | + |
| 135 | +## Running locally |
| 136 | + |
| 137 | +You can run the tutorial server locally to see how the translation looks. |
| 138 | + |
| 139 | +The server and install instructions are at <https://github.com/javascript-tutorial/server>. |
0 commit comments