You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing CSV files with VSCode, the extension [Edit CSV](https://marketplace.visualstudio.com/items?itemName=janisdd.vscode-edit-csv) is recommended.
8
8
9
-
*Windows* requires you to have [Python](https://www.python.org/downloads/) and [Git](https://git-scm.com/download/windows) installed and within your `$PATH`
10
-
11
-
For *Linux*, most Distribution come with `python` and `git` by default and
12
-
13
-
*macOS* comes bundled with `python`, but to use `git` you either need to install the Command Line tools via `xcode-select –-install`, or download [Git](https://git-scm.com/download/mac) separately.
14
-
15
-
9
+
**Windows** requires you to have [Python](https://www.python.org/downloads/) and [Git](https://git-scm.com/download/windows) installed and within your `$PATH`
10
+
For **Linux**, most distributions come with `python` and `git` by default and **macOS** comes bundled with `python`, but to use `git` you either need to install the Command Line tools via `xcode-select –-install`, or download [Git](https://git-scm.com/download/mac) separately.
16
11
17
12
### Windows
18
13
19
-
20
14
1. Clone this repository
21
-
`git clone https://github.com/solosky/pixl.js.git; cd pixl.js`
15
+
`git clone https://github.com/solosky/pixl.js.git; cd pixl.js`
22
16
2. Edit `fw/data/i18n.csv`
23
17
3. Run `py.exe fw/scripts/i18n_gen.py` to generate new language files.
24
-
4.*Optional:* Run `py.exe fw/scripts/font_data_gen.py` to generate new font data if you add new charaters in `i18n.csv`
18
+
4._Optional:_ Run `py.exe fw/scripts/font_data_gen.py` to generate new font data if you add new characters in `i18n.csv`
25
19
5.[Build the Firmware](03-Build-Firmware.md)
26
20
27
-
28
21
### Linux and macOS
29
22
30
23
1. Clone this repository
31
-
`git clone https://github.com/solosky/pixl.js.git; cd pixl.js`
24
+
`git clone https://github.com/solosky/pixl.js.git; cd pixl.js`
32
25
2. Edit `fw/data/i18n.csv`
33
26
3. Run `python3 fw/scripts/i18n_gen.py` to generate new language files.
34
-
4. Optional: Run `python fw/scripts/font_data_gen.py` to generate new font data if you add new charaters in `i18n.csv`
27
+
4. Optional: Run `python fw/scripts/font_data_gen.py` to generate new font data if you add new characters in `i18n.csv`
35
28
5.[Build the Firmware](03-Build-Firmware.md)
36
29
37
-
38
30
## How to add new language translation
31
+
39
32
The process is similar to updating an existing translation, and has the same requirements depending on your Operating System.
40
33
41
34
1. Add new column in `fw/data/i18n.csv`, for example "ja_JP"
42
35
2. Run `fw/scripts/i18n_gen.py` to generate new language files.
43
-
4. Optional: Run `fw/scripts/font_data_gen.py` to generate new font data if you add new charaters in `i18n.csv`
36
+
3. Optional: Run `fw/scripts/font_data_gen.py` to generate new font data if you add new characters in `i18n.csv`
44
37
4. Edit `fw/application/src/i18n/language.h` and `fw/application/src/i18n/language.c` to adopt new language
45
38
5. Edit Makefile to include `$(PROJ_DIR)/i18n/ja_JP.c` as C source files
46
-
5.[Build the Firmware](03-Build-Firmware.md)
39
+
6.[Build the Firmware](03-Build-Firmware.md)
47
40
48
-
## Font notes
49
-
50
-
For release builds (RELEASE=1), the firmware uses wenquanyi_9pt_u8g2.bdf to display unicode characters. <br />
51
-
Please check if the new language charater codepoint is included in wenquanyi_9pt_u8g2.bdf or not.<br />
52
-
If not, it's not recommended to support the new language due to the MCU internal flash restrction.
41
+
## Font notes
53
42
43
+
For release builds (RELEASE=1), the firmware uses wenquanyi_9pt_u8g2.bdf to display unicode characters.
44
+
Please check if the new language character codepoint is included in wenquanyi_9pt_u8g2.bdf or not.
45
+
If not, it's not recommended to support the new language due to the MCU internal flash restrictions.
54
46
55
47
## Web App
56
48
@@ -65,30 +57,36 @@ In this example, we will add a Japanese (jp_JP) translation:
65
57
1. Copy the `en_US.js` file and name it `jp_JP.js`
66
58
2. Translate the string within `jp_JP.js` including the `changeok` message.
67
59
68
-
Don't translate the other language names.
60
+
Don't translate the other language names.
69
61
70
-
Add your language at the bottom of the `lang {` section:
71
-
`jp: '日本語',`
62
+
Add your language at the bottom of the `lang {` section:
72
63
73
-
3. Edit `index.js` while keeping it's current structure:
64
+
`jp: '日本語',`
74
65
75
-
Adding
76
-
```
77
-
import elementJpLocale from 'element-ui/lib/locale/lang/jp' // element-ui lang`
66
+
3. Edit `index.js` while keeping it's current structure, adding:
78
67
79
-
import jpLocale from “./jp_JP”;
80
-
jp_JP: {
81
-
... jpLocale,
82
-
... elementJpLocale
83
-
}
84
-
```
85
-
4. Add your language to the other `.js` files (within the `lang: {` section):
0 commit comments