More i18n work
This commit is contained in:
parent
2ad4972115
commit
fffeb2a17a
13 changed files with 85 additions and 27 deletions
|
|
@ -16,7 +16,7 @@ const Footer = (props) => {
|
|||
return (
|
||||
<div className="Footer">
|
||||
<Grid>
|
||||
<p className="pull-left"><span className="reverse">©</span><span className="d-none d-md-inline"> Copyleft</span> {copyrightYear()} <a href="https://comunes.org/"><span className="d-none d-md-inline">{t('OrgNameFull')}</span><span className="d-inline d-md-none">{t('OrgName')}</span></a></p>
|
||||
<p className="pull-left"><span className="reverse">©</span><span className="d-none d-md-inline"> Copyleft</span> {copyrightYear()} <a href="https://comunes.org/"><span className="d-none d-md-inline">{t('OrgName')}</span><span className="d-inline d-md-none">{t('OrgName')}</span></a></p>
|
||||
|
||||
<ul className="pull-right">
|
||||
<li><Link to="/terms"> {t('Términos')}<span className="d-none d-md-inline"> {t('de Servicio')}</span></Link></li>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const Navigation = props => (
|
|||
<Navbar.Header>
|
||||
{window.location.pathname != '/'?
|
||||
<Navbar.Brand>
|
||||
<Link to="/">{props.t('Inicio')}</Link>
|
||||
<Link to="/">{props.t('AppNameFull')}</Link>
|
||||
</Navbar.Brand>: ''
|
||||
}
|
||||
{/* <Navbar.Toggle/> */}
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ a.nav-link:hover {
|
|||
}
|
||||
|
||||
.navbar {
|
||||
padding: 0.3rem 1rem;
|
||||
padding: 0.3rem 0rem;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
.EmailMessage {
|
||||
display: inline-block;
|
||||
background: #fff;
|
||||
background: #fff; /* default */
|
||||
background: lighten($todos-palette5, 70%);
|
||||
padding: 0 10px;
|
||||
position: absolute;
|
||||
bottom: -27px;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class Login extends React.Component {
|
|||
|
||||
render() {
|
||||
return (<div className="Login">
|
||||
<Row>
|
||||
<Row className="align-items-center justify-content-center">
|
||||
<Col xs={12} sm={6} md={5} lg={4}>
|
||||
<h4 className="page-header">{this.t("Iniciar sesión")}</h4>
|
||||
<Row>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class RecoverPassword extends React.Component {
|
|||
|
||||
render() {
|
||||
return (<div className="RecoverPassword">
|
||||
<Row>
|
||||
<Row className="align-items-center justify-content-center">
|
||||
<Col xs={12} sm={6} md={5} lg={4}>
|
||||
<h4 className="page-header">{this.t("Recupera tu contraseña")}</h4>
|
||||
<Alert bsStyle="info">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ import Col from '../../components/Col/Col';
|
|||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import validate from '../../../modules/validate';
|
||||
import { translate } from 'react-i18next';
|
||||
|
||||
class ResetPassword extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.t = props.t;
|
||||
this.handleSubmit = this.handleSubmit.bind(this);
|
||||
}
|
||||
|
||||
|
|
@ -29,12 +31,13 @@ class ResetPassword extends React.Component {
|
|||
},
|
||||
messages: {
|
||||
newPassword: {
|
||||
required: 'Enter a new password, please.',
|
||||
minlength: 'Use at least six characters, please.',
|
||||
required: this.t("Introduce una nueva contraseña, por favor."),
|
||||
minlength: this.t("Usa al menos seis caracteres."),
|
||||
},
|
||||
repeatNewPassword: {
|
||||
required: 'Repeat your new password, please.',
|
||||
equalTo: 'Hmm, your passwords don\'t match. Try again?',
|
||||
required: this.t("Repite tu nueva contraseña, por favor."),
|
||||
equalTo: this.t("Mmmm, tus contraseñas no coinciden. ¿Inténtalo otra vez?"),
|
||||
minlength: this.t("Usa al menos seis caracteres."),
|
||||
},
|
||||
},
|
||||
submitHandler() { component.handleSubmit(); },
|
||||
|
|
@ -56,35 +59,34 @@ class ResetPassword extends React.Component {
|
|||
|
||||
render() {
|
||||
return (<div className="ResetPassword">
|
||||
<Row>
|
||||
<Row className="align-items-center justify-content-center">
|
||||
<Col xs={12} sm={6} md={4}>
|
||||
<h4 className="page-header">Reset Password</h4>
|
||||
<h4 className="page-header">{this.t("Resetea tu contraseña")}</h4>
|
||||
<Alert bsStyle="info">
|
||||
To reset your password, enter a new one below. You will be logged in
|
||||
with your new password.
|
||||
{ this.t("Para resetear tu contraseña, introduce una nueva debajo. Iniciarás la sesión con la nueva contraseña.") }
|
||||
</Alert>
|
||||
<form ref={form => (this.form = form)} onSubmit={event => event.preventDefault()}>
|
||||
<FormGroup>
|
||||
<ControlLabel>New Password</ControlLabel>
|
||||
<ControlLabel>{this.t("Nueva contraseña")}</ControlLabel>
|
||||
<input
|
||||
type="password"
|
||||
className="form-control"
|
||||
ref={newPassword => (this.newPassword = newPassword)}
|
||||
name="newPassword"
|
||||
placeholder="New Password"
|
||||
placeholder={this.t("Nueva contraseña")}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<ControlLabel>Repeat New Password</ControlLabel>
|
||||
<ControlLabel>{this.t("Repite la nueva contraseña")}</ControlLabel>
|
||||
<input
|
||||
type="password"
|
||||
className="form-control"
|
||||
ref={repeatNewPassword => (this.repeatNewPassword = repeatNewPassword)}
|
||||
name="repeatNewPassword"
|
||||
placeholder="Repeat New Password"
|
||||
placeholder={this.t("Repite la nueva contraseña")}
|
||||
/>
|
||||
</FormGroup>
|
||||
<Button type="submit" bsStyle="success">Reset Password & Login</Button>
|
||||
<Button type="submit" bsStyle="success">{this.t("Resetea la contraseña y entra")}</Button>
|
||||
</form>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
@ -97,4 +99,4 @@ ResetPassword.propTypes = {
|
|||
history: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default ResetPassword;
|
||||
export default translate([], { wait: true })(ResetPassword);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class Signup extends React.Component {
|
|||
|
||||
render() {
|
||||
return (<div className="Signup">
|
||||
<Row>
|
||||
<Row className="align-items-center justify-content-center">
|
||||
<Col xs={12} sm={6} md={5} lg={4}>
|
||||
<h4 className="page-header">{this.t("Registrarse")}</h4>
|
||||
<Row>
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@ import { Alert } from 'react-bootstrap';
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { translate } from 'react-i18next';
|
||||
|
||||
class VerifyEmail extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.t = props.t;
|
||||
this.state = { error: null };
|
||||
}
|
||||
|
||||
|
|
@ -16,10 +18,11 @@ class VerifyEmail extends React.Component {
|
|||
Accounts.verifyEmail(match.params.token, (error) => {
|
||||
if (error) {
|
||||
Bert.alert(error.reason, 'danger');
|
||||
this.setState({ error: `${error.reason}. Please try again.` });
|
||||
this.setState({ error: error.reason + ". " + this.t("Por favor, inténtalo otra vez.")});
|
||||
// this.setState({ error: `${error.reason}. Please try again.` });
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
Bert.alert('All set, thanks!', 'success');
|
||||
Bert.alert(this.t("¡Listo, gracias!"), 'success');
|
||||
history.push('/documents');
|
||||
}, 1500);
|
||||
}
|
||||
|
|
@ -29,7 +32,7 @@ class VerifyEmail extends React.Component {
|
|||
render() {
|
||||
return (<div className="VerifyEmail">
|
||||
<Alert bsStyle={!this.state.error ? 'info' : 'danger'}>
|
||||
{!this.state.error ? 'Verifying...' : this.state.error}
|
||||
{!this.state.error ? this.t('Verificando...') : this.state.error}
|
||||
</Alert>
|
||||
</div>);
|
||||
}
|
||||
|
|
@ -40,4 +43,4 @@ VerifyEmail.propTypes = {
|
|||
history: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default VerifyEmail;
|
||||
export default translate([], { wait: true })(VerifyEmail);
|
||||
|
|
|
|||
|
|
@ -9,3 +9,7 @@
|
|||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: lighten($todos-palette5, 70%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,3 +5,7 @@ a, a:hover {
|
|||
.bg-dark {
|
||||
background-color: $todos-palette1 !important;
|
||||
}
|
||||
|
||||
h4.page-header {
|
||||
line-height: 2em;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue