diff --git a/src/components/community-guidelines/community-guidelines-modal.jsx b/src/components/community-guidelines/community-guidelines-modal.jsx index 246e8ff2a..13e78cde8 100644 --- a/src/components/community-guidelines/community-guidelines-modal.jsx +++ b/src/components/community-guidelines/community-guidelines-modal.jsx @@ -1,10 +1,12 @@ import React, {useCallback, useState, useEffect} from 'react'; import {CommunityGuidelines, communityGuidelines} from './community-guidelines.jsx'; import PropTypes from 'prop-types'; -import {FormattedMessage, injectIntl} from 'react-intl'; +import {FormattedMessage, useIntl} from 'react-intl'; const ReactModal = require('react-modal'); -const CommunityGuidelinesModal = props => { +export const CommunityGuidelinesModal = props => { + useIntl(); + const [currentPage, setCurrentPage] = useState(0); const onNextPage = useCallback(() => setCurrentPage(currentPage + 1), [currentPage]); const onBackPage = useCallback(() => setCurrentPage(currentPage - 1), [currentPage]); @@ -48,5 +50,3 @@ CommunityGuidelinesModal.propTypes = { onComplete: PropTypes.func, isOpen: PropTypes.bool }; - -export const IntlCommunityGuidelinesModal = injectIntl(CommunityGuidelinesModal); diff --git a/src/components/join-flow/welcome-step.jsx b/src/components/join-flow/welcome-step.jsx index b3f19a06f..93ebede4f 100644 --- a/src/components/join-flow/welcome-step.jsx +++ b/src/components/join-flow/welcome-step.jsx @@ -51,7 +51,7 @@ class WelcomeStep extends React.Component { innerClassName="join-flow-inner-welcome-step" nextButton={this.props.createProjectOnComplete ? ( - + { - const dots = []; - useEffect(() => { new Image().src = '/images/onboarding/right-arrow.svg'; new Image().src = '/images/onboarding/left-arrow.svg'; }, []); - if (currentPage >= 0 && totalDots){ - for (let i = 0; i < totalDots; i++){ - dots.push(
); + const dots = useMemo(() => { + const dotsComponents = []; + if (currentPage >= 0 && totalDots){ + for (let i = 0; i < totalDots; i++){ + dotsComponents.push(
); + } } - } + return dotsComponents; + }, [currentPage, totalDots]); return (
diff --git a/src/l10n.json b/src/l10n.json index c153dee8c..1ecc23f18 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -225,6 +225,7 @@ "registration.personalStepDescription": "Your individual responses will not be displayed publicly, and will be kept confidential and secure", "registration.private": "We will keep this information private.", "registration.problemsAre": "The problems are:", + "registration.reviewGuidelines": "Review Community Guidelines", "registration.selectCountry": "Select country", "registration.startOverInstruction": "Click \"Start over.\"", "registration.studentPersonalStepDescription": "This information will not appear on the Scratch website.", @@ -483,29 +484,29 @@ "communityGuidelines.buttons.back": "Back", "communityGuidelines.buttons.next": "Next", - "communityGuidelines.buttons.finish": "I Understand", - "communityGuidelines.guidelines.respectSection": "Become a Scratcher - Treat everyone with respect", - "communityGuidelines.guidelines.respectHeader": "Scratchers treat everyone with respect.", + "communityGuidelines.buttons.finish": "I Agree", + "communityGuidelines.guidelines.respectSection": "Become a New Scratcher - Treat everyone with respect", + "communityGuidelines.guidelines.respectHeader": "New Scratchers treat everyone with respect.", "communityGuidelines.guidelines.respectBody": "Everyone on Scratch is encouraged to share things that excite them and are important to them—we hope that you find ways to celebrate your own identity on Scratch, and allow others to do the same.", - "communityGuidelines.guidelines.safeSection": "Become a Scratcher - Be safe", - "communityGuidelines.guidelines.safeHeader": "Scratchers are safe: we keep personal and contact information private.", + "communityGuidelines.guidelines.safeSection": "Become a New Scratcher - Be safe", + "communityGuidelines.guidelines.safeHeader": "New Scratchers are safe: we keep personal and contact information private.", "communityGuidelines.guidelines.safeBody": "This includes not sharing real last names, phone numbers, addresses, hometowns, school names, email addresses, usernames or links to social media sites, video chatting applications, or websites with private chat functionality.", - "communityGuidelines.guidelines.feedbackSection": "Become a Scratcher - Give helpful feedback", - "communityGuidelines.guidelines.feedbackHeader": "Scratchers give helpful feedback.", + "communityGuidelines.guidelines.feedbackSection": "Become a New Scratcher - Give helpful feedback", + "communityGuidelines.guidelines.feedbackHeader": "New Scratchers give helpful feedback.", "communityGuidelines.guidelines.feedbackBody": "When commenting on a project, remember to say something you like about it, offer suggestions, and be kind, not critical.", - "communityGuidelines.guidelines.remix1Section": "Become a Scratcher - Embrace remix culture", - "communityGuidelines.guidelines.remix1Header": "Scratchers embrace remix culture.", + "communityGuidelines.guidelines.remix1Section": "Become a New Scratcher - Embrace remix culture", + "communityGuidelines.guidelines.remix1Header": "New Scratchers embrace remix culture.", "communityGuidelines.guidelines.remix1Body": "Remixing is when you build upon someone else’s projects, code, ideas, images, or anything else they share on Scratch to make your own unique creation.", - "communityGuidelines.guidelines.remix2Section": "Become a Scratcher - Embrace remix culture", + "communityGuidelines.guidelines.remix2Section": "Become a New Scratcher - Embrace remix culture", "communityGuidelines.guidelines.remix2Header": "Remixing is a great way to collaborate and connect with other Scratchers.", "communityGuidelines.guidelines.remix2Body": "You are encouraged to use anything you find on Scratch in your own creations, as long as you provide credit to everyone whose work you used and make a meaningful change to it. ", - "communityGuidelines.guidelines.remix3Section": "Become a Scratcher - Embrace remix culture", + "communityGuidelines.guidelines.remix3Section": "Become a New Scratcher - Embrace remix culture", "communityGuidelines.guidelines.remix3Header": "Remixing means sharing with others.", "communityGuidelines.guidelines.remix3Body": "When you share something on Scratch, you are giving permission to all Scratchers to use your work in their creations, too.", - "communityGuidelines.guidelines.honestSection": "Become a Scratcher - Be honest", - "communityGuidelines.guidelines.honestHeader": "Scratchers are honest.", + "communityGuidelines.guidelines.honestSection": "Become a New Scratcher - Be honest", + "communityGuidelines.guidelines.honestHeader": "New Scratchers are honest.", "communityGuidelines.guidelines.honestBody": "It’s important to be honest and authentic when interacting with others on Scratch, and remember that there is a person behind every Scratch account.", - "communityGuidelines.guidelines.friendlySection": "Become a Scratcher - Keep the site friendly", - "communityGuidelines.guidelines.friendlyHeader": "Scratchers help keep the site friendly.", + "communityGuidelines.guidelines.friendlySection": "Become a New Scratcher - Keep the site friendly", + "communityGuidelines.guidelines.friendlyHeader": "New Scratchers help keep the site friendly.", "communityGuidelines.guidelines.friendlyBody": "It’s important to keep your creations and conversations friendly and appropriate for all ages. If you think something on Scratch is mean, insulting, too violent, or otherwise disruptive to the community, click “Report” to let us know about it." } diff --git a/src/views/become-a-scratcher/l10n.json b/src/views/become-a-scratcher/l10n.json index 1ff8b8837..10577036a 100644 --- a/src/views/become-a-scratcher/l10n.json +++ b/src/views/become-a-scratcher/l10n.json @@ -29,6 +29,31 @@ "becomeAScratcher.noInvitation.body": "To become a Scratcher, you must be active on Scratch for a while, share several projects, and comment constructively in the community. After a few weeks, you will receive a notification inviting you to become a Scratcher. Scratch on!", "becomeAScratcher.finishLater.header": "No worries, take your time!", "becomeAScratcher.finishLater.body": "By leaving this page, you will not finish the process to become a Scratcher and will stay as a New Scratcher. If you change your mind later, you can always come back via your profile page.", - "becomeAScratcher.finishLater.clickBecomeAScratcher": "Just click on “★ Become a Scratcher!” below your username." + "becomeAScratcher.finishLater.clickBecomeAScratcher": "Just click on “★ Become a Scratcher!” below your username.", + + "communityGuidelines.guidelines.respectSection": "Become a Scratcher - Treat everyone with respect", + "communityGuidelines.guidelines.respectHeader": "Scratchers treat everyone with respect.", + "communityGuidelines.guidelines.respectBody": "Everyone on Scratch is encouraged to share things that excite them and are important to them—we hope that you find ways to celebrate your own identity on Scratch, and allow others to do the same.", + "communityGuidelines.guidelines.safeSection": "Become a Scratcher - Be safe", + "communityGuidelines.guidelines.safeHeader": "Scratchers are safe: we keep personal and contact information private.", + "communityGuidelines.guidelines.safeBody": "This includes not sharing real last names, phone numbers, addresses, hometowns, school names, email addresses, usernames or links to social media sites, video chatting applications, or websites with private chat functionality.", + "communityGuidelines.guidelines.feedbackSection": "Become a Scratcher - Give helpful feedback", + "communityGuidelines.guidelines.feedbackHeader": "Scratchers give helpful feedback.", + "communityGuidelines.guidelines.feedbackBody": "When commenting on a project, remember to say something you like about it, offer suggestions, and be kind, not critical.", + "communityGuidelines.guidelines.remix1Section": "Become a Scratcher - Embrace remix culture", + "communityGuidelines.guidelines.remix1Header": "Scratchers embrace remix culture.", + "communityGuidelines.guidelines.remix1Body": "Remixing is when you build upon someone else’s projects, code, ideas, images, or anything else they share on Scratch to make your own unique creation.", + "communityGuidelines.guidelines.remix2Section": "Become a Scratcher - Embrace remix culture", + "communityGuidelines.guidelines.remix2Header": "Remixing is a great way to collaborate and connect with other Scratchers.", + "communityGuidelines.guidelines.remix2Body": "You are encouraged to use anything you find on Scratch in your own creations, as long as you provide credit to everyone whose work you used and make a meaningful change to it. ", + "communityGuidelines.guidelines.remix3Section": "Become a Scratcher - Embrace remix culture", + "communityGuidelines.guidelines.remix3Header": "Remixing means sharing with others.", + "communityGuidelines.guidelines.remix3Body": "When you share something on Scratch, you are giving permission to all Scratchers to use your work in their creations, too.", + "communityGuidelines.guidelines.honestSection": "Become a Scratcher - Be honest", + "communityGuidelines.guidelines.honestHeader": "Scratchers are honest.", + "communityGuidelines.guidelines.honestBody": "It’s important to be honest and authentic when interacting with others on Scratch, and remember that there is a person behind every Scratch account.", + "communityGuidelines.guidelines.friendlySection": "Become a Scratcher - Keep the site friendly", + "communityGuidelines.guidelines.friendlyHeader": "Scratchers help keep the site friendly.", + "communityGuidelines.guidelines.friendlyBody": "It’s important to keep your creations and conversations friendly and appropriate for all ages. If you think something on Scratch is mean, insulting, too violent, or otherwise disruptive to the community, click “Report” to let us know about it." } \ No newline at end of file diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index f9bbb420d..b0179a186 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -14,7 +14,7 @@ const Page = require('../../components/page/www/page.jsx'); const SplashPresentation = require('./presentation.jsx'); const {injectIntl} = require('react-intl'); const { - IntlCommunityGuidelinesModal + CommunityGuidelinesModal } = require('../../components/community-guidelines/community-guidelines-modal.jsx'); const SCRATCH_WEEK_START_TIME = 1621224000000; // 2021-05-17 00:00:00 -- No end time for now @@ -203,7 +203,7 @@ class Splash extends React.Component { const shouldReviewCommunityGuidelines = this.props.shouldReviewCommunityGuidelines; return (<> -