|
1 |
| -# The Modern JavaScript Tutorial |
| 1 | +# The Modern JavaScript Tutorial in Portuguese (Brazil) |
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 Portuguese (Brazil). |
4 | 4 |
|
5 |
| -## Translations |
| 5 | +Please help us to make the translation better. |
6 | 6 |
|
7 |
| -We'd like to make the tutorial available in many languages. Please help us to translate. |
| 7 | +- See the [Portuguese (Brazil) Translate Progress](https://github.com/javascript-tutorial/pt-BR.javascript.info/issues/1) issue. |
| 8 | +- Choose an unchecked article you'd like to translate. |
| 9 | +- Add a comment to that issue to inform the maintainer that you're translating it. |
| 10 | +- Fork the repository, translate and send a PR when done. |
8 | 11 |
|
9 |
| -See <https://github.com/javascript-tutorial/translate> for the details. |
| 12 | +🎉 Thank you! |
10 | 13 |
|
11 |
| -## Contributions |
| 14 | +Your name and the contribution size will appear in the "About project" page when the translation gets published. |
12 | 15 |
|
13 |
| -We'd also like to collaborate on the tutorial with other people. |
| 16 | +P.S. The full list of languages can be found at <https://github.com/javascript-tutorial/translate>. |
14 | 17 |
|
15 |
| -Something's wrong? A topic is missing? Explain it to people, add as PR 👏 |
| 18 | +## Structure |
16 | 19 |
|
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>. |
| 20 | +Every chapter, an article or a task resides in its own folder. |
18 | 21 |
|
19 |
| -The list of contributors is available at <https://javascript.info/about#contributors>. |
| 22 | +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. |
20 | 23 |
|
21 |
| -## Structure |
| 24 | +The folder has one of files: |
| 25 | + |
| 26 | +- `index.md` for a section, |
| 27 | +- `article.md` for an article, |
| 28 | +- `task.md` for a task formulation (+`solution.md` with the solution text if any). |
| 29 | + |
| 30 | +A file starts with the `# Title Header`, and then the text in Markdown-like format, editable in a simple text editor. |
| 31 | + |
| 32 | +Additional resources and examples for the article or the task, are also in the same folder. |
| 33 | + |
| 34 | +## Translation Tips |
| 35 | + |
| 36 | +- The translation doesn't have to be word-by-word precise. It should be technically correct and explain well. |
| 37 | +- If you see that the English version can be improved – great, please send a PR to it. |
| 38 | +- Please keep line breaks and paragraphs "as is": makes it easy to merge future changes from the English version into the translation. |
| 39 | + |
| 40 | +### Text in Code Blocks |
| 41 | + |
| 42 | +- Translate comments. |
| 43 | +- Translate user-messages and example strings. |
| 44 | +- Don't translate variables, classes, identifiers. |
| 45 | +- Ensure that the code works after the translation :) |
| 46 | + |
| 47 | +Example: |
| 48 | + |
| 49 | +```js |
| 50 | +// Example |
| 51 | +const text = "Hello, world"; |
| 52 | +document.querySelector('.hello').innerHTML = text; |
| 53 | +``` |
| 54 | + |
| 55 | +✅ DO (translate comment): |
| 56 | + |
| 57 | +```js |
| 58 | +// Ejemplo |
| 59 | +const text = 'Hola mundo'; |
| 60 | +document.querySelector('.hello').innerHTML = text; |
| 61 | +``` |
| 62 | + |
| 63 | +❌ DON'T (translate class): |
| 64 | + |
| 65 | +```js |
| 66 | +// Ejemplo |
| 67 | +const text = 'Hola mundo'; |
| 68 | +// ".hello" is a class |
| 69 | +// DO NOT TRANSLATE |
| 70 | +document.querySelector('.hola').innerHTML = text; |
| 71 | +``` |
| 72 | + |
| 73 | +### External Links |
| 74 | + |
| 75 | +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. |
| 76 | + |
| 77 | +Example: |
| 78 | + |
| 79 | +```md |
| 80 | +[JavaScript](https://en.wikipedia.org/wiki/JavaScript) is a programming language. |
| 81 | +``` |
| 82 | + |
| 83 | +✅ OK (en -> es): |
22 | 84 |
|
23 |
| -Every chapter, article or a task has its folder. |
| 85 | +```md |
| 86 | +[JavaScript](https://es.wikipedia.org/wiki/JavaScript) es un lenguaje de programación. |
| 87 | +``` |
24 | 88 |
|
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. |
| 89 | +For links to MDN, that are only partially translated, also use the language-specific version. |
26 | 90 |
|
27 |
| -The type of the material is defined by the file inside the folder: |
| 91 | +If a linked article has no translated version, leave the link "as is". |
28 | 92 |
|
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) |
32 | 93 |
|
33 |
| -Each of these files starts from the `# Main header`. |
| 94 | +## Running locally |
34 | 95 |
|
35 |
| -It's very easy to add something new. |
| 96 | +You can run the tutorial locally, to immediately see the changes on-site. |
36 | 97 |
|
37 |
| ---- |
38 |
| -💓 |
39 |
| -Ilya Kantor @iliakan |
| 98 | +The server is at <https://github.com/javascript-tutorial/server>. |
0 commit comments