mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Remove all *.intl.json files. Move strings to the corresponding views. Implement custom command to build i18n/en.json file
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"title": "Forgot password",
|
||||
"sendMail": "Send mail",
|
||||
"specifyEmail": "Specify the registration E‑mail address or last used username for your account and we will send an E‑mail with instructions for further password recovery.",
|
||||
"pleasePressButton": "Please press the button bellow to get an E‑mail with password recovery code.",
|
||||
"alreadyHaveCode": "Already have a code"
|
||||
}
|
@@ -1,7 +1,13 @@
|
||||
import { defineMessages } from 'react-intl';
|
||||
import factory from '../factory';
|
||||
import messages from './ForgotPassword.intl.json';
|
||||
import Body from './ForgotPasswordBody';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: 'Forgot password',
|
||||
sendMail: 'Send mail',
|
||||
alreadyHaveCode: 'Already have a code',
|
||||
});
|
||||
|
||||
export default factory({
|
||||
title: messages.title,
|
||||
body: Body,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
import { defineMessages, FormattedMessage as Message } from 'react-intl';
|
||||
|
||||
import { Input, Captcha } from 'app/components/ui/form';
|
||||
import { getLogin } from 'app/components/auth/reducer';
|
||||
@@ -8,7 +8,10 @@ import { PanelIcon } from 'app/components/ui/Panel';
|
||||
import BaseAuthBody from 'app/components/auth/BaseAuthBody';
|
||||
|
||||
import styles from './forgotPassword.scss';
|
||||
import messages from './ForgotPassword.intl.json';
|
||||
|
||||
const messages = defineMessages({
|
||||
emailOrUsername: 'E‑mail or username',
|
||||
});
|
||||
|
||||
export default class ForgotPasswordBody extends BaseAuthBody {
|
||||
static displayName = 'ForgotPasswordBody';
|
||||
@@ -36,14 +39,17 @@ export default class ForgotPasswordBody extends BaseAuthBody {
|
||||
{isLoginEditShown ? (
|
||||
<div>
|
||||
<p className={styles.descriptionText}>
|
||||
<Message {...messages.specifyEmail} />
|
||||
<Message
|
||||
key="specifyEmail"
|
||||
defaultMessage="Specify the registration E‑mail address or last used username for your account and we will send an E‑mail with instructions for further password recovery."
|
||||
/>
|
||||
</p>
|
||||
<Input
|
||||
{...this.bindField('login')}
|
||||
icon="envelope"
|
||||
color="lightViolet"
|
||||
required
|
||||
placeholder={messages.accountEmail}
|
||||
placeholder={messages.emailOrUsername}
|
||||
defaultValue={login}
|
||||
/>
|
||||
</div>
|
||||
@@ -54,7 +60,10 @@ export default class ForgotPasswordBody extends BaseAuthBody {
|
||||
<span className={styles.editLogin} onClick={this.onClickEdit} data-testid="edit-login" />
|
||||
</div>
|
||||
<p className={styles.descriptionText}>
|
||||
<Message {...messages.pleasePressButton} />
|
||||
<Message
|
||||
key="pleasePressButton"
|
||||
defaultMessage="Please press the button bellow to get an E‑mail with password recovery code."
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user