Skip to content

Commit

Permalink
[ZH] Translation Request (#27)
Browse files Browse the repository at this point in the history
* Added chinese translation

* added moment.js locale
  • Loading branch information
dchenmei authored and felipemarinho97 committed Oct 28, 2018
1 parent 847974d commit e70dd99
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import ru from 'react-intl/locale-data/ru'; // Russian
import it from 'react-intl/locale-data/it'; // Italian
import sr from 'react-intl/locale-data/sr'; // Serbian
import ar from 'react-intl/locale-data/ar'; // Arabic
import zh from 'react-intl/locale-data/zh'; // Chinese
// ... and so on

import { flattenMessages } from './js/utils'; // flatten messages util function in order to use nested js object for translated texts
import messages from './messages';
Expand All @@ -37,6 +39,7 @@ import 'moment/locale/ru';
import 'moment/locale/it';
import 'moment/locale/sr';
import 'moment/locale/ar';
import 'moment/locale/zh';

const localeData = [
...en,
Expand All @@ -54,6 +57,7 @@ const localeData = [
...it,
...sr,
...ar,
...zh,
];


Expand Down
15 changes: 13 additions & 2 deletions src/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,19 @@ export default {
PasswordWarning: "Vennligst skriv inn passord."
}
},

zh: {
LoginScreen: {
Hibernate: "休眠",
Suspend: "暂停",
Restart: "重启",
Shutdown: "关闭",
Lock: "锁",
UserPlaceholder: "用户名",
PasswordPlaceholder: "密码",
UsernameWarning: "请输入您的用户名.",
PasswordWarning: "请输入您的密码."
}
},
hi:{
LoginScreen:{
Hibernate: "seetanidra",
Expand All @@ -102,7 +114,6 @@ export default {
PasswordWarning: "kripya apna password dale"
}
},

lt: {
LoginScreen: {
Hibernate: "Pristabdyti",
Expand Down

0 comments on commit e70dd99

Please sign in to comment.