From 41a0ef73ba9a6bc9901bfb3a2134845c965b8883 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Tue, 16 Aug 2016 08:55:32 -0400 Subject: [PATCH 1/3] Add missing strings for translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Explore page header 2. “by” in the project thumbnail --- src/components/thumbnail/thumbnail.jsx | 8 ++++++-- src/l10n.json | 4 +++- src/views/explore/explore.jsx | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/thumbnail/thumbnail.jsx b/src/components/thumbnail/thumbnail.jsx index b2bb234c5..f85dc18c4 100644 --- a/src/components/thumbnail/thumbnail.jsx +++ b/src/components/thumbnail/thumbnail.jsx @@ -1,5 +1,6 @@ -var React = require('react'); var classNames = require('classnames'); +var FormattedMessage = require('react-intl').FormattedMessage; +var React = require('react'); require('./thumbnail.scss'); @@ -32,7 +33,10 @@ var Thumbnail = React.createClass({ if (this.props.creator) { extra.push(
- by {this.props.creator} + {' '} + + {this.props.creator} +
); } diff --git a/src/l10n.json b/src/l10n.json index 42bd8edb7..5d3ba20e2 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -154,5 +154,7 @@ "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 24 hours. You will receive an email indicating your account has been upgraded once your account has been approved.", "registration.welcomeStepDescription": "You have successfully set up a Scratch account! You are now a member of the class:", "registration.welcomeStepPrompt": "To get started, click on the button below.", - "registration.welcomeStepTitle": "Hurray! Welcome to Scratch!" + "registration.welcomeStepTitle": "Hurray! Welcome to Scratch!", + + "thumbnail.by": "by" } diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 761d6292e..2149be580 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -111,10 +111,12 @@ var Explore = injectIntl(React.createClass({ ); }, render: function () { + var formatMessage = this.props.intl.formatMessage; + return (
- + {this.getBubble('all')} {this.getBubble('animations')} From 43add1ad35e757e563ace868c78f4210fffd087e Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Tue, 16 Aug 2016 08:56:01 -0400 Subject: [PATCH 2/3] Clean up some intl formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove `defaultMessage` from inline, which we don’t use right now --- src/views/splash/splash.jsx | 62 +++++++++++-------------------------- 1 file changed, 18 insertions(+), 44 deletions(-) diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index 85a2b2b52..e6f3ce869 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -189,16 +189,12 @@ var Splash = injectIntl(React.createClass({ var rows = [ , @@ -216,8 +212,8 @@ var Splash = injectIntl(React.createClass({ this.state.featuredGlobal.curator_top_projects[0].curator_name} moreTitle={formatMessage({id: 'general.learnMore', defaultMessage: 'Learn More'})} moreHref="/studios/386359/"> - + + ); } @@ -229,14 +225,12 @@ var Splash = injectIntl(React.createClass({ - + + ); } @@ -246,14 +240,9 @@ var Splash = injectIntl(React.createClass({ this.state.featuredGlobal.community_newest_projects.length > 0) { rows.push( - - + + ); } @@ -262,12 +251,9 @@ var Splash = injectIntl(React.createClass({ this.state.featuredCustom.custom_projects_by_following.length > 0) { rows.push( - - + ); @@ -276,12 +262,9 @@ var Splash = injectIntl(React.createClass({ this.state.featuredCustom.custom_projects_loved_by_following.length > 0) { rows.push( - - + ); @@ -291,31 +274,22 @@ var Splash = injectIntl(React.createClass({ this.state.featuredCustom.custom_projects_in_studios_following.length > 0) { rows.push( - - + ); } rows.push( - , - Date: Tue, 16 Aug 2016 11:33:07 -0400 Subject: [PATCH 3/3] =?UTF-8?q?generalize=20=E2=80=9CEducator=20Resources?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was getting overwritten since it was defined in multiple places. fixes #840. --- src/l10n.json | 1 + src/views/splash/l10n.json | 1 - src/views/splash/splash.jsx | 2 +- src/views/teachers/landing/l10n.json | 1 - src/views/teachers/landing/landing.jsx | 2 +- 5 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/l10n.json b/src/l10n.json index 5d3ba20e2..6b9041260 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -57,6 +57,7 @@ "general.privacyPolicy": "Privacy Policy", "general.projects": "Projects", "general.profile": "Profile", + "general.resourcesTitle": "Educator Resources", "general.scratchConference": "Scratch Conference", "general.scratchday": "Scratch Day", "general.scratchEd": "ScratchEd", diff --git a/src/views/splash/l10n.json b/src/views/splash/l10n.json index 297f35426..f63a65bb8 100644 --- a/src/views/splash/l10n.json +++ b/src/views/splash/l10n.json @@ -26,7 +26,6 @@ "teacherbanner.greeting": "Hi", "teacherbanner.subgreeting": "Teacher Account", "teacherbanner.classesButton": "My Classes", - "teacherbanner.resourcesButton": "Educator Resources", "teacherbanner.faqButton": "Teacher Account FAQ", "welcome.welcomeToScratch": "Welcome to Scratch!", diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index e6f3ce869..919994d12 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -324,7 +324,7 @@ var Splash = injectIntl(React.createClass({ 'teacherbanner.greeting': formatMessage({id: 'teacherbanner.greeting'}), 'teacherbanner.subgreeting': formatMessage({id: 'teacherbanner.subgreeting'}), 'teacherbanner.classesButton': formatMessage({id: 'teacherbanner.classesButton'}), - 'teacherbanner.resourcesButton': formatMessage({id: 'teacherbanner.resourcesButton'}), + 'teacherbanner.resourcesButton': formatMessage({id: 'general.resourcesTitle'}), 'teacherbanner.faqButton': formatMessage({id: 'teacherbanner.faqButton'}) }; if (this.state.projectCount === this.getInitialState().projectCount) { diff --git a/src/views/teachers/landing/l10n.json b/src/views/teachers/landing/l10n.json index 8bd9dd442..1697f6756 100644 --- a/src/views/teachers/landing/l10n.json +++ b/src/views/teachers/landing/l10n.json @@ -8,7 +8,6 @@ "teacherlanding.generalUsageSettings": "Settings: schools, museums, libraries, community centers", "teacherlanding.generalUsageGradeLevels": "Grade Levels: elementary, middle, and high school (and some colleges too!)", "teacherlanding.generalUsageSubjectAreas": "Subject Areas: language arts, science, social studies, math, computer science, foreign languages, and the arts", - "teacherlanding.resourcesTitle": "Educator Resources", "teacherlanding.scratchEdTitle": "A Community for Educators", "teacherlanding.scratchEdDescription": "ScratchEd is an online community where Scratch educators share stories, exchange resources, ask questions, and find people. ScratchEd is developed and supported by the Harvard Graduate School of Education.", "teacherlanding.meetupTitle": "In-Person Gatherings", diff --git a/src/views/teachers/landing/landing.jsx b/src/views/teachers/landing/landing.jsx index ce32a564c..f800cfedf 100644 --- a/src/views/teachers/landing/landing.jsx +++ b/src/views/teachers/landing/landing.jsx @@ -64,7 +64,7 @@ var Landing = injectIntl(React.createClass({
-

+