|
1 | | -# Translation percentage calculator |
| 1 | +# Translation of the Modern JavaScript Tutorial |
2 | 2 |
|
3 | | -Checks out / updates repos listed at https://github.com/iliakan/javascript-tutorial-en. |
| 3 | +This repo hosts tools to translate the Modern JavaScript Tutorial <https://javascript.info>. |
4 | 4 |
|
5 | | -For each repo, compares it vs en version. |
| 5 | +| Language | Github | Translated (%) | Last Commit | Published | |
| 6 | +|----------|--------|----------------|------------------------------------------------------------------------------------------|-----------| |
| 7 | +| Chinese | [Contribute](https://github.com/javascript-tutorial/zh.javascript.info) |  |  | [zh.javascript.info](https://zh.javascript.info) | |
| 8 | +| Japanese | [Contribute](https://github.com/javascript-tutorial/ja.javascript.info) |  |  | [ja.javascript.info](https://ja.javascript.info) | |
| 9 | +| Russian | [Contribute](https://github.com/javascript-tutorial/ru.javascript.info) |  |  | [ru.javascript.info](https://ru.javascript.info) | |
6 | 10 |
|
7 | | -The comparison is as follows (`countTranslation.js`): |
| 11 | +## Starting a new translation |
8 | 12 |
|
9 | | -1. For each `.md` file in the en version. |
10 | | -2. If there exists the same file and it's different enough (jsdiff), it's considered translated. |
11 | | -3. Then translated count / total files count = percentage. |
| 13 | +If you would like to be the maintainer of a new translation, submit a PR adding a new file `{lang-code}.json` |
| 14 | +to the `langs` folder with the following information: |
12 | 15 |
|
| 16 | +* [Language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) |
| 17 | +* List of maintainers |
| 18 | + |
| 19 | +For example: |
| 20 | + |
| 21 | +```json |
| 22 | +{ |
| 23 | + "name": "English", |
| 24 | + "code": "en", |
| 25 | + "maintainers": ["iliakan", "lex111"] |
| 26 | +} |
| 27 | +``` |
| 28 | + |
| 29 | + |
| 30 | +As a maintainer: |
| 31 | + |
| 32 | +- You should know JavaScript well enough to translate and review pull requests of others. |
| 33 | + |
| 34 | +Once the PR is accepted, we will: |
| 35 | + |
| 36 | +* Create a new repository for you at `javascript-tutorial/{lang-code}.javascript.info`. |
| 37 | +* Add/invite all maintainers to the team `translate-{lang-code}` in the javascript-tutorial organization. |
| 38 | +* Create an special issue in the new repository to track your translation progress. |
| 39 | + |
| 40 | +If you are not a member of the organization, you should receive an email invite to join. Please accept this invite so you can get admin access to your repository! |
| 41 | + |
| 42 | +You may want to [pin](https://help.github.com/articles/pinning-an-issue-to-your-repository/) the generated issue to make it easier to find. |
| 43 | + |
| 44 | +See [Maintainer Tips](/MAINTAINER.md) for additional advice on how to manage your repository. |
| 45 | + |
| 46 | +Happy translating! |
| 47 | + |
| 48 | + |
| 49 | +## Adding a maintainer |
| 50 | + |
| 51 | +If you are currently a maintainer of a translation and want to add another member, send a pull request to this repo updating `langs/{lang-code}.json`, where `{lang-code}` is the language code of the repo you want to be a maintainer of. |
| 52 | + |
| 53 | +If you are interested in becoming a maintainer for a translation, please ask one of the current maintainers if they would like to add you. While different maintainers can have different requirements, usually they look for people who have already contributed to the translation already, either by translating or reviewing. |
| 54 | + |
| 55 | +## Before publishing |
| 56 | + |
| 57 | +1. Review your translations and make sure that the pages listed in "Core Pages" are fully translated. Run the site yourself locally to make sure there are no bugs or missing translations. |
| 58 | +2. ask {TBD} to add {lang-code}.reactjs.org as a subdomain. |
| 59 | +3. submit a PR to [reactjs/reactjs.org](https://github.com/reactjs/reactjs.org) adding the language in the dropdown (once we make it). |
| 60 | +4. Celebrate! 🎉🌐 |
| 61 | + |
| 62 | +## Acknowledgements |
| 63 | + |
| 64 | +The syncing scripts and the translation bot are based off of and iterated upon [react.org-translation](https://github.com/reactjs/reactjs.org-translation) by @tesseralis. |
0 commit comments