Skip to content

Commit

Permalink
Added marathi translation (#29)
Browse files Browse the repository at this point in the history
* Added marathi translation

* Changes suggested in review
  • Loading branch information
VivekMolkar authored and felipemarinho97 committed Oct 29, 2018
1 parent 953c384 commit 212cc25
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 22 deletions.
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';

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: "पासवर्ड चेतावणी"
}
}
};

0 comments on commit 212cc25

Please sign in to comment.