Move IntlProvider into GUI to support integration with www
This is taking advantage of the fact that react-intl can support nested IntlProviders. GUI will use it’s own ConnectedIntlProvider, that maintains the translations in redux, while www will continue to have it’s own IntlProvider that is initialized when the page loads. Moving the IntlProvider into GUI meant that nothing in the playground can use injectIntl, so the default project name needed to move into the component instead of being in the reducer. The Localization HOC is added, it takes an optional onSetLanguage handler, so www can pass a function that will set the cookie that www needs.
Showing
- src/components/menu-bar/project-title-input.jsx 9 additions, 1 deletionsrc/components/menu-bar/project-title-input.jsx
- src/containers/gui.jsx 2 additions, 0 deletionssrc/containers/gui.jsx
- src/lib/app-state-hoc.jsx 1 addition, 4 deletionssrc/lib/app-state-hoc.jsx
- src/lib/localization-hoc.jsx 55 additions, 0 deletionssrc/lib/localization-hoc.jsx
- src/lib/titled-hoc.jsx 3 additions, 15 deletionssrc/lib/titled-hoc.jsx
- src/reducers/project-title.js 0 additions, 11 deletionssrc/reducers/project-title.js
Loading
Please register or sign in to comment