From e70dd9968ea09432e49a0bb5d19d29ae0a5f7491 Mon Sep 17 00:00:00 2001 From: David <26525975+dchenmei@users.noreply.github.com> Date: Sun, 28 Oct 2018 13:28:49 -0400 Subject: [PATCH] [ZH] Translation Request (#27) * Added chinese translation * added moment.js locale --- src/index.js | 4 ++++ src/messages.js | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index cb28781..065c1f7 100644 --- a/src/index.js +++ b/src/index.js @@ -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'; @@ -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, @@ -54,6 +57,7 @@ const localeData = [ ...it, ...sr, ...ar, + ...zh, ]; diff --git a/src/messages.js b/src/messages.js index e8e83c8..3ad0166 100644 --- a/src/messages.js +++ b/src/messages.js @@ -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", @@ -102,7 +114,6 @@ export default { PasswordWarning: "kripya apna password dale" } }, - lt: { LoginScreen: { Hibernate: "Pristabdyti",