mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-27 05:11:42 -04:00
Localize the welcome panel
This commit is contained in:
parent
af415e1bf3
commit
cb2f639d07
2 changed files with 21 additions and 6 deletions
6
en.json
6
en.json
|
@ -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"
|
||||
}
|
|
@ -1,4 +1,8 @@
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue