Unverified Commit cb6b8401 authored by Eric Rosenbaum's avatar Eric Rosenbaum Committed by GitHub

Merge pull request #3558 from LLK/develop

Update release branch to include develop
parents 368fd104 ecc53904
This diff is collapsed.
...@@ -39,7 +39,7 @@ class UsernameStep extends React.Component { ...@@ -39,7 +39,7 @@ class UsernameStep extends React.Component {
componentDidMount () { componentDidMount () {
// Send info to analytics when we aren't on the standalone page. // Send info to analytics when we aren't on the standalone page.
// If we are on the standalone join page, the page load will take care of this. // If we are on the standalone join page, the page load will take care of this.
if (!window.location.pathname.includes('/join')) { if (window.location.pathname.indexOf('/join') === -1) {
if (this.props.sendAnalytics) { if (this.props.sendAnalytics) {
this.props.sendAnalytics('join-username-modal'); this.props.sendAnalytics('join-username-modal');
} }
......
...@@ -230,6 +230,7 @@ ...@@ -230,6 +230,7 @@
"registration.validationUsernameNotAllowed": "Username not allowed", "registration.validationUsernameNotAllowed": "Username not allowed",
"registration.validationUsernameVulgar": "Hmm, that looks inappropriate", "registration.validationUsernameVulgar": "Hmm, that looks inappropriate",
"registration.validationUsernameInvalid": "Invalid username", "registration.validationUsernameInvalid": "Invalid username",
"registration.validationUsernameSpaces": "Usernames can't have spaces",
"registration.validationEmailInvalid": "Email doesn’t look right. Try another?", "registration.validationEmailInvalid": "Email doesn’t look right. Try another?",
"registration.waitForApproval": "Wait for Approval", "registration.waitForApproval": "Wait for Approval",
"registration.waitForApprovalDescription": "You can log into your Scratch Account now, but the features specific to Teachers are not yet available. Your information is being reviewed. Please be patient, the approval process can take up to one day. You will receive an email indicating your account has been upgraded once your account has been approved.", "registration.waitForApprovalDescription": "You can log into your Scratch Account now, but the features specific to Teachers are not yet available. Your information is being reviewed. Please be patient, the approval process can take up to one day. You will receive an email indicating your account has been upgraded once your account has been approved.",
......
...@@ -9,6 +9,8 @@ module.exports.validateUsernameLocally = username => { ...@@ -9,6 +9,8 @@ module.exports.validateUsernameLocally = username => {
return {valid: false, errMsgId: 'registration.validationUsernameMinLength'}; return {valid: false, errMsgId: 'registration.validationUsernameMinLength'};
} else if (username.length > 20) { } else if (username.length > 20) {
return {valid: false, errMsgId: 'registration.validationUsernameMaxLength'}; return {valid: false, errMsgId: 'registration.validationUsernameMaxLength'};
} else if (/\s/i.test(username)) {
return {valid: false, errMsgId: 'registration.validationUsernameSpaces'};
} else if (!/^[\w-]+$/i.test(username)) { } else if (!/^[\w-]+$/i.test(username)) {
return {valid: false, errMsgId: 'registration.validationUsernameRegexp'}; return {valid: false, errMsgId: 'registration.validationUsernameRegexp'};
} }
......
...@@ -6,10 +6,16 @@ ...@@ -6,10 +6,16 @@
"cards.story-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/story-cards.pdf", "cards.story-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/story-cards.pdf",
"cards.chase-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/chase-cards.pdf", "cards.chase-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/chase-cards.pdf",
"cards.video-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/video-cards.pdf", "cards.video-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/video-cards.pdf",
"cards.pong-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/pong-cards.pdf",
"cards.fly-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/fly-cards.pdf",
"cards.imagine-cardsLink": "https://resources.scratch.mit.edu/www/cards/en/imagine-cards.pdf",
"guides.NameGuideLink": "https://resources.scratch.mit.edu/www/guides/en/NameGuide.pdf", "guides.NameGuideLink": "https://resources.scratch.mit.edu/www/guides/en/NameGuide.pdf",
"guides.AnimateGuideLink": "https://resources.scratch.mit.edu/www/guides/en/AnimateGuide.pdf", "guides.AnimateGuideLink": "https://resources.scratch.mit.edu/www/guides/en/AnimateGuide.pdf",
"guides.MusicGuideLink": "https://resources.scratch.mit.edu/www/guides/en/MusicGuide.pdf", "guides.MusicGuideLink": "https://resources.scratch.mit.edu/www/guides/en/MusicGuide.pdf",
"guides.StoryGuideLink": "https://resources.scratch.mit.edu/www/guides/en/StoryGuide.pdf", "guides.StoryGuideLink": "https://resources.scratch.mit.edu/www/guides/en/StoryGuide.pdf",
"guides.ChaseGuideLink": "https://resources.scratch.mit.edu/www/guides/en/ChaseGuide.pdf", "guides.ChaseGuideLink": "https://resources.scratch.mit.edu/www/guides/en/ChaseGuide.pdf",
"guides.VideoGuideLink": "https://resources.scratch.mit.edu/www/guides/en/VideoGuide.pdf" "guides.VideoGuideLink": "https://resources.scratch.mit.edu/www/guides/en/VideoGuide.pdf",
"guides.PongGuideLink": "https://resources.scratch.mit.edu/www/guides/en/PongGuide.pdf",
"guides.FlyGuideLink": "https://resources.scratch.mit.edu/www/guides/en/FlyGuide.pdf",
"guides.ImagineGuideLink": "https://resources.scratch.mit.edu/www/guides/en/ImagineGuide.pdf"
} }
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"ideas.cardsPurchase": "Purchase Printed Set", "ideas.cardsPurchase": "Purchase Printed Set",
"ideas.MakeItFlyTitle": "Make It Fly", "ideas.MakeItFlyTitle": "Make It Fly",
"ideas.MakeItFlyDescription": "Animate the Scratch Cat, The Powerpuff Girls, or even a taco!", "ideas.MakeItFlyDescription": "Choose any character and make it fly!",
"ideas.RaceTitle": "Race to the Finish", "ideas.RaceTitle": "Race to the Finish",
"ideas.RaceDescription": "Make a game where two characters race each other.", "ideas.RaceDescription": "Make a game where two characters race each other.",
"ideas.HideAndSeekTitle": "Hide and Seek", "ideas.HideAndSeekTitle": "Hide and Seek",
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
"ideas.FashionDescription": "Make a game where you dress a character with different clothes and styles.", "ideas.FashionDescription": "Make a game where you dress a character with different clothes and styles.",
"ideas.PongTitle": "Pong Game", "ideas.PongTitle": "Pong Game",
"ideas.PongDescription": "Make a bouncing ball game with sounds, points, and other effects.", "ideas.PongDescription": "Make a bouncing ball game with sounds, points, and other effects.",
"ideas.ImagineTitle": "Imagine a World",
"ideas.ImagineDescription": "Imagine a world where anything is possible.",
"ideas.DanceTitle": "Let's Dance", "ideas.DanceTitle": "Let's Dance",
"ideas.DanceDescription": "Design an animated dance scene with music and dance moves.", "ideas.DanceDescription": "Design an animated dance scene with music and dance moves.",
"ideas.CatchTitle": "Catch Game", "ideas.CatchTitle": "Catch Game",
......
...@@ -9,13 +9,22 @@ ...@@ -9,13 +9,22 @@
"guideUrl": "guides.NameGuideLink" "guideUrl": "guides.NameGuideLink"
}, },
{ {
"title": "ideas.animateACharacterTitle", "title": "ideas.ImagineTitle",
"description": "ideas.animateACharacterDescription", "description": "ideas.ImagineDescription",
"thumbImage": "/images/ideas/activities/animate-a-character-thumb.jpg", "thumbImage": "/images/ideas/activities/imagine-thumb.jpg",
"modalImage": "/images/ideas/activities/animate-a-character-modal.jpg", "modalImage": "/images/ideas/activities/imagine-modal.jpg",
"tutorialUrl": "animate-a-character", "tutorialUrl": "imagine",
"cardsUrl": "cards.animation-cardsLink", "cardsUrl": "cards.imagine-cardsLink",
"guideUrl": "guides.AnimateGuideLink" "guideUrl": "guides.ImagineGuideLink"
},
{
"title": "ideas.chaseGameTitle",
"description": "ideas.chaseGameDescription",
"thumbImage": "/images/ideas/activities/chase-game-thumb.jpg",
"modalImage": "/images/ideas/activities/chase-game-modal.jpg",
"tutorialUrl": "chase-game",
"cardsUrl": "cards.chase-cardsLink",
"guideUrl": "guides.ChaseGuideLink"
}, },
{ {
"title": "ideas.makeMusicTitle", "title": "ideas.makeMusicTitle",
...@@ -36,13 +45,31 @@ ...@@ -36,13 +45,31 @@
"guideUrl": "guides.StoryGuideLink" "guideUrl": "guides.StoryGuideLink"
}, },
{ {
"title": "ideas.chaseGameTitle", "title": "ideas.MakeItFlyTitle",
"description": "ideas.chaseGameDescription", "description": "ideas.MakeItFlyDescription",
"thumbImage": "/images/ideas/activities/chase-game-thumb.jpg", "thumbImage": "/images/ideas/activities/fly-thumb.jpg",
"modalImage": "/images/ideas/activities/chase-game-modal.jpg", "modalImage": "/images/ideas/activities/fly-modal.jpg",
"tutorialUrl": "chase-game", "tutorialUrl": "make-it-fly",
"cardsUrl": "cards.chase-cardsLink", "cardsUrl": "cards.fly-cardsLink",
"guideUrl": "guides.ChaseGuideLink" "guideUrl": "guides.FlyGuideLink"
},
{
"title": "ideas.PongTitle",
"description": "ideas.PongDescription",
"thumbImage": "/images/ideas/activities/pong-thumb.jpg",
"modalImage": "/images/ideas/activities/pong-modal.jpg",
"tutorialUrl": "pong",
"cardsUrl": "cards.pong-cardsLink",
"guideUrl": "guides.PongGuideLink"
},
{
"title": "ideas.animateACharacterTitle",
"description": "ideas.animateACharacterDescription",
"thumbImage": "/images/ideas/activities/animate-a-character-thumb.jpg",
"modalImage": "/images/ideas/activities/animate-a-character-modal.jpg",
"tutorialUrl": "animate-a-character",
"cardsUrl": "cards.animation-cardsLink",
"guideUrl": "guides.AnimateGuideLink"
}, },
{ {
"title": "ideas.videoSensingTitle", "title": "ideas.videoSensingTitle",
......
...@@ -33,7 +33,7 @@ describe('unit test lib/validate.js', () => { ...@@ -33,7 +33,7 @@ describe('unit test lib/validate.js', () => {
test('validate username spaces not allowed', () => { test('validate username spaces not allowed', () => {
const response = validate.validateUsernameLocally('abc def'); const response = validate.validateUsernameLocally('abc def');
expect(response).toEqual({valid: false, errMsgId: 'registration.validationUsernameRegexp'}); expect(response).toEqual({valid: false, errMsgId: 'registration.validationUsernameSpaces'});
}); });
test('validate username special chars not allowed', () => { test('validate username special chars not allowed', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment