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/login.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/login.jsx')
-rw-r--r-- | web/react/components/login.jsx | 101 |
1 files changed, 79 insertions, 22 deletions
diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index 6887489a7..c4f530af0 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -7,7 +7,7 @@ import LoginLdap from './login_ldap.jsx'; import * as Utils from '../utils/utils.jsx'; import Constants from '../utils/constants.jsx'; -var FormattedMessage = ReactIntl.FormattedMessage; +import {FormattedMessage} from 'mm-intl'; export default class Login extends React.Component { constructor(props) { @@ -24,10 +24,16 @@ export default class Login extends React.Component { loginMessage.push( <a className='btn btn-custom-login gitlab' + key='gitlab' href={'/' + teamName + '/login/gitlab'} > <span className='icon' /> - <span>{'with GitLab'}</span> + <span> + <FormattedMessage + id='login.gitlab' + defaultMessage='with GitLab' + /> + </span> </a> ); } @@ -36,10 +42,16 @@ export default class Login extends React.Component { loginMessage.push( <a className='btn btn-custom-login google' + key='google' href={'/' + teamName + '/login/google'} > <span className='icon' /> - <span>{'with Google Apps'}</span> + <span> + <FormattedMessage + id='login.google' + defaultMessage='with Google Apps' + /> + </span> </a> ); } @@ -49,9 +61,19 @@ export default class Login extends React.Component { if (extraParam) { let msg; if (extraParam === Constants.SIGNIN_CHANGE) { - msg = ' Sign-in method changed successfully'; + msg = ( + <FormattedMessage + id='login.changed' + defaultMessage=' Sign-in method changed successfully' + /> + ); } else if (extraParam === Constants.SIGNIN_VERIFIED) { - msg = ' Email Verified'; + msg = ( + <FormattedMessage + id='login.verified' + defaultMessage=' Email Verified' + /> + ); } if (msg != null) { @@ -78,7 +100,12 @@ export default class Login extends React.Component { <div> {loginMessage} <div className='or__container'> - <span>{'or'}</span> + <span> + <FormattedMessage + id='login.or' + defaultMessage='or' + /> + </span> </div> </div> ); @@ -90,7 +117,7 @@ export default class Login extends React.Component { <div className='form-group'> <a href={'/' + teamName + '/reset_password'}> <FormattedMessage - id='login.forgot_password' + id='login.forgot' defaultMessage='I forgot my password' /> </a> @@ -102,12 +129,19 @@ export default class Login extends React.Component { if (this.props.inviteId) { userSignUp = ( <div> - <span>{`Don't have an account? `} + <span> + <FormattedMessage + id='login.noAccount' + defaultMessage="Don't have an account? " + /> <a href={'/signup_user_complete/?id=' + this.props.inviteId} className='signup-team-login' > - {'Create one now'} + <FormattedMessage + id='login.create' + defaultMessage='Create one now' + /> </a> </span> </div> @@ -115,14 +149,17 @@ export default class Login extends React.Component { } let teamSignUp = null; - if (global.window.mm_config.EnableTeamCreation === 'true') { + if (global.window.mm_config.EnableTeamCreation === 'true' && !Utils.isMobileApp()) { teamSignUp = ( <div className='margin--extra'> <a href='/' className='signup-team-login' > - {'Create a new team'} + <FormattedMessage + id='login.createTeam' + defaultMessage='Create a new team' + /> </a> </div> ); @@ -137,25 +174,45 @@ export default class Login extends React.Component { ); } + let findTeams = null; + if (!Utils.isMobileApp()) { + findTeams = ( + <div className='form-group margin--extra form-group--small'> + <span> + <a href='/find_team'> + <FormattedMessage + id='login.find' + defaultMessage='Find your other teams' + /> + </a></span> + </div> + ); + } + return ( <div className='signup-team__container'> - <h5 className='margin--less'>{'Sign in to:'}</h5> + <h5 className='margin--less'> + <FormattedMessage + id='login.signTo' + defaultMessage='Sign in to:' + /> + </h5> <h2 className='signup-team__name'>{teamDisplayName}</h2> - <h2 className='signup-team__subdomain'>{'on '}{global.window.mm_config.SiteName}</h2> + <h2 className='signup-team__subdomain'> + <FormattedMessage + id='login.on' + defaultMessage='on {siteName}' + values={{ + siteName: global.window.mm_config.SiteName + }} + /> + </h2> {extraBox} {loginMessage} {emailSignup} {ldapLogin} {userSignUp} - <div className='form-group margin--extra form-group--small'> - <span> - <a href='/find_team'> - <FormattedMessage - id='login.find_teams' - defaultMessage='Find your other teams' - /> - </a></span> - </div> + {findTeams} {forgotPassword} {teamSignUp} </div> |