@@ -4,7 +4,7 @@ import {compose} from 'redux';
44import { connect } from 'react-redux' ;
55import ReactModal from 'react-modal' ;
66import VM from 'scratch-vm' ;
7- import { injectIntl , intlShape } from 'react-intl' ;
7+ import { defineMessages , injectIntl , intlShape } from 'react-intl' ;
88
99import ErrorBoundaryHOC from '../lib/error-boundary-hoc.jsx' ;
1010import { openExtensionLibrary } from '../reducers/modals' ;
@@ -25,14 +25,22 @@ import {
2525} from '../reducers/modals' ;
2626
2727import FontLoaderHOC from '../lib/font-loader-hoc.jsx' ;
28+ import LocalizationHOC from '../lib/localization-hoc.jsx' ;
2829import ProjectFetcherHOC from '../lib/project-fetcher-hoc.jsx' ;
2930import ProjectSaverHOC from '../lib/project-saver-hoc.jsx' ;
3031import vmListenerHOC from '../lib/vm-listener-hoc.jsx' ;
3132import vmManagerHOC from '../lib/vm-manager-hoc.jsx' ;
32- import { defaultProjectTitleMessages } from '../reducers/project-title' ;
3333
3434import GUIComponent from '../components/gui/gui.jsx' ;
3535
36+ const messages = defineMessages ( {
37+ defaultProjectTitle : {
38+ id : 'gui.gui.defaultProjectTitle' ,
39+ description : 'Default title for project' ,
40+ defaultMessage : 'Scratch Project'
41+ }
42+ } ) ;
43+
3644class GUI extends React . Component {
3745 componentDidMount ( ) {
3846 this . setReduxTitle ( this . props . projectTitle ) ;
@@ -48,7 +56,7 @@ class GUI extends React.Component {
4856 setReduxTitle ( newTitle ) {
4957 if ( newTitle === null || typeof newTitle === 'undefined' ) {
5058 this . props . onUpdateReduxProjectTitle (
51- this . props . intl . formatMessage ( defaultProjectTitleMessages . defaultProjectTitle )
59+ this . props . intl . formatMessage ( messages . defaultProjectTitle )
5260 ) ;
5361 } else {
5462 this . props . onUpdateReduxProjectTitle ( newTitle ) ;
@@ -163,6 +171,7 @@ const ConnectedGUI = injectIntl(connect(
163171// the hierarchy of HOC constructor calls clearer here; it has nothing to do with redux's
164172// ability to compose reducers.
165173const WrappedGui = compose (
174+ LocalizationHOC ,
166175 ErrorBoundaryHOC ( 'Top Level App' ) ,
167176 FontLoaderHOC ,
168177 ProjectFetcherHOC ,
0 commit comments