aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/_summary.md2
-rw-r--r--docs/contributing.md12
-rw-r--r--docs/index.html9
-rw-r--r--docs/translating.md44
-rw-r--r--readme.md4
5 files changed, 57 insertions, 14 deletions
diff --git a/docs/_summary.md b/docs/_summary.md
index 808a8de4a..409df6d18 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -111,7 +111,7 @@
111 * [Using Eclipse with QMK](other_eclipse.md) 111 * [Using Eclipse with QMK](other_eclipse.md)
112 * [Using VSCode with QMK](other_vscode.md) 112 * [Using VSCode with QMK](other_vscode.md)
113 * [Support](support.md) 113 * [Support](support.md)
114 * [How to add translations](translating.md) 114 * [Translating the QMK Docs](translating.md)
115 115
116* QMK Internals (In Progress) 116* QMK Internals (In Progress)
117 * [Defines](internals_defines.md) 117 * [Defines](internals_defines.md)
diff --git a/docs/contributing.md b/docs/contributing.md
index 04dc0da20..7c365b418 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -101,6 +101,18 @@ enum my_keycodes {
101}; 101};
102``` 102```
103 103
104### Previewing the Documentation
105
106Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder:
107
108 ./bin/qmk docs
109
110or if you only have Python 3 installed:
111
112 python3 -m http.server 8936
113
114and navigating to `http://localhost:8936/`.
115
104## Keymaps 116## Keymaps
105 117
106Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap. 118Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap.
diff --git a/docs/index.html b/docs/index.html
index d2ba99897..d20fbd64a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -35,6 +35,15 @@
35 loadNavbar: '_langs.md', 35 loadNavbar: '_langs.md',
36 mergeNavbar: true, 36 mergeNavbar: true,
37 auto2top: true, 37 auto2top: true,
38 fallbackLanguages: [
39 'de',
40 'es',
41 'fr-fr',
42 'he-il',
43 'ja',
44 'ru-ru',
45 'zh-cn'
46 ],
38 formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}', 47 formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}',
39 search: { 48 search: {
40 paths: 'auto', 49 paths: 'auto',
diff --git a/docs/translating.md b/docs/translating.md
index 6eb268763..12fe7c85f 100644
--- a/docs/translating.md
+++ b/docs/translating.md
@@ -1,29 +1,49 @@
1# How to translate the QMK docs into different languages 1# Translating the QMK Docs
2 2
3All 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. 3All 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 4
5A `_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: 5A `_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 6
7 * [QMK简介](zh-cn/getting_started_introduction.md) 7```markdown
8 * [QMK简介](zh-cn/getting_started_introduction.md)
9```
10
11All links to other docs pages must also be prefixed with the language folder. If the link is to a specific part of the page (ie. a certain heading), you must use the English ID for the heading, like so:
12
13```markdown
14[建立你的环境](zh-cn/newbs-getting-started.md#set-up-your-environment)
15
16## 建立你的环境 :id=set-up-your-environment
17```
8 18
9Once you've finished translating a new language, you'll also need to modify the following files: 19Once you've finished translating a new language, you'll also need to modify the following files:
10 20
11* [`docs/_langs.md`](https://github.com/qmk/qmk_firmware/blob/master/docs/_langs.md) 21* [`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: 22 Each line should contain a country flag as a [GitHub emoji shortcode](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md#country-flag) followed by the name represented in its own language:
13 23
14 - [:cn: 中文](/zh-cn/) 24 ```markdown
25 - [:cn: 中文](/zh-cn/)
26 ```
15 27
16* [`docs/index.html`](https://github.com/qmk/qmk_firmware/blob/master/docs/index.html) 28* [`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: 29 Both `placeholder` and `noData` objects should have a dictionary entry for the language folder in a string:
18 30
19 '/zh-cn/': '没有结果!', 31 ```js
32 '/zh-cn/': '没有结果!',
33 ```
20 34
21## Previewing the translations 35 And make sure to add the language folder in the `fallbackLanguages` list, so it will properly fall back to English instead of 404ing:
22 36
23Before opening a pull request, you can preview your additions if you have Python 3 installed by running this command in the `docs/` folder: 37 ```js
38 fallbackLanguages: [
39 // ...
40 'zh-cn',
41 // ...
42 ],
43 ```
24 44
25 python -m http.server 9000 45## Previewing the Translations
26 46
27and navigating to http://localhost:9000/ - you should be able to select your new language from the "Translations" menu at the top-right. 47See (Previewing the Documentation)[contributing.md#previewing-the-documentation] for how to set up a local instance of the docs - you should be able to select your new language from the "Translations" menu at the top-right.
28 48
29Once you're happy with your work, feel free to open a pull request! 49Once you're happy with your work, feel free to open a pull request!
diff --git a/readme.md b/readme.md
index 2641e2c2e..5a9166c04 100644
--- a/readme.md
+++ b/readme.md
@@ -13,7 +13,9 @@ This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github
13 13
14* [See the official documentation on docs.qmk.fm](https://docs.qmk.fm) 14* [See the official documentation on docs.qmk.fm](https://docs.qmk.fm)
15 15
16The docs are powered by [Docsify](https://docsify.js.org/) and hosted on [GitHub](/docs/). You can request changes by making a fork and [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit Document" link at the bottom of any page. 16The docs are powered by [Docsify](https://docsify.js.org/) and hosted on [GitHub](/docs/). They are also viewable offline; see [Previewing the Documentation](https://docs.qmk.fm/#/contributing?id=previewing-the-documentation) for more details.
17
18You can request changes by making a fork and opening a [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit Document" link at the bottom of any page.
17 19
18## Supported Keyboards 20## Supported Keyboards
19 21