Skip to content

Commit 6921996

Browse files
authored
Merge branch 'develop' into Ukrainian-Translation
2 parents 3ae4545 + a948256 commit 6921996

File tree

3 files changed

+617
-1
lines changed

3 files changed

+617
-1
lines changed

client/components/Nav.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,16 @@ class Nav extends React.PureComponent {
667667
हिन्दी
668668
</button>
669669
</li>
670+
<li className="nav__dropdown-item">
671+
<button
672+
onFocus={this.handleFocusForLang}
673+
onBlur={this.handleBlur}
674+
value="zh-CN"
675+
onClick={(e) => this.handleLangSelection(e)}
676+
>
677+
简体中文
678+
</button>
679+
</li>
670680
<li className="nav__dropdown-item">
671681
<button
672682
onFocus={this.handleFocusForLang}

client/i18n.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import i18n from 'i18next';
22
import { initReactI18next } from 'react-i18next';
33
import Backend from 'i18next-http-backend';
44

5-
import { enUS, es, ja, hi, ptBR, de, frCA, uk } from 'date-fns/locale';
5+
import { enUS, es, ja, hi, ptBR, de, frCA, zhCN, uk } from 'date-fns/locale';
66

77
const fallbackLng = ['en-US'];
88
const availableLanguages = [
@@ -11,6 +11,7 @@ const availableLanguages = [
1111
'ja',
1212
'hi',
1313
'pt-BR',
14+
'zh-CN',
1415
'de',
1516
'fr-CA',
1617
'uk-UA'
@@ -25,6 +26,7 @@ export function languageKeyToLabel(lang) {
2526
hi: 'हिन्दी',
2627
ja: '日本語',
2728
'pt-BR': 'Português',
29+
'zh-CN': '简体中文',
2830
de: 'Deutsch',
2931
'uk-UA': 'Українська'
3032
};
@@ -41,6 +43,7 @@ export function languageKeyToDateLocale(lang) {
4143
de,
4244
ja,
4345
'pt-BR': ptBR,
46+
'zh-CN': zhCN,
4447
'uk-UA': uk
4548
};
4649
return languageMap[lang];

0 commit comments

Comments
 (0)