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

@@ -7,12 +7,12 @@ import { ScrollIntoView } from 'app/components/ui/scroll';
import logger from 'app/services/logger';
import { getSecret, enable as enableMFA } from 'app/services/api/mfa';
import { Form } from 'app/components/ui/form';
import { defineMessages } from 'react-intl';
import Context from '../Context';
import Instructions from './instructions';
import KeyForm from './keyForm';
import Confirmation from './confirmation';
import messages from './MultiFactorAuth.intl.json';
const STEPS_TOTAL = 3;
@@ -25,6 +25,12 @@ type Props = {
step: MfaStep;
};
const labels = defineMessages({
theAppIsInstalled: 'App has been installed',
ready: 'Ready',
enable: 'Enable',
});
interface State {
isLoading: boolean;
activeStep: MfaStep;
@@ -73,15 +79,15 @@ export default class MfaEnable extends React.PureComponent<Props, State> {
const stepsData = [
{
buttonLabel: messages.theAppIsInstalled,
buttonLabel: labels.theAppIsInstalled,
buttonAction: () => this.nextStep(),
},
{
buttonLabel: messages.ready,
buttonLabel: labels.ready,
buttonAction: () => this.nextStep(),
},
{
buttonLabel: messages.enable,
buttonLabel: labels.enable,
buttonAction: () => this.confirmationFormEl && this.confirmationFormEl.submit(),
},
];