hapi-react-starter-kit icon indicating copy to clipboard operation
hapi-react-starter-kit copied to clipboard

Bug in localeReducer.js

Open juxta52 opened this issue 9 years ago • 2 comments
trafficstars

The import statements in the localReducer.js is generating an error.

The folder structure for react-intl changed.

The following section:

import en from 'react-intl/lib/locale-data/en'; import es from 'react-intl/lib/locale-data/es';

needs to be updated to:

import en from 'react-intl/locale-data/en'; import es from 'react-intl/locale-data/es';

because the locale-data is no longer in the lib folder, it is located at the root level of the project.

juxta52 avatar Mar 10 '16 14:03 juxta52

Yes, that will be in next update. We are still using an old version of react-intl. Thanks for pointing it out. We should also get those files dinamically and not as constants. So more languages can be added without having to alter localeReducer.js file.

Dindaleon avatar Mar 10 '16 14:03 Dindaleon

Workaround:

Remove the following lines

import en from 'react-intl/lib/locale-data/en'; import es from 'react-intl/lib/locale-data/es';

Additionally remove references to en / es in the same file.

nym avatar Jun 02 '16 21:06 nym