react-boilerplate / react-boilerplate-cra-template

:fire: Setup Create React App with React Boilerplate. Highly scalable & Best DX & Performance Focused & Best practices.
https://react-boilerplate.github.io/react-boilerplate-cra-template/
MIT License
1.87k stars 393 forks source link

Translations aren't working properly if Loadable.ts isn't use. #103

Closed safranx closed 3 years ago

safranx commented 3 years ago

Before opening a new issue, please take a moment to review our community guidelines to make the contribution process easy and effective for everyone involved.

Description

This issue follow the issue #102.

Translations aren't working properly if the component or container isn't import with his "optional" Loadable.ts (async load).

hyperremix commented 3 years ago

I'm facing the same issue. For some reason the translations object comes back as an empty object unless you're lazy loading your component or container.

Can-Sahin commented 3 years ago

Ops. My bad. You can fix easily.

Just look at the changes in the file src/app/containers/LanguageSwitch/messages.ts on https://github.com/react-boilerplate/react-boilerplate-cra-template/commit/02d9a1da3d868c0a6cde7cfbede8889210b37482