diff options
author | =Corey Hulen <corey@hulen.com> | 2016-02-01 14:44:17 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-02-01 14:44:17 -0800 |
commit | b4ec6900510077253290e361d1a706e5368a45de (patch) | |
tree | 6fc7c131fa7aa5f32e3aba8102416aa23c65963d /web/react/components/find_team.jsx | |
parent | ea71731f838fc010cfc7511c09875184d1b2396b (diff) | |
parent | f28486c4553f7f4bccf7bf69153c2f12699705f9 (diff) | |
download | chat-b4ec6900510077253290e361d1a706e5368a45de.tar.gz chat-b4ec6900510077253290e361d1a706e5368a45de.tar.bz2 chat-b4ec6900510077253290e361d1a706e5368a45de.zip |
Fixing merge
Diffstat (limited to 'web/react/components/find_team.jsx')
-rw-r--r-- | web/react/components/find_team.jsx | 65 |
1 files changed, 56 insertions, 9 deletions
diff --git a/web/react/components/find_team.jsx b/web/react/components/find_team.jsx index 94ca48dbf..3ff9787ad 100644 --- a/web/react/components/find_team.jsx +++ b/web/react/components/find_team.jsx @@ -4,7 +4,20 @@ import * as utils from '../utils/utils.jsx'; import * as client from '../utils/client.jsx'; -export default class FindTeam extends React.Component { +import {injectIntl, intlShape, defineMessages, FormattedMessage} from 'mm-intl'; + +var holders = defineMessages({ + submitError: { + id: 'find_team.submitError', + defaultMessage: 'Please enter a valid email address' + }, + placeholder: { + id: 'find_team.placeholder', + defaultMessage: 'you@domain.com' + } +}); + +class FindTeam extends React.Component { constructor(props) { super(props); this.state = {}; @@ -19,7 +32,7 @@ export default class FindTeam extends React.Component { var email = ReactDOM.findDOMNode(this.refs.email).value.trim().toLowerCase(); if (!email || !utils.isEmail(email)) { - state.email_error = 'Please enter a valid email address'; + state.email_error = this.props.intl.formatMessage(holders.submitError); this.setState(state); return; } @@ -50,25 +63,50 @@ export default class FindTeam extends React.Component { if (this.state.sent) { return ( <div> - <h4>{'Find Your teams'}</h4> - <p>{'An email was sent with links to any teams to which you are a member.'}</p> + <h4> + <FormattedMessage + id='find_team.findTitle' + defaultMessage='Find Your Team' + /> + </h4> + <p> + <FormattedMessage + id='find_team.findDescription' + defaultMessage='An email was sent with links to any teams to which you are a member.' + /> + </p> </div> ); } return ( <div> - <h4>Find Your Team</h4> + <h4> + <FormattedMessage + id='find_team.findTitle' + defaultMessage='Find Your Team' + /> + </h4> <form onSubmit={this.handleSubmit}> - <p>{'Get an email with links to any teams to which you are a member.'}</p> + <p> + <FormattedMessage + id='find_team.getLinks' + defaultMessage='Get an email with links to any teams to which you are a member.' + /> + </p> <div className='form-group'> - <label className='control-label'>Email</label> + <label className='control-label'> + <FormattedMessage + id='find_team.email' + defaultMessage='Email' + /> + </label> <div className={emailErrorClass}> <input type='text' ref='email' className='form-control' - placeholder='you@domain.com' + placeholder={this.props.intl.formatMessage(holders.placeholder)} maxLength='128' spellCheck='false' /> @@ -79,10 +117,19 @@ export default class FindTeam extends React.Component { className='btn btn-md btn-primary' type='submit' > - Send + <FormattedMessage + id='find_team.send' + defaultMessage='Send' + /> </button> </form> </div> ); } } + +FindTeam.propTypes = { + intl: intlShape.isRequired +}; + +export default injectIntl(FindTeam);
\ No newline at end of file |