Changeset 5024 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/404/index.jsx
- Timestamp:
- 03/01/2017 06:08:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/404/index.jsx
r4223 r5024 1 import React from 'react'; 1 /** 2 * External dependencies. 3 */ 4 import React, { Component, PropTypes } from 'react'; 5 import { identity } from 'lodash'; 2 6 import { IndexLink } from 'react-router'; 7 import { localize } from 'i18n-calypso'; 3 8 4 export default React.createClass( { 5 displayName: 'NotFound', 9 export class NotFound extends Component { 10 static propTypes = { 11 translate: PropTypes.func, 12 }; 13 14 static defaultProps = { 15 translate: identity, 16 }; 6 17 7 18 componentDidMount() { 8 setTimeout( function() { 9 jQuery( '.hinge' ).hide(); 10 }, 1800 ); 11 }, 19 setTimeout( () => jQuery( '.hinge' ).hide(), 1800 ); 20 } 12 21 13 22 render() { … … 15 24 <section className="error-404 not-found"> 16 25 <header className="page-header"> 17 <h1 className="page-title"> Oops! That page can’t be found.</h1>26 <h1 className="page-title">{ this.props.translate( 'Oops! That page can’t be found.' ) }</h1> 18 27 </header> 19 28 <div className="page-content"> 20 <p>Try searching from the field above, or go to the <IndexLink to="/">home page</IndexLink>.</p> 29 <p> 30 { this.props.translate( 31 'Try searching from the field above, or go to the {{link}}home page{{/link}}.', { 32 component: { link: <IndexLink to="/" /> }, 33 } 34 ) } 35 </p> 21 36 22 37 <div className="logo-swing"> … … 26 41 </div> 27 42 </section> 28 ) 43 ); 29 44 } 30 } );45 } 31 46 32 47 export default localize( NotFound );
Note: See TracChangeset
for help on using the changeset viewer.