Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added marathi translation #29

Merged
merged 3 commits into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,42 @@ import sr from 'react-intl/locale-data/sr'; // Serbian
import ar from 'react-intl/locale-data/ar'; // Arabic
import vi from 'react-intl/locale-data/vi'; // Vietnamese
import zh from 'react-intl/locale-data/zh'; // Chinese
// ... and so on
import mr from 'react-intl/locale-data/mr'; // Marathi

import { flattenMessages } from './js/utils'; // flatten messages util function in order to use nested js object for translated texts
import messages from './messages';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also forgot ti import the marathi locale for moment.js

Copy link
Contributor Author

@VivekMolkar VivekMolkar Oct 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my ignorance, I'll update the code


import 'moment/locale/pt';
import 'moment/locale/es';
import 'moment/locale/de';
import 'moment/locale/fr';
import 'moment/locale/pt';
import 'moment/locale/es';
import 'moment/locale/de';
import 'moment/locale/fr';
import 'moment/locale/sv';
import "moment/locale/nb";
import "moment/locale/nb";
import 'moment/locale/lt';
import 'moment/locale/pl';
import 'moment/locale/pl';
import 'moment/locale/tr';
import 'moment/locale/uk';
import 'moment/locale/ru';
import 'moment/locale/uk';
import 'moment/locale/ru';
import 'moment/locale/it';
import 'moment/locale/fa';
import 'moment/locale/sr';
import 'moment/locale/ar';
import 'moment/locale/vi';
import 'moment/locale/zh-cn';
import 'moment/locale/zh-cn';
import 'moment/locale/mr';

const localeData = [
...en,
...en,
...pt,
...de,
...fr,
...es,
...sv,
...no,
...de,
...fr,
...es,
...sv,
...no,
...lt,
...pl,
...tr,
...uk,
...tr,
...uk,
...ru,
...hi,
...it,
Expand All @@ -67,6 +68,7 @@ const localeData = [
...ar,
...vi,
...zh,
...mr
];


Expand Down Expand Up @@ -101,7 +103,7 @@ else if (messages[sAttemptedLocale.substring(0, 2)]) { // second-best case, the

ReactDOM.render(
<IntlProvider locale={sLocalFinal} messages={flattenMessages(oMessages)}>
<App locale={sLocalFinal}/>
<App locale={sLocalFinal} />
</IntlProvider>
, document.getElementById('root')
);
Expand Down
19 changes: 16 additions & 3 deletions src/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export default {
UsernameWarning: "请输入您的用户名.",
PasswordWarning: "请输入您的密码."
}
},
hi:{
LoginScreen:{
},
hi: {
LoginScreen: {
Hibernate: "seetanidra",
Suspend: "nilambit",
Restart: "punah aarambh",
Expand Down Expand Up @@ -244,5 +244,18 @@ export default {
PasswordWarning: "Xin nhập mật khẩu."
}
},
mr: {
LoginScreen: {
Hibernate: "हायबरनेट",
Suspend: "निलंबित",
Restart: "पुन्हा सुरू करा",
Shutdown: "बंद",
Lock: "लॉक",
UserPlaceholder: "वापरकर्ता प्लेसहोल्डर",
PasswordPlaceholder: "पासवर्डप्लेसधारक",
UsernameWarning: "वापरकर्ता चेतावणी",
PasswordWarning: "पासवर्ड चेतावणी"
}
}
};