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:
ErickSkrauch
2020-06-04 19:41:27 +03:00
parent 57cf6b3776
commit bf6a76d006
107 changed files with 1122 additions and 972 deletions

View File

@@ -0,0 +1,56 @@
import React from 'react';
import { defineMessages, FormattedMessage as Message } from 'react-intl';
import { Button, Input, Form, FormModel } from 'app/components/ui/form';
import styles from 'app/components/profile/profileForm.scss';
import mfaStyles from './mfa.scss';
const messages = defineMessages({
codePlaceholder: 'Enter the code here',
disable: 'Disable',
});
export default class MfaDisableForm extends React.Component<{
onSubmit: (form: FormModel) => Promise<void>;
}> {
form: FormModel = new FormModel();
render() {
const { form } = this;
const { onSubmit } = this.props;
return (
<Form form={form} onSubmit={onSubmit}>
<div className={styles.formBody}>
<div className={styles.formRow}>
<p className={`${styles.description} ${mfaStyles.mfaTitle}`}>
<Message key="disableMfa" defaultMessage="Disable twofactor authentication" />
</p>
</div>
<div className={styles.formRow}>
<p className={styles.description}>
<Message
key="disableMfaInstruction"
defaultMessage="In order to disable twofactor authentication, you need to provide a code from your mobile app and confirm your action with your current account password."
/>
</p>
</div>
<div className={styles.formRow}>
<Input
{...form.bindField('totp')}
required
autoFocus
autoComplete="off"
skin="light"
placeholder={messages.codePlaceholder}
/>
</div>
</div>
<Button type="submit" color="green" block label={messages.disable} />
</Form>
);
}
}