Skip to content

Commit 557a9cf

Browse files
authored
feat(i18n): add Japanese lang support (gitalk#460)
1 parent dc0bedb commit 557a9cf

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

readme-cn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Gitalk 是一个基于 GitHub Issue 和 Preact 开发的评论插件。
1313
## 特性
1414

1515
- 使用 GitHub 登录
16-
- 支持多语言 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa]
16+
- 支持多语言 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa, ja]
1717
- 支持个人或组织
1818
- 无干扰模式(设置 distractionFreeMode 为 true 开启)
1919
- 快捷键提交评论 (cmd|ctrl + enter)
@@ -154,7 +154,7 @@ import GitalkComponent from "gitalk/dist/gitalk-component";
154154

155155
Default: `navigator.language || navigator.userLanguage`.
156156

157-
设置语言,支持 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa]
157+
设置语言,支持 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa, ja]
158158

159159
- **perPage** `Number`
160160

readme-zh.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gitalk 是一個基於 GitHub Issue 和 Preact 開發的評論插件。
1414
## 特性
1515

1616
- 使用 GitHub 登錄
17-
- 支持多語言 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa]
17+
- 支持多語言 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa, ja]
1818
- 支持個人或組織
1919
- 無干擾模式(設置 distractionFreeMode 為 true 開啟)
2020
- 快捷鍵提交評論 (cmd|ctrl + enter)
@@ -149,7 +149,7 @@ import GitalkComponent from "gitalk/dist/gitalk-component";
149149

150150
Default: `navigator.language || navigator.userLanguage`.
151151

152-
設置語言,支持 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa]
152+
設置語言,支持 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa, ja]
153153

154154
- **perPage** `Number`
155155

readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Gitalk is a modern comment component based on GitHub Issue and Preact.
1515
- Authentication with github account
1616
- Serverless, all comments will be stored as github issues
1717
- Both personal and organization github projects can be used to store comments
18-
- Localization, support multiple languages [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa]
18+
- Localization, support multiple languages [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko, fa, ja]
1919
- Facebook-like distraction free mode (Can be enabled via the `distractionFreeMode` option)
2020
- Hotkey submit comment (cmd|ctrl + enter)
2121

@@ -154,7 +154,7 @@ And use the component like
154154

155155
Default: `navigator.language || navigator.userLanguage`.
156156

157-
Localization language key, `en`, `zh-CN`, `zh-TW`, `es-ES`, `fr`, `ru`, `de`, `pl`, `ko` and `fa` are currently available.
157+
Localization language key, support [`en`, `zh-CN`, `zh-TW`, `es-ES`, `fr`, `ru`, `de`, `pl`, `ko`, `fa`, `ja`].
158158

159159
- **perPage** `Number`
160160

src/i18n/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import DE from './de.json'
99
import PL from './pl.json'
1010
import KO from './ko.json'
1111
import FA from './fa.json'
12+
import JA from './ja.json'
1213

1314
const i18nMap = {
1415
'zh': ZHCN,
@@ -22,6 +23,7 @@ const i18nMap = {
2223
'pl': PL,
2324
'ko': KO,
2425
'fa': FA,
26+
'ja': JA,
2527
}
2628

2729
export default function (language) {

src/i18n/ja.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"init": "Gitalk を読み込んでいます...",
3+
"no-found-related": "%{link} に関連するものが見当たりません",
4+
"please-contact": "コメントを初期化するために %{user} に連絡してください",
5+
"init-issue": "イシューを初期化する",
6+
"leave-a-comment": "コメントを残す",
7+
"preview": "プレビュー",
8+
"edit": "編集する",
9+
"comment": "コメント",
10+
"support-markdown": "Markdown 記法をサポートしています",
11+
"login-with-github": "GitHub にログインする",
12+
"first-comment-person": "最初にコメントを残しましょう!",
13+
"commented": "によるコメント",
14+
"load-more": "もっと見る",
15+
"counts": "%{counts} つのコメント",
16+
"sort-asc": "投稿順に並び替え",
17+
"sort-desc": "最新順で並び替え",
18+
"logout": "ログアウト",
19+
"anonymous": "匿名"
20+
}

0 commit comments

Comments
 (0)