improvement(i18n): extract core UI texts to external file (#1708)
This commit is contained in:
committed by
Shawn Erquhart
parent
d538554c88
commit
c2e21ff9db
18
packages/netlify-cms-core/src/bootstrap.js
vendored
18
packages/netlify-cms-core/src/bootstrap.js
vendored
@ -6,6 +6,8 @@ import { ConnectedRouter } from 'react-router-redux';
|
||||
import history from 'Routing/history';
|
||||
import store from 'Redux';
|
||||
import { mergeConfig } from 'Actions/config';
|
||||
import { getPhrases } from 'Constants/defaultPhrases';
|
||||
import { I18n } from 'react-polyglot';
|
||||
import { ErrorBoundary } from 'UI';
|
||||
import App from 'App/App';
|
||||
import 'EditorWidgets';
|
||||
@ -60,13 +62,15 @@ function bootstrap(opts = {}) {
|
||||
* Create connected root component.
|
||||
*/
|
||||
const Root = () => (
|
||||
<ErrorBoundary>
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
<Route component={App} />
|
||||
</ConnectedRouter>
|
||||
</Provider>
|
||||
</ErrorBoundary>
|
||||
<I18n locale={'en'} messages={getPhrases()}>
|
||||
<ErrorBoundary>
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
<Route component={App} />
|
||||
</ConnectedRouter>
|
||||
</Provider>
|
||||
</ErrorBoundary>
|
||||
</I18n>
|
||||
);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user