diff --git a/src/components/asset-panel/selector.jsx b/src/components/asset-panel/selector.jsx index 41cc41771..d37cca757 100644 --- a/src/components/asset-panel/selector.jsx +++ b/src/components/asset-panel/selector.jsx @@ -1,6 +1,5 @@ import PropTypes from 'prop-types'; import React from 'react'; -import {FormattedMessage} from 'react-intl'; import SpriteSelectorItem from '../../containers/sprite-selector-item.jsx'; @@ -45,7 +44,7 @@ const Selector = props => { src={img} /> - + {message} ))} @@ -56,11 +55,7 @@ const Selector = props => { Selector.propTypes = { buttons: PropTypes.arrayOf(PropTypes.shape({ - message: PropTypes.shape({ - id: PropTypes.string.isRequired, - defaultMessage: PropTypes.string, - description: PropTypes.string - }), + message: PropTypes.node.isRequired, img: PropTypes.string.isRequired, onClick: PropTypes.func.isRequired })), diff --git a/src/containers/costume-tab.jsx b/src/containers/costume-tab.jsx index c2b8fd8c4..dcef1fa1e 100644 --- a/src/containers/costume-tab.jsx +++ b/src/containers/costume-tab.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import bindAll from 'lodash.bindall'; -import {defineMessages} from 'react-intl'; +import {FormattedMessage} from 'react-intl'; import VM from 'scratch-vm'; import AssetPanel from '../components/asset-panel/asset-panel.jsx'; @@ -61,20 +61,22 @@ class CostumeTab extends React.Component { return null; } - const messages = defineMessages({ - addBackdrop: { - id: 'action.addBackdrop', - defaultMessage: 'Add Backdrop', - description: 'Button to add a backdrop in the editor tab' - }, - addCostume: { - id: 'action.addCostume', - defaultMessage: 'Add Costume', - description: 'Button to add a costume in the editor tab' - } - }); + const addBackdropMsg = ( + + ); + const addCostumeMsg = ( + + ); - const addMessage = target.isStage ? messages.addBackdrop : messages.addCostume; + const addMessage = target.isStage ? addBackdropMsg : addCostumeMsg; const addFunc = target.isStage ? onNewBackdropClick : onNewCostumeClick; return ( diff --git a/src/containers/sound-tab.jsx b/src/containers/sound-tab.jsx index ab284adec..d0c41fe73 100644 --- a/src/containers/sound-tab.jsx +++ b/src/containers/sound-tab.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import bindAll from 'lodash.bindall'; -import {defineMessages} from 'react-intl'; +import {FormattedMessage} from 'react-intl'; import VM from 'scratch-vm'; import AssetPanel from '../components/asset-panel/asset-panel.jsx'; @@ -74,27 +74,29 @@ class SoundTab extends React.Component { } )) : []; - const messages = defineMessages({ - recordSound: { - id: 'action.recordSound', - defaultMessage: 'Record Sound', - description: 'Button to record a sound in the editor tab' - }, - addSound: { - id: 'action.addSound', - defaultMessage: 'Add Sound', - description: 'Button to add a sound in the editor tab' - } - }); + const recordSoundMsg = ( + + ); + const addSoundMsg = ( + + ); return (