diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2019-10-01 13:51:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-01 13:51:23 -0400 |
| commit | 68072e931a1e67ce2d6f71be5efff559305072d6 (patch) | |
| tree | 46b617670137b658629c6dd33d41b115d94221af /docs/translating.md | |
| parent | c7b28bffc13d405bea2e0c0243437920659232f2 (diff) | |
| download | qmk_firmware-68072e931a1e67ce2d6f71be5efff559305072d6.tar.gz qmk_firmware-68072e931a1e67ce2d6f71be5efff559305072d6.zip | |
Expose zh-cn docs, delete bad zh docs, add docs for adding translations (#6855)
* expose zh-cn docs, delete bad zh docs, add docs for adding translations
* Update docs/translating.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update docs/translating.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* update for python 3
Diffstat (limited to 'docs/translating.md')
| -rw-r--r-- | docs/translating.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/translating.md b/docs/translating.md new file mode 100644 index 000000000..6eb268763 --- /dev/null +++ b/docs/translating.md | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # How to translate the QMK docs into different languages | ||
| 2 | |||
| 3 | All files in the root folder (`docs/`) should be in English - all other languages should be in subfolders with the ISO 639-1 language codes, followed by `-` and the country code where relevant. [A list of common ones can be found here](https://www.andiamo.co.uk/resources/iso-language-codes/). If this folder doesn't exist, you may create it. Each of the translated files should have the same name as the English version, so things can fall back successfully. | ||
| 4 | |||
| 5 | A `_summary.md` file should exist in this folder with a list of links to each file, with a translated name, and link preceded by the language folder: | ||
| 6 | |||
| 7 | * [QMK简介](zh-cn/getting_started_introduction.md) | ||
| 8 | |||
| 9 | Once you've finished translating a new language, you'll also need to modify the following files: | ||
| 10 | |||
| 11 | * [`docs/_langs.md`](https://github.com/qmk/qmk_firmware/blob/master/docs/_langs.md) | ||
| 12 | Each line should contain a country flag in the format `:us:` followed by the name represented in its own language: | ||
| 13 | |||
| 14 | - [:cn: 中文](/zh-cn/) | ||
| 15 | |||
| 16 | * [`docs/index.html`](https://github.com/qmk/qmk_firmware/blob/master/docs/index.html) | ||
| 17 | Both `placeholder` and `noData` objects should have a dictionary entry for the language folder in a string: | ||
| 18 | |||
| 19 | '/zh-cn/': '没有结果!', | ||
| 20 | |||
| 21 | ## Previewing the translations | ||
| 22 | |||
| 23 | Before opening a pull request, you can preview your additions if you have Python 3 installed by running this command in the `docs/` folder: | ||
| 24 | |||
| 25 | python -m http.server 9000 | ||
| 26 | |||
| 27 | and navigating to http://localhost:9000/ - you should be able to select your new language from the "Translations" menu at the top-right. | ||
| 28 | |||
| 29 | Once you're happy with your work, feel free to open a pull request! | ||
