mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
localized Title too long error string
This commit is contained in:
parent
478a30efcb
commit
2f5604d23d
2 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"addToStudio.title": "Add to Studio",
|
"addToStudio.title": "Add to Studio",
|
||||||
"addToStudio.finishing": "Finishing up...",
|
"addToStudio.finishing": "Finishing up...",
|
||||||
|
"preview.titleMaxLength": "Title is too long",
|
||||||
"preview.musicExtensionChip": "Music",
|
"preview.musicExtensionChip": "Music",
|
||||||
"preview.penExtensionChip": "Pen",
|
"preview.penExtensionChip": "Pen",
|
||||||
"preview.speechExtensionChip": "Google Speech",
|
"preview.speechExtensionChip": "Google Speech",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
const FormattedDate = require('react-intl').FormattedDate;
|
const FormattedDate = require('react-intl').FormattedDate;
|
||||||
const injectIntl = require('react-intl').injectIntl;
|
const injectIntl = require('react-intl').injectIntl;
|
||||||
const PropTypes = require('prop-types');
|
const PropTypes = require('prop-types');
|
||||||
|
const intlShape = require('react-intl').intlShape;
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
const Formsy = require('formsy-react').default;
|
const Formsy = require('formsy-react').default;
|
||||||
const classNames = require('classnames');
|
const classNames = require('classnames');
|
||||||
|
@ -45,6 +46,7 @@ const PreviewPresentation = ({
|
||||||
extensions,
|
extensions,
|
||||||
faved,
|
faved,
|
||||||
favoriteCount,
|
favoriteCount,
|
||||||
|
intl,
|
||||||
isFullScreen,
|
isFullScreen,
|
||||||
isLoggedIn,
|
isLoggedIn,
|
||||||
isShared,
|
isShared,
|
||||||
|
@ -98,10 +100,9 @@ const PreviewPresentation = ({
|
||||||
handleUpdate={onUpdate}
|
handleUpdate={onUpdate}
|
||||||
name="title"
|
name="title"
|
||||||
validationErrors={{
|
validationErrors={{
|
||||||
maxLength: 'Sorry title is too long'
|
maxLength: intl.formatMessage({
|
||||||
// maxLength: props.intl.formatMessage({
|
id: 'preview.titleMaxLength'
|
||||||
// id: 'project.titleMaxLength'
|
})
|
||||||
// })
|
|
||||||
}}
|
}}
|
||||||
validations={{
|
validations={{
|
||||||
maxLength: 100
|
maxLength: 100
|
||||||
|
@ -376,6 +377,7 @@ PreviewPresentation.propTypes = {
|
||||||
extensions: PropTypes.arrayOf(PropTypes.object),
|
extensions: PropTypes.arrayOf(PropTypes.object),
|
||||||
faved: PropTypes.bool,
|
faved: PropTypes.bool,
|
||||||
favoriteCount: PropTypes.number,
|
favoriteCount: PropTypes.number,
|
||||||
|
intl: intlShape,
|
||||||
isFullScreen: PropTypes.bool,
|
isFullScreen: PropTypes.bool,
|
||||||
isLoggedIn: PropTypes.bool,
|
isLoggedIn: PropTypes.bool,
|
||||||
isShared: PropTypes.bool,
|
isShared: PropTypes.bool,
|
||||||
|
|
Loading…
Reference in a new issue