Adding react-intl i18n to the frontend. No translations yet
This commit is contained in:
parent
546c4718e7
commit
01e43c3e57
31 changed files with 263 additions and 223 deletions
|
@ -1,5 +1,6 @@
|
|||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
import IconButton from '../../../components/icon_button';
|
||||
import { injectIntl } from 'react-intl';
|
||||
|
||||
const UploadButton = React.createClass({
|
||||
|
||||
|
@ -26,9 +27,11 @@ const UploadButton = React.createClass({
|
|||
},
|
||||
|
||||
render () {
|
||||
const { intl } = this.props;
|
||||
|
||||
return (
|
||||
<div style={this.props.style}>
|
||||
<IconButton icon='photo' title='Add media' disabled={this.props.disabled} onClick={this.handleClick} size={24} />
|
||||
<IconButton icon='photo' title={intl.formatMessage({ id: 'upload_button.label', defaultMessage: 'Add media' })} disabled={this.props.disabled} onClick={this.handleClick} size={24} />
|
||||
<input ref={this.setRef} type='file' multiple={false} onChange={this.handleChange} disabled={this.props.disabled} style={{ display: 'none' }} />
|
||||
</div>
|
||||
);
|
||||
|
@ -36,4 +39,4 @@ const UploadButton = React.createClass({
|
|||
|
||||
});
|
||||
|
||||
export default UploadButton;
|
||||
export default injectIntl(UploadButton);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue