File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ module WithRawIntlProvider = {
17
17
let intlConfig =
18
18
ReactIntl . intlConfig(
19
19
~locale= locale-> Locale . toString,
20
- ~messages= locale-> Locale . translations-> Util . translationsToDict ,
20
+ ~messages= locale-> Locale . translations-> Translation . toDict ,
21
21
() ,
22
22
);
23
23
let intlCache = ReactIntl . createIntlCache() ;
@@ -44,7 +44,7 @@ let make = () => {
44
44
45
45
<ReactIntl . IntlProvider
46
46
locale= {locale-> Locale . toString}
47
- messages= {locale-> Locale . translations-> Util . translationsToDict }>
47
+ messages= {locale-> Locale . translations-> Translation . toDict }>
48
48
<Page locale setLocale= {locale => locale-> SetLocale -> dispatch} />
49
49
</ReactIntl . IntlProvider >;
50
50
};
Original file line number Diff line number Diff line change 1
1
[@ bs . module "./translations/en.json" ]
2
- external en : array (Util . translation ) = "default" ;
2
+ external en : array (Translation . t ) = "default" ;
3
3
[@ bs . module "./translations/ru.json" ]
4
- external ru : array (Util . translation ) = "default" ;
4
+ external ru : array (Translation . t ) = "default" ;
5
5
6
6
type locale =
7
7
| En
Original file line number Diff line number Diff line change 1
- type translation = {
1
+ type t = {
2
2
id: string ,
3
3
defaultMessage: string ,
4
4
message: Js . nullable (string ),
5
5
};
6
6
7
- let translationsToDict = (translations: array (translation )) => {
7
+ let toDict = (translations: array (t )) => {
8
8
translations-> Belt . Array . reduce(
9
9
Js . Dict . empty() ,
10
10
(dict, entry) => {
You can’t perform that action at this time.
0 commit comments