diff --git a/client/modules/User/pages/EmailVerificationView.jsx b/client/modules/User/pages/EmailVerificationView.jsx
index 0ce31192..f34f967c 100644
--- a/client/modules/User/pages/EmailVerificationView.jsx
+++ b/client/modules/User/pages/EmailVerificationView.jsx
@@ -3,6 +3,7 @@ import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { browserHistory } from 'react-router';
+import { withTranslation } from 'react-i18next';
import get from 'lodash/get';
import { Helmet } from 'react-helmet';
import { verifyEmailConfirmation } from '../actions';
@@ -31,20 +32,20 @@ class EmailVerificationView extends React.Component {
if (this.verificationToken() == null) {
status = (
-
That link is invalid.
+ {this.props.t('EmailVerificationView.InvalidTokenNull')}
);
} else if (emailVerificationTokenState === 'checking') {
status = (
- Validating token, please wait...
+ {this.props.t('EmailVerificationView.Checking')}
);
} else if (emailVerificationTokenState === 'verified') {
status = (
- All done, your email address has been verified.
+ {this.props.t('EmailVerificationView.Verified')}
);
setTimeout(() => browserHistory.push('/'), 1000);
} else if (emailVerificationTokenState === 'invalid') {
status = (
- Something went wrong.
+ {this.props.t('EmailVerificationView.InvalidState')}
);
}
@@ -53,10 +54,10 @@ class EmailVerificationView extends React.Component {
- p5.js Web Editor | Email Verification
+ {this.props.t('EmailVerificationView.Title')}
-
Verify your email
+ {this.props.t('EmailVerificationView.Verify')}
{status}
@@ -83,6 +84,7 @@ EmailVerificationView.propTypes = {
'checking', 'verified', 'invalid'
]),
verifyEmailConfirmation: PropTypes.func.isRequired,
+ t: PropTypes.func.isRequired
};
-export default connect(mapStateToProps, mapDispatchToProps)(EmailVerificationView);
+export default withTranslation()(connect(mapStateToProps, mapDispatchToProps)(EmailVerificationView));
diff --git a/translations/locales/en-US/translations.json b/translations/locales/en-US/translations.json
index 44be5d87..9ff6b536 100644
--- a/translations/locales/en-US/translations.json
+++ b/translations/locales/en-US/translations.json
@@ -307,5 +307,14 @@
"Or": "Or",
"AlreadyHave": "Already have an account?",
"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."
}
}
diff --git a/translations/locales/es-419/translations.json b/translations/locales/es-419/translations.json
index 2072032a..0217d46c 100644
--- a/translations/locales/es-419/translations.json
+++ b/translations/locales/es-419/translations.json
@@ -307,5 +307,13 @@
"Or": "o",
"AlreadyHave": "¿Ya tienes cuenta? ",
"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."
}
}