From 01e43c3e5799b575a70798056945365ddf51f3ad Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 16 Nov 2016 17:20:52 +0100 Subject: Adding react-intl i18n to the frontend. No translations yet --- .../javascripts/components/containers/mastodon.jsx | 52 ++++++++++++---------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'app/assets/javascripts/components/containers') diff --git a/app/assets/javascripts/components/containers/mastodon.jsx b/app/assets/javascripts/components/containers/mastodon.jsx index 20b57998a..dbc32076b 100644 --- a/app/assets/javascripts/components/containers/mastodon.jsx +++ b/app/assets/javascripts/components/containers/mastodon.jsx @@ -32,6 +32,7 @@ import Following from '../features/following'; import Reblogs from '../features/reblogs'; import Favourites from '../features/favourites'; import HashtagTimeline from '../features/hashtag_timeline'; +import { IntlProvider } from 'react-intl'; const store = configureStore(); @@ -44,7 +45,8 @@ const Mastodon = React.createClass({ propTypes: { token: React.PropTypes.string.isRequired, timelines: React.PropTypes.object, - account: React.PropTypes.string + account: React.PropTypes.string, + locale: React.PropTypes.string.isRequired }, mixins: [PureRenderMixin], @@ -81,30 +83,34 @@ const Mastodon = React.createClass({ }, render () { + const { locale } = this.props; + return ( - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - + + + ); } -- cgit