Skip to content

Commit 1bfde65

Browse files
committed
feat: i18n support ru
relate gitalk#86
1 parent 2717c04 commit 1bfde65

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

readme-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Gitalk 是一个基于 Github Issue 和 Preact 开发的评论插件。
77
## 特性
88

99
- 使用 Github 登录
10-
- 支持多语言 [en, zh-CN, zh-TW, es-ES, fr]
10+
- 支持多语言 [en, zh-CN, zh-TW, es-ES, fr, ru]
1111
- 支持个人或组织
1212
- 无干扰模式(设置 distractionFreeMode 为 true 开启)
1313
- 快捷键提交评论 (cmd|ctrl + enter)

readme-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Gitalk 是一個基於 Github Issue 和 Preact 開發的評論插件。
88
## 特性
99

1010
- 使用 Github 登錄
11-
- 支持多語言 [en, zh-CN, zh-TW, es-ES, fr]
11+
- 支持多語言 [en, zh-CN, zh-TW, es-ES, fr, ru]
1212
- 支持個人或組織
1313
- 無干擾模式(設置 distractionFreeMode 為 true 開啟)
1414
- 快捷鍵提交評論 (cmd|ctrl + enter)

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gitalk is a modern comment component based on Github Issue and Preact.
99
- Authentication with github account
1010
- Serverless, all comments will be stored as github issues
1111
- Both personal and organization github projects can be used to store comments
12-
- Localization, support multiple languages [en, zh-CN, zh-TW, es-ES, fr]
12+
- Localization, support multiple languages [en, zh-CN, zh-TW, es-ES, fr, ru]
1313
- Facebook-like distraction free mode (Can be enabled via the `distractionFreeMode` option)
1414
- Hotkey submit comment (cmd|ctrl + enter)
1515

src/component/comment.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,21 @@ import buildDistanceInWordsLocaleZHCN from 'date-fns/locale/zh_cn/build_distance
66
import buildDistanceInWordsLocaleZHTW from 'date-fns/locale/zh_tw/build_distance_in_words_locale/index'
77
import buildDistanceInWordsLocaleES from 'date-fns/locale/es/build_distance_in_words_locale/index'
88
import buildDistanceInWordsLocaleFR from 'date-fns/locale/fr/build_distance_in_words_locale/index'
9+
import buildDistanceInWordsLocaleRU from 'date-fns/locale/ru/build_distance_in_words_locale/index'
910
import 'github-markdown-css/github-markdown.css'
1011

1112
const ZHCN = buildDistanceInWordsLocaleZHCN()
1213
const ZHTW = buildDistanceInWordsLocaleZHTW()
1314
const ES = buildDistanceInWordsLocaleES()
1415
const FR = buildDistanceInWordsLocaleFR()
16+
const RU = buildDistanceInWordsLocaleRU()
1517
window.GT_i18n_distanceInWordsLocaleMap = {
1618
'zh': ZHCN,
1719
'zh-CN': ZHCN,
1820
'zh-TW': ZHTW,
1921
'es-ES': ES,
2022
'fr': FR,
23+
'ru': RU,
2124
}
2225

2326
export default ({

src/i18n/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ZHTW from './zh-TW.json'
44
import EN from './en.json'
55
import ES from './es-ES.json'
66
import FR from './fr.json'
7+
import RU from './ru.json'
78

89
const i18nMap = {
910
'zh': ZHCN,
@@ -12,6 +13,7 @@ const i18nMap = {
1213
'en': EN,
1314
'es-ES': ES,
1415
'fr': FR,
16+
'ru': RU,
1517
}
1618

1719
export default function (language) {

src/i18n/ru.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"init": "Gitalking ...",
3+
"no-found-related": "Связанные %{link} не найдены",
4+
"please-contact": "Пожалуйста, свяжитесь с %{user} чтобы инициализировать комментарий",
5+
"init-issue": "Выпуск инициализации",
6+
"leave-a-comment": "Оставить комментарий",
7+
"comment": "Комментарий",
8+
"support-markdown": "Поддерживается Markdown",
9+
"login-with-github": "Вход через Github",
10+
"first-comment-person": "Будьте первым, кто оставил комментарий",
11+
"commented": "прокомментированный",
12+
"load-more": "Загрузить ещё",
13+
"power": "%{link} v1.0.0",
14+
"counts": "%{counts} комментарий |||| %{counts} комментарьев",
15+
"sort-asc": "Сортировать по старым",
16+
"sort-desc": "Сортировать по последним",
17+
"logout": "Выход",
18+
"anonymous": "Анонимный"
19+
}

0 commit comments

Comments
 (0)