Merge remote-tracking branch 'origin/master' into check-updates

This commit is contained in:
Gav Wood
2016-12-11 19:26:24 +01:00
85 changed files with 2216 additions and 1055 deletions

View File

@@ -14,8 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import { Component, PropTypes } from 'react';
import React, { Component, PropTypes } from 'react';
import { IntlProvider } from 'react-intl';
import { observer } from 'mobx-react';
import { LocaleStore } from '../../i18n';
@observer
export default class ContextProvider extends Component {
static propTypes = {
api: PropTypes.object.isRequired,
@@ -30,10 +35,17 @@ export default class ContextProvider extends Component {
store: PropTypes.object
}
localeStore = LocaleStore.get();
render () {
const { children } = this.props;
const { locale, messages } = this.localeStore;
return children;
return (
<IntlProvider locale={ locale } messages={ messages }>
{ children }
</IntlProvider>
);
}
getChildContext () {