Making WordPress.org


Ignore:
Timestamp:
03/01/2017 06:08:54 PM (7 years ago)
Author:
obenland
Message:

Plugin Directory: Update React client with latest changes.

This is largely a cleanup commit with some WIP around switching to node-wpapi.

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 */
     4import React, { Component, PropTypes } from 'react';
     5import { identity } from 'lodash';
    26import { IndexLink } from 'react-router';
     7import { localize } from 'i18n-calypso';
    38
    4 export default React.createClass( {
    5     displayName: 'NotFound',
     9export class NotFound extends Component {
     10    static propTypes = {
     11        translate: PropTypes.func,
     12    };
     13
     14    static defaultProps = {
     15        translate: identity,
     16    };
    617
    718    componentDidMount() {
    8         setTimeout( function() {
    9             jQuery( '.hinge' ).hide();
    10         }, 1800 );
    11     },
     19        setTimeout( () => jQuery( '.hinge' ).hide(), 1800 );
     20    }
    1221
    1322    render() {
     
    1524            <section className="error-404 not-found">
    1625                <header className="page-header">
    17                     <h1 className="page-title">Oops! That page can&rsquo;t be found.</h1>
     26                    <h1 className="page-title">{ this.props.translate( 'Oops! That page can&rsquo;t be found.' ) }</h1>
    1827                </header>
    1928                <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>
    2136
    2237                    <div className="logo-swing">
     
    2641                </div>
    2742            </section>
    28         )
     43        );
    2944    }
    30 } );
     45}
    3146
    32 
     47export default localize( NotFound );
Note: See TracChangeset for help on using the changeset viewer.