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 @@
|
||||
{
|
||||
"chooseAccountTitle": "Choose an account",
|
||||
"addAccount": "Log into another account",
|
||||
"logoutAll": "Log out from all accounts",
|
||||
"pleaseChooseAccount": "Please select an account you're willing to use",
|
||||
"pleaseChooseAccountForApp": "Please select an account that you want to use to authorize {appName}"
|
||||
}
|
||||
@@ -1,7 +1,13 @@
|
||||
import { defineMessages } from 'react-intl';
|
||||
import factory from '../factory';
|
||||
import messages from './ChooseAccount.intl.json';
|
||||
import Body from './ChooseAccountBody';
|
||||
|
||||
const messages = defineMessages({
|
||||
chooseAccountTitle: 'Choose an account',
|
||||
addAccount: 'Log into another account',
|
||||
logoutAll: 'Log out from all accounts',
|
||||
});
|
||||
|
||||
export default factory({
|
||||
title: messages.chooseAccountTitle,
|
||||
body: Body,
|
||||
|
||||
@@ -7,7 +7,6 @@ import { AccountSwitcher } from 'app/components/accounts';
|
||||
import { Account } from 'app/components/accounts/reducer';
|
||||
|
||||
import styles from './chooseAccount.scss';
|
||||
import messages from './ChooseAccount.intl.json';
|
||||
|
||||
export default class ChooseAccountBody extends BaseAuthBody {
|
||||
static displayName = 'ChooseAccountBody';
|
||||
@@ -23,14 +22,18 @@ export default class ChooseAccountBody extends BaseAuthBody {
|
||||
<div className={styles.description}>
|
||||
{client ? (
|
||||
<Message
|
||||
{...messages.pleaseChooseAccountForApp}
|
||||
key="pleaseChooseAccountForApp"
|
||||
defaultMessage="Please select an account that you want to use to authorize {appName}"
|
||||
values={{
|
||||
appName: <span className={styles.appName}>{client.name}</span>,
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<div className={styles.description}>
|
||||
<Message {...messages.pleaseChooseAccount} />
|
||||
<Message
|
||||
key="pleaseChooseAccount"
|
||||
defaultMessage="Please select an account you're willing to use"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user