L10n pass

This commit is contained in:
Ray Schamp 2016-06-13 13:29:37 -04:00
parent 97c4e9beb9
commit 8dac67f292
3 changed files with 176 additions and 97 deletions

View file

@ -2,9 +2,12 @@
"general.accountSettings": "Account settings", "general.accountSettings": "Account settings",
"general.about": "About", "general.about": "About",
"general.aboutScratch": "About Scratch", "general.aboutScratch": "About Scratch",
"general.birthMonth": "Birth Month",
"general.birthYear": "Birth Year",
"general.donate": "Donate", "general.donate": "Donate",
"general.collaborators": "Collaborators", "general.collaborators": "Collaborators",
"general.community": "Community", "general.community": "Community",
"general.confirmEmail": "Confirm Email",
"general.contactUs": "Contact Us", "general.contactUs": "Contact Us",
"general.copyright": "Scratch is a project of the Lifelong Kindergarten Group at the MIT Media Lab", "general.copyright": "Scratch is a project of the Lifelong Kindergarten Group at the MIT Media Lab",
"general.country": "Country", "general.country": "Country",
@ -17,6 +20,7 @@
"general.female": "Female", "general.female": "Female",
"general.forParents": "For Parents", "general.forParents": "For Parents",
"general.forEducators": "For Educators", "general.forEducators": "For Educators",
"general.gender": "Gender",
"general.guidelines": "Community Guidelines", "general.guidelines": "Community Guidelines",
"general.help": "Help", "general.help": "Help",
"general.jobs": "Jobs", "general.jobs": "Jobs",
@ -41,6 +45,7 @@
"general.myClass": "My Class", "general.myClass": "My Class",
"general.myClasses": "My Classes", "general.myClasses": "My Classes",
"general.myStuff": "My Stuff", "general.myStuff": "My Stuff",
"general.notRequired": "Not Required",
"general.other": "Other", "general.other": "Other",
"general.offlineEditor": "Offline Editor", "general.offlineEditor": "Offline Editor",
"general.password": "Password", "general.password": "Password",
@ -67,7 +72,10 @@
"general.tipsPongGame": "Create a Pong Game", "general.tipsPongGame": "Create a Pong Game",
"general.termsOfUse": "Terms of Use", "general.termsOfUse": "Terms of Use",
"general.username": "Username", "general.username": "Username",
"general.validationEmail": "Please enter a valid email address",
"general.validationEmailMatch": "The emails do not match",
"general.viewAll": "View All", "general.viewAll": "View All",
"general.website": "Website",
"general.whatsHappening": "What's Happening?", "general.whatsHappening": "What's Happening?",
"general.wiki": "Scratch Wiki", "general.wiki": "Scratch Wiki",

View file

@ -20,12 +20,42 @@
"teacherRegistration.phoneStepDescription": "Your phone number will not be displayed publicly, and will be kept confidential and secure", "teacherRegistration.phoneStepDescription": "Your phone number will not be displayed publicly, and will be kept confidential and secure",
"teacherRegistration.phoneConsent": "Yes, the Scratch Team may call me to verify my Teacher Account if needed", "teacherRegistration.phoneConsent": "Yes, the Scratch Team may call me to verify my Teacher Account if needed",
"teacherRegistration.validationPhoneConsent": "You must consent to verification of your Teacher Account", "teacherRegistration.validationPhoneConsent": "You must consent to verification of your Teacher Account",
"teacherRegistration.organizationChoiceElementarySchool": "Elementary School", "teacherRegistration.orgStepTitle": "Organization",
"teacherRegistration.organizationChoiceMiddleSchool": "Middle School", "teacherRegistration.orgStepDescription": "Your information will not be displayed publicly, and will be kept confidential and secure",
"teacherRegistration.organizationChoiceHighSchool": "High School", "teacherRegistration.organization": "Organization",
"teacherRegistration.organizationChoiceUniversity": "University / College", "teacherRegistration.orgTitle": "Your Role",
"teacherRegistration.organizationChoiceMuseum": "Museum", "teacherRegistration.orgType": "Type of Organization",
"teacherRegistration.organizationChoiceLibrary": "Library", "teacherRegistration.checkAll": "Check all that apply",
"teacherRegistration.organizationChoiceCamp": "Camp", "teacherRegistration.orgChoiceElementarySchool": "Elementary School",
"teacherRegistration.organizationChoiceOther": "Other" "teacherRegistration.orgChoiceMiddleSchool": "Middle School",
"teacherRegistration.orgChoiceHighSchool": "High School",
"teacherRegistration.orgChoiceUniversity": "College/University",
"teacherRegistration.orgChoiceAfterschool": "Afterscool Program",
"teacherRegistration.orgChoiceMuseum": "Museum",
"teacherRegistration.orgChoiceLibrary": "Library",
"teacherRegistration.orgChoiceCamp": "Camp",
"teacherRegistration.orgChoiceOther": "Other",
"teacherRegistration.selectCountry": "select country",
"teacherRegistration.validationAddress": "This doesn't look like a real address",
"teacherRegistration.addressLine1": "Address Line 1",
"teacherRegistration.addressLine2": "Address Line 2",
"teacherRegistration.zipCode": "ZIP",
"teacherRegistration.stateProvince": "State",
"teacherRegistration.city": "City",
"teacherRegistration.addressStepTitle": "Address",
"teacherRegistration.addressStepDescription": "Your information will not be displayed publicly, and will be kept confidential and secure.",
"teacherRegistration.useScratchStepTitle": "How you plan to use Scratch",
"teacherRegistration.useScratchStepDescription": "Tell us a little about how you plan to use Scratch. Why do we ask for this information",
"teacherRegistration.howUseScratch": "How do you plan to use Scratch at your organization?",
"teacherRegistration.emailStepTitle": "Email Address",
"teacherRegistration.emailStepDescription": "We will send you a confirmation email that will allow you to access your Scratch Teacher Account.",
"teacherRegistration.validationEmailMatch": "The emails do not match",
"teacherRegistration.lastStepTitle": "Thank you for requesting a Scratch Teacher Account",
"teacherRegistration.lastStepDescription": "We are currently processing your application. ",
"teacherRegistration.confirmYourEmail": "Confirm Your Email",
"teacherRegistration.confirmYourEmailDescription": "If you haven't already, please click the link in the confirmation email sent to:",
"teacherRegistration.waitForApproval": "Wait for Approval",
"teacherRegistration.waitForApprovalDescription": "Your information is being reviewed. Please be patient, the approval process can take up to 24 hours. You will receive an email with your login information once your account has been created.",
"teacherRegistration.checkOutResources": "Get Started with Resources",
"teacherRegistration.checkOutResourcesDescription": "Explore materials for educators and facilitators written by the Scratch Team, including <a href='/educators#resources'>tips, tutorials, and guides</a>."
} }

View file

@ -116,9 +116,14 @@ module.exports = {
<intl.FormattedMessage id="teacherRegistration.personalStepDescription" /> <intl.FormattedMessage id="teacherRegistration.personalStepDescription" />
</p>}> </p>}>
<Form onValidSubmit={this.props.onNextStep}> <Form onValidSubmit={this.props.onNextStep}>
<Select label="Birth Month" name="user.birth.month" options={this.getMonthOptions()} required /> <Select label={formatMessage({id: 'general.birthMonth'})}
<Select label="Birth Yeah" name="user.birth.year" options={this.getYearOptions()} required /> name="user.birth.month"
<RadioGroup label="Gender" options={this.getMonthOptions()}
required />
<Select label={formatMessage({id: 'general.birthYear'})}
name="user.birth.year"
options={this.getYearOptions()} required />
<RadioGroup label={formatMessage({id: 'general.gender'})}
name="user.gender" name="user.gender"
onChange={this.onChooseGender} onChange={this.onChooseGender}
options={[ options={[
@ -213,21 +218,21 @@ module.exports = {
}; };
}, },
getOrganizationOptions: function () { getOrganizationOptions: function () {
var choices = { return [
ElementarySchool: 'Elementary School', 'orgChoiceElementarySchool',
MiddleSchool: 'Middle School', 'orgChoiceMiddleSchool',
HighSchool: 'High School', 'orgChoiceHighSchool',
University: 'University / College', 'orgChoiceUniversity',
Museum: 'Museum', 'orgChoiceAfterschool',
Library: 'Library', 'orgChoiceMuseum',
Camp: 'Camp', 'orgChoiceLibrary',
Other: 'Other' 'orgChoiceCamp',
}; 'orgChoiceOther'
return Object.keys(choices).map(function (key) { ].map(function (choice, id) {
return { return {
value: choices[key], value: id,
label: this.props.intl.formatMessage({ label: this.props.intl.formatMessage({
id: 'teacherRegistration.organizationChoice' + key id: 'teacherRegistration.' + choice
}) })
}; };
}.bind(this)); }.bind(this));
@ -236,17 +241,24 @@ module.exports = {
this.setState({otherDisabled: values.indexOf('Other') === -1}); this.setState({otherDisabled: values.indexOf('Other') === -1});
}, },
render: function () { render: function () {
var formatMessage = this.props.intl.formatMessage;
return ( return (
<ProgressionStep title="Organization" <ProgressionStep title={formatMessage({id: 'teacherRegistration.orgStepTitle'})}
description={ description={
<p> <p>
Your responses to these questions will be kept private. <intl.FormattedMessage id="teacherRegistration.orgStepDescription" />
Why do we ask for this information <a onClick={this.handle}>?</a> </p>}>
</p>}>
<Form onValidSubmit={this.props.onNextStep}> <Form onValidSubmit={this.props.onNextStep}>
<Input label="Organization" type="text" name="organization.name" required /> <Input label={formatMessage({id: 'teacherRegistration.organization'})}
<Input label="Title / Position" type="text" name="organization.title" required /> type="text"
<CheckboxGroup label="Type of Organization" name="organization.name"
required />
<Input label={formatMessage({id: 'teacherRegistration.orgTitle'})}
type="text"
name="organization.title"
required />
<CheckboxGroup label={formatMessage({id: 'teacherRegistration.orgType'})}
help={formatMessage({id: 'teacherRegistration.checkAll'})}
name="organization.type" name="organization.type"
value={[]} value={[]}
options={this.getOrganizationOptions()} options={this.getOrganizationOptions()}
@ -256,14 +268,17 @@ module.exports = {
name="organization.other" name="organization.other"
disabled={this.state.otherDisabled} disabled={this.state.otherDisabled}
required={!this.state.otherDisabled} /> required={!this.state.otherDisabled} />
<Input label="Website URL (not required)" type="url" name="organization.url" /> <Input label={formatMessage({id: 'general.website'})}
<Button type="submit">Next Step</Button> help={formatMessage({id: 'general.notRequired'})}
type="url"
name="organization.url" />
<Button type="submit"><intl.FormattedMessage id="teacherRegistration.nextStep" /></Button>
</Form> </Form>
</ProgressionStep> </ProgressionStep>
); );
} }
})), })),
AddressStep: React.createClass({ AddressStep: intl.injectIntl(React.createClass({
getDefaultProps: function () { getDefaultProps: function () {
return {defaultCountry: DEFAULT_COUNTRY}; return {defaultCountry: DEFAULT_COUNTRY};
}, },
@ -304,125 +319,151 @@ module.exports = {
return this.props.onNextStep(formData); return this.props.onNextStep(formData);
} else { } else {
return invalidate({ return invalidate({
'all': 'This doesn\'t look like a real address' 'all': <FormattedMessage id="teacherRegistration.addressValidationError" />
}); });
} }
}.bind(this)); }.bind(this));
}, },
render: function () { render: function () {
var formatMessage = this.props.intl.formatMessage;
var stateOptions = countryData.subdivisionOptions[this.state.countryChoice]; var stateOptions = countryData.subdivisionOptions[this.state.countryChoice];
var stateDefault = 'Please select...'; stateOptions = [{}].concat(stateOptions);
stateOptions = [{label: stateDefault}].concat(stateOptions); var countryOptions = countryData.countryOptions.concat({
label: formatMessage({id: 'teacherRegistration.selectCountry'}),
disabled: true,
selected: true
}).sort(function (a, b) {
if (a.disabled) return -1;
if (b.disabled) return 1;
if (a.value === this.props.defaultCountry) return -1;
if (b.value === this.props.defaultCountry) return 1;
return 0;
}.bind(this));
return ( return (
<ProgressionStep title="Address" <ProgressionStep title={formatMessage({id: 'teacherRegistration.addressStepTitle'})}
description={ description={
<p> <p>
Your responses to these questions will be kept private. <intl.FormattedMessage id="teacherRegistration.addressStepDescription" />
Why do we ask for this information <a onClick={this.handle}>?</a> </p>}>
</p>}>
<Form onValidSubmit={this.onValidSubmit}> <Form onValidSubmit={this.onValidSubmit}>
<Select label="Country" <Select label={formatMessage({id: 'general.country'})}
name="address.country" name="address.country"
options={countryData.countryOptions} options={countryOptions}
onChange={this.onChangeCountry} onChange={this.onChangeCountry}
value={this.state.countryChoice}
required /> required />
<Input label="Address Line 1" type="text" name="address.line1" required /> <Input label={formatMessage({id: 'teacherRegistration.addressLine1'})}
<Input label="Address Line 2" type="text" name="address.line2" /> type="text"
<Input label="City" type="text" name="address.city" required /> name="address.line1"
required />
<Input label={formatMessage({id: 'teacherRegistration.addressLine2'})}
type="text"
name="address.line2" />
<Input label={formatMessage({id: 'teacherRegistration.city'})}
type="text"
name="address.city"
required />
{stateOptions.length > 2 ? {stateOptions.length > 2 ?
<Select label="State / Province" name="address.state" options={stateOptions} required /> : <Select label={formatMessage({id: 'teacherRegistration.stateProvince'})}
name="address.state"
options={stateOptions}
required /> :
[] []
} }
<Input label="ZIP Code" type="text" name="address.zip" required /> <Input label={formatMessage({id: 'teacherRegistration.zipCode'})}
type="text"
name="address.zip"
required />
<Button type="submit" disabled={this.state.waiting}> <Button type="submit" disabled={this.state.waiting}>
{this.state.waiting ? {this.state.waiting ?
<Spinner /> : <Spinner /> :
<span>Next Step</span> <span><intl.FormattedMessage id="teacherRegistration.nextStep" /></span>
} }
</Button> </Button>
</Form> </Form>
</ProgressionStep> </ProgressionStep>
); );
} }
}), })),
UseScratchStep: React.createClass({ UseScratchStep: intl.injectIntl(React.createClass({
render: function () { render: function () {
var formatMessage = this.props.intl.formatMessage;
return ( return (
<ProgressionStep title="How do you use Scratch?" <ProgressionStep title={formatMessage({id: 'teacherRegistration.useScratchStepTitle'})}
description={ description={
<p> <p>
Tell us a little how you plan to use Scratch. <intl.FormattedMessage id="teacherRegistration.useScratchStepDescription" />
Why do we ask for this information <a onClick={this.handle}>?</a> </p>
</p> }>
}>
<Form onValidSubmit={this.props.onNextStep}> <Form onValidSubmit={this.props.onNextStep}>
<TextArea label="How do you use Scratch?" name="useScratch" required /> <TextArea label={formatMessage({id: 'teacherRegistration.howUseScratch'})}
<Button type="submit">Next Step</Button> name="useScratch"
required />
<Button type="submit"><intl.FormattedMessage id="teacherRegistration.nextStep" /></Button>
</Form> </Form>
</ProgressionStep> </ProgressionStep>
); );
} }
}), })),
EmailStep: React.createClass({ EmailStep: intl.injectIntl(React.createClass({
render: function () { render: function () {
var formatMessage = this.props.intl.formatMessage;
return ( return (
<ProgressionStep title="Email Address" <ProgressionStep title={formatMessage({id: 'teacherRegistration.emailStepTitle'})}
description={ description={
<p> <p>
We will send you a <strong>confirmation email</strong> that will <intl.FormattedMessage id="teacherRegistration.emailStepDescription" />
allow you to access your Scratch Teacher Account. </p>}>
</p>}>
<Form onValidSubmit={this.props.onNextStep}> <Form onValidSubmit={this.props.onNextStep}>
<Input label="Email" <Input label={formatMessage({id: 'general.emailAddress'})}
type="text" type="text"
name="user.email" name="user.email"
validations="isEmail" validations="isEmail"
validationError="Please enter a valid email address" validationError={formatMessage({id: 'general.validationEmail'})}
required /> required />
<Input label="Confirm Email" <Input label={formatMessage({id: 'general.confirmEmail'})}
type="text" type="text"
name="confirmEmail" name="confirmEmail"
validations="equalsField:user.email" validations="equalsField:user.email"
validationErrors={{ validationErrors={{
equalsField: 'The emails do not match' equalsField: formatMessage({id: 'general.validationEmailMatch'})
}} }}
required /> required />
<Button type="submit">Next Step</Button> <Button type="submit"><intl.FormattedMessage id="teacherRegistration.nextStep" /></Button>
</Form> </Form>
</ProgressionStep> </ProgressionStep>
); );
} }
}), })),
LastStep: React.createClass({ LastStep: intl.injectIntl(React.createClass({
render: function () { render: function () {
var formatMessage = this.props.intl.formatMessage;
return ( return (
<ProgressionStep title="Almost Done" <ProgressionStep title={formatMessage({id: 'teacherRegistration.lastStepTitle'})}
description={ description={
<p> <p>
Lorem ipsum dolor sit amet <intl.FormattedMessage id="teacherRegistration.lastStepDescription" />
</p>}> </p>}>
<div className="confirm"> <div className="confirm">
<h2>Confirm Your Email</h2> <h2><intl.FormattedMessage id="teacherRegistration.confirmYourEmail" /></h2>
<p> <p>
Click the link in the confirmation email that we <intl.FormattedMessage id="teacherRegistration.confirmYourEmailDescription" /><br />
sent to the following address:<br /> <strong>{this.props.formData.user && this.props.formData.user.email}</strong>
<strong>{this.props.formData.user.email}</strong>
</p> </p>
<div className="box-footer">
<a onClick="">Wrong email?</a>
<a onClick="">Having trouble?</a>
</div>
</div> </div>
<div className="wait"> <div className="wait">
<h2>Wait for Approval</h2> <h2><intl.FormattedMessage id="teacherRegistration.waitForApproval" /></h2>
<p> <p>
Your information is being reviewed. Please be <intl.FormattedMessage id="teacherRegistration.waitForApprovalDescription" />
patient, the approval process can take up to 24hrs. </p>
</div>
<div className="resources">
<h2><intl.FormattedMessage id="teacherRegistration.checkOutResources" /></h2>
<p>
<intl.FormattedHTMLMessage id="teacherRegistration.checkOutResourcesDescription" />
</p> </p>
</div> </div>
</ProgressionStep> </ProgressionStep>
); );
} }
}) }))
}; };