diff --git a/src/views/preview/l10n.json b/src/views/preview/l10n.json index 4dead1d4a..59f304b7c 100644 --- a/src/views/preview/l10n.json +++ b/src/views/preview/l10n.json @@ -1,6 +1,7 @@ { "addToStudio.title": "Add to Studio", "addToStudio.finishing": "Finishing up...", + "preview.titleMaxLength": "Title is too long", "preview.musicExtensionChip": "Music", "preview.penExtensionChip": "Pen", "preview.speechExtensionChip": "Google Speech", diff --git a/src/views/preview/presentation.jsx b/src/views/preview/presentation.jsx index 9390120ff..bcab17902 100644 --- a/src/views/preview/presentation.jsx +++ b/src/views/preview/presentation.jsx @@ -1,6 +1,7 @@ const FormattedDate = require('react-intl').FormattedDate; const injectIntl = require('react-intl').injectIntl; const PropTypes = require('prop-types'); +const intlShape = require('react-intl').intlShape; const React = require('react'); const Formsy = require('formsy-react').default; const classNames = require('classnames'); @@ -45,6 +46,7 @@ const PreviewPresentation = ({ extensions, faved, favoriteCount, + intl, isFullScreen, isLoggedIn, isShared, @@ -98,10 +100,9 @@ const PreviewPresentation = ({ handleUpdate={onUpdate} name="title" validationErrors={{ - maxLength: 'Sorry title is too long' - // maxLength: props.intl.formatMessage({ - // id: 'project.titleMaxLength' - // }) + maxLength: intl.formatMessage({ + id: 'preview.titleMaxLength' + }) }} validations={{ maxLength: 100 @@ -376,6 +377,7 @@ PreviewPresentation.propTypes = { extensions: PropTypes.arrayOf(PropTypes.object), faved: PropTypes.bool, favoriteCount: PropTypes.number, + intl: intlShape, isFullScreen: PropTypes.bool, isLoggedIn: PropTypes.bool, isShared: PropTypes.bool,