File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ module WithRawIntlProvider = {
1717 let intlConfig =
1818 ReactIntl . intlConfig(
1919 ~locale= locale-> Locale . toString,
20- ~messages= locale-> Locale . translations-> Util . translationsToDict ,
20+ ~messages= locale-> Locale . translations-> Translation . toDict ,
2121 () ,
2222 );
2323 let intlCache = ReactIntl . createIntlCache() ;
@@ -44,7 +44,7 @@ let make = () => {
4444
4545 <ReactIntl . IntlProvider
4646 locale= {locale-> Locale . toString}
47- messages= {locale-> Locale . translations-> Util . translationsToDict }>
47+ messages= {locale-> Locale . translations-> Translation . toDict }>
4848 <Page locale setLocale= {locale => locale-> SetLocale -> dispatch} />
4949 </ReactIntl . IntlProvider >;
5050};
Original file line number Diff line number Diff line change 11[@ bs . module "./translations/en.json" ]
2- external en : array (Util . translation ) = "default" ;
2+ external en : array (Translation . t ) = "default" ;
33[@ bs . module "./translations/ru.json" ]
4- external ru : array (Util . translation ) = "default" ;
4+ external ru : array (Translation . t ) = "default" ;
55
66type locale =
77 | En
Original file line number Diff line number Diff line change 1- type translation = {
1+ type t = {
22 id: string ,
33 defaultMessage: string ,
44 message: Js . nullable (string ),
55};
66
7- let translationsToDict = (translations: array (translation )) => {
7+ let toDict = (translations: array (t )) => {
88 translations-> Belt . Array . reduce(
99 Js . Dict . empty() ,
1010 (dict, entry) => {
You can’t perform that action at this time.
0 commit comments