Merge pull request #584 from technoboy10/gh554-localize-faq

Fix GH-554: Localize FAQ title
This commit is contained in:
Connor Hudson 2016-06-17 14:47:46 -04:00 committed by GitHub
commit 5d12e5773d
2 changed files with 6 additions and 3 deletions

View file

@ -1,4 +1,5 @@
var React = require('react'); var React = require('react');
var injectIntl = require('react-intl').injectIntl;
var FormattedHTMLMessage = require('react-intl').FormattedHTMLMessage; var FormattedHTMLMessage = require('react-intl').FormattedHTMLMessage;
var FormattedMessage = require('react-intl').FormattedMessage; var FormattedMessage = require('react-intl').FormattedMessage;
var render = require('../../lib/render.jsx'); var render = require('../../lib/render.jsx');
@ -6,11 +7,12 @@ var render = require('../../lib/render.jsx');
var Page = require('../../components/page/www/page.jsx'); var Page = require('../../components/page/www/page.jsx');
var InformationPage = require('../../components/informationpage/informationpage.jsx'); var InformationPage = require('../../components/informationpage/informationpage.jsx');
var Faq = React.createClass({ var Faq = injectIntl(React.createClass({
type: 'Faq', type: 'Faq',
render: function () { render: function () {
var formatMessage = this.props.intl.formatMessage;
return ( return (
<InformationPage title={'Frequently Asked Questions (FAQ)'}> <InformationPage title={formatMessage({id: 'faq.title'})}>
<div className="inner info-inner"> <div className="inner info-inner">
<section id="about-scratch"> <section id="about-scratch">
<span className="nav-spacer"></span> <span className="nav-spacer"></span>
@ -214,6 +216,6 @@ var Faq = React.createClass({
</InformationPage> </InformationPage>
); );
} }
}); }));
render(<Page><Faq /></Page>, document.getElementById('app')); render(<Page><Faq /></Page>, document.getElementById('app'));

View file

@ -1,4 +1,5 @@
{ {
"faq.title":"Frequently Asked Questions (FAQ)",
"faq.intro":"On this page, youll find answers to frequently asked questions about Scratch.", "faq.intro":"On this page, youll find answers to frequently asked questions about Scratch.",
"faq.aboutTitle":"General Questions", "faq.aboutTitle":"General Questions",
"faq.privacyTitle":"Privacy Policy", "faq.privacyTitle":"Privacy Policy",