Skip to content

Commit 91f00b0

Browse files
committed
Change jp_JP to ja_JP
1 parent b54ec2c commit 91f00b0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/en/05+5-translation.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The process is similar to updating an existing translation, and has the same req
4242

4343
For release builds (RELEASE=1), the firmware uses wenquanyi_9pt_u8g2.bdf to display unicode characters.
4444
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.
45+
If not, it's not recommended supporting the new language due to the MCU internal flash restrictions.
4646

4747
## Web App
4848

@@ -52,41 +52,41 @@ The language file can be found under `web/src/i18n'
5252

5353
## How to add new language translation
5454

55-
In this example, we will add a Japanese (jp_JP) translation:
55+
In this example, we will add a Japanese (ja_JP) translation:
5656

57-
1. Copy the `en_US.js` file and name it `jp_JP.js`
58-
2. Translate the string within `jp_JP.js` including the `changeok` message.
57+
1. Copy the `en_US.js` file and name it `ja_JP.js`
58+
2. Translate the string within `ja_JP.js` including the `changeok` message.
5959

6060
Don't translate the other language names.
6161

6262
Add your language at the bottom of the `lang {` section:
6363

64-
`jp: '日本語',`
64+
`ja: '日本語',`
6565

66-
3. Edit `index.js` while keeping it's current structure, adding:
66+
3. Edit `index.js` while keeping its current structure, adding:
6767

6868
```js
69-
import elementJpLocale from 'element-ui/lib/locale/lang/jp' // element-ui
70-
lang import jpLocale from './jp_JP' elementJpLocale
69+
import elementJaLocale from 'element-ui/lib/locale/lang/ja' // element-ui
70+
lang import jaLocale from './ja_JP' elementJpLocale
7171
```
7272

7373
And extending `messages`:
7474

7575
```js
76-
jp_JP: {
77-
...jpLocale,
78-
...elementJpLocale,
76+
ja_JP: {
77+
...jaLocale,
78+
...elementJaLocale,
7979
},
8080
```
8181

8282
4. Add your language to the other `.js` files (within the `lang: {` section):
8383

84-
`vuejp: '日本語',`
84+
`vueja: '日本語',`
8585

8686
5. Add your language to the `web/src/App.vue` file:
8787

8888
```js
89-
<el-dropdown-item Enabled="language==='jp'" command="jp" divided>
90-
{{ $t('lang.jp') }}
89+
<el-dropdown-item Enabled="language==='ja'" command="ja" divided>
90+
{{ $t('lang.ja') }}
9191
</el-dropdown-item>
9292
```

0 commit comments

Comments
 (0)