diff options
author | Elias Nahum <nahumhbl@gmail.com> | 2016-01-29 00:24:43 -0300 |
---|---|---|
committer | Elias Nahum <nahumhbl@gmail.com> | 2016-01-29 10:47:52 -0300 |
commit | 94a19ae75e71b59d01a37cc1c0415d5796d45440 (patch) | |
tree | 2385368448928ea3e64f3658163cf3d1b9ea5452 /web/react/components/email_verify.jsx | |
parent | c4386652bae12c14fa704fabad066ddc07d27527 (diff) | |
download | chat-94a19ae75e71b59d01a37cc1c0415d5796d45440.tar.gz chat-94a19ae75e71b59d01a37cc1c0415d5796d45440.tar.bz2 chat-94a19ae75e71b59d01a37cc1c0415d5796d45440.zip |
PLT-7: Refactoring frontend (chunk 5)
- Signup Team Complete
- Signup User Complete
- Email Verify
Diffstat (limited to 'web/react/components/email_verify.jsx')
-rw-r--r-- | web/react/components/email_verify.jsx | 54 |
1 files changed, 48 insertions, 6 deletions
diff --git a/web/react/components/email_verify.jsx b/web/react/components/email_verify.jsx index 9c07853b7..ef1a62130 100644 --- a/web/react/components/email_verify.jsx +++ b/web/react/components/email_verify.jsx @@ -1,6 +1,8 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. +import {FormattedMessage, FormattedHTMLMessage} from 'mm-intl'; + export default class EmailVerify extends React.Component { constructor(props) { super(props); @@ -19,21 +21,61 @@ export default class EmailVerify extends React.Component { var resend = ''; var resendConfirm = ''; if (this.props.isVerified === 'true') { - title = global.window.mm_config.SiteName + ' Email Verified'; - body = <p>Your email has been verified! Click <a href={this.props.teamURL + '?email=' + this.props.userEmail}>here</a> to log in.</p>; + title = ( + <FormattedMessage + id='email_verify.verified' + defaultMessage='{siteName} Email Verified' + values={{ + siteName: global.window.mm_config.SiteName + }} + /> + ); + body = ( + <FormattedHTMLMessage + id='email_verify.verifiedBody' + defaultMessage='<p>Your email has been verified! Click <a href={url}>here</a> to log in.</p>' + values={{ + url: this.props.teamURL + '?email=' + this.props.userEmail + }} + /> + ); } else { - title = global.window.mm_config.SiteName + ': You are almost done'; - body = <p>Please verify your email address. Check your inbox for an email.</p>; + title = ( + <FormattedMessage + id='email_verify.almost' + defaultMessage='{siteName}: You are almost done' + values={{ + siteName: global.window.mm_config.SiteName + }} + /> + ); + body = ( + <p> + <FormattedMessage + id='email_verify.notVerifiedBody' + defaultMessage='Please verify your email address. Check your inbox for an email.' + /> + </p> + ); resend = ( <button onClick={this.handleResend} className='btn btn-primary' > - Resend Email + <FormattedMessage + id='email_verify.resend' + defaultMessage='Resend Email' + /> </button> ); if (this.props.resendSuccess) { - resendConfirm = <div><br /><p className='alert alert-success'><i className='fa fa-check'></i>{' Verification email sent.'}</p></div>; + resendConfirm = ( + <div><br /><p className='alert alert-success'><i className='fa fa-check'></i> + <FormattedMessage + id='email_verify.sent' + defaultMessage=' Verification email sent.' + /> + </p></div>); } } |