Spanish Translation: Email verification (#1555)
* EmailVerificationView Co-authored-by: Andrew Nicolaou <me@andrewnicolaou.co.uk>
This commit is contained in:
parent
fdf60aaa98
commit
1d9bd74805
3 changed files with 26 additions and 7 deletions
|
@ -3,6 +3,7 @@ import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { browserHistory } from 'react-router';
|
import { browserHistory } from 'react-router';
|
||||||
|
import { withTranslation } from 'react-i18next';
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
import { verifyEmailConfirmation } from '../actions';
|
import { verifyEmailConfirmation } from '../actions';
|
||||||
|
@ -31,20 +32,20 @@ class EmailVerificationView extends React.Component {
|
||||||
|
|
||||||
if (this.verificationToken() == null) {
|
if (this.verificationToken() == null) {
|
||||||
status = (
|
status = (
|
||||||
<p>That link is invalid.</p>
|
<p>{this.props.t('EmailVerificationView.InvalidTokenNull')}</p>
|
||||||
);
|
);
|
||||||
} else if (emailVerificationTokenState === 'checking') {
|
} else if (emailVerificationTokenState === 'checking') {
|
||||||
status = (
|
status = (
|
||||||
<p>Validating token, please wait...</p>
|
<p>{this.props.t('EmailVerificationView.Checking')}</p>
|
||||||
);
|
);
|
||||||
} else if (emailVerificationTokenState === 'verified') {
|
} else if (emailVerificationTokenState === 'verified') {
|
||||||
status = (
|
status = (
|
||||||
<p>All done, your email address has been verified.</p>
|
<p>{this.props.t('EmailVerificationView.Verified')}</p>
|
||||||
);
|
);
|
||||||
setTimeout(() => browserHistory.push('/'), 1000);
|
setTimeout(() => browserHistory.push('/'), 1000);
|
||||||
} else if (emailVerificationTokenState === 'invalid') {
|
} else if (emailVerificationTokenState === 'invalid') {
|
||||||
status = (
|
status = (
|
||||||
<p>Something went wrong.</p>
|
<p>{this.props.t('EmailVerificationView.InvalidState')}</p>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,10 +54,10 @@ class EmailVerificationView extends React.Component {
|
||||||
<Nav layout="dashboard" />
|
<Nav layout="dashboard" />
|
||||||
<div className="form-container">
|
<div className="form-container">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>p5.js Web Editor | Email Verification</title>
|
<title>{this.props.t('EmailVerificationView.Title')}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="form-container__content">
|
<div className="form-container__content">
|
||||||
<h2 className="form-container__title">Verify your email</h2>
|
<h2 className="form-container__title">{this.props.t('EmailVerificationView.Verify')}</h2>
|
||||||
{status}
|
{status}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -83,6 +84,7 @@ EmailVerificationView.propTypes = {
|
||||||
'checking', 'verified', 'invalid'
|
'checking', 'verified', 'invalid'
|
||||||
]),
|
]),
|
||||||
verifyEmailConfirmation: PropTypes.func.isRequired,
|
verifyEmailConfirmation: PropTypes.func.isRequired,
|
||||||
|
t: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(EmailVerificationView);
|
export default withTranslation()(connect(mapStateToProps, mapDispatchToProps)(EmailVerificationView));
|
||||||
|
|
|
@ -307,5 +307,14 @@
|
||||||
"Or": "Or",
|
"Or": "Or",
|
||||||
"AlreadyHave": "Already have an account?",
|
"AlreadyHave": "Already have an account?",
|
||||||
"Login": "Log In"
|
"Login": "Log In"
|
||||||
|
},
|
||||||
|
|
||||||
|
"EmailVerificationView": {
|
||||||
|
"Title": "p5.js Web Editor | Email Verification",
|
||||||
|
"Verify": "Verify your email",
|
||||||
|
"InvalidTokenNull": "That link is invalid.",
|
||||||
|
"Checking": "Validating token, please wait...",
|
||||||
|
"Verified": "All done, your email address has been verified.",
|
||||||
|
"InvalidState": "Something went wrong."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,5 +307,13 @@
|
||||||
"Or": "o",
|
"Or": "o",
|
||||||
"AlreadyHave": "¿Ya tienes cuenta? ",
|
"AlreadyHave": "¿Ya tienes cuenta? ",
|
||||||
"Login": "Ingresa"
|
"Login": "Ingresa"
|
||||||
|
},
|
||||||
|
"EmailVerificationView": {
|
||||||
|
"Title": "Editor Web p5.js | Correo de Verificación",
|
||||||
|
"Verify": "Verica tu correo",
|
||||||
|
"InvalidTokenNull": "La liga es inválida.",
|
||||||
|
"Checking": "Validando token, por favor espera...",
|
||||||
|
"Verified": "Concluido, tu correo electrónico ha sido verificado.",
|
||||||
|
"InvalidState": "Algo salió mal."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue