Commit cb2f639d authored by Ray Schamp's avatar Ray Schamp

Localize the welcome panel

parent af415e1b
......@@ -61,5 +61,9 @@
"splash.projectsLovedByScratchersFollowing": "Projects Loved by Scratchers I'm Following",
"splash.projectsInStudiosFollowing": "Projects in Studios I'm Following",
"splash.communityRemixing": "What the Community is Remixing",
"splash.communityLoving": "What the Community is Loving"
"splash.communityLoving": "What the Community is Loving",
"welcome.welcomeToScratch": "Welcome to Scratch!",
"welcome.learn": "Learn how to make a project in Scratch",
"welcome.tryOut": "Try out starter projects",
"welcome.connect": "Connect with other Scratchers"
}
\ No newline at end of file
var React = require('react');
var ReactIntl = require('react-intl');
var injectIntl = ReactIntl.injectIntl;
var FormattedMessage = ReactIntl.FormattedMessage;
var Box = require('../box/box.jsx');
......@@ -10,8 +14,9 @@ var Welcome = React.createClass({
onDismiss: React.PropTypes.func
},
render: function () {
var formatMessage = this.props.intl.formatMessage;
return (
<Box title="Welcome to Scratch!"
<Box title={formatMessage({id: 'welcome.welcomeToScratch', defaultMessage: 'Welcome to Scratch!'})}
className="welcome"
moreTitle="x"
moreHref="#"
......@@ -24,7 +29,9 @@ var Welcome = React.createClass({
<div className="welcome-col blue">
<h4>
<a href="/projects/editor/?tip_bar=getStarted">
Learn how to make a project in Scratch
<FormattedMessage
id="welcome.learn"
defaultMessage="Learn how to make a project in Scratch" />
</a>
</h4>
<a href="/projects/editor/?tip_bar=getStarted">
......@@ -34,7 +41,9 @@ var Welcome = React.createClass({
<div className="welcome-col green">
<h4>
<a href="/starter_projects/">
Try out starter projects
<FormattedMessage
id="welcome.tryOut"
defaultMessage="Try out starter projects" />
</a>
</h4>
<a href="/starter_projects/">
......@@ -44,7 +53,9 @@ var Welcome = React.createClass({
<div className="welcome-col pink">
<h4>
<a href="/studios/146521/">
Connect with other Scratchers
<FormattedMessage
id="welcome.connect"
defaultMessage="Connect with other Scratchers" />
</a>
</h4>
<a href="/studios/146521/">
......@@ -56,4 +67,4 @@ var Welcome = React.createClass({
}
});
module.exports = Welcome;
module.exports = injectIntl(Welcome);
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