reuse "application settings" intl message

pull/570/head
slowbackspace 5 years ago
parent b65feeea9b
commit 9e66d1bec3

@ -7,6 +7,7 @@ import React, { PureComponent } from 'react';
import { Link, colors, icons as ICONS } from 'trezor-ui-components'; import { Link, colors, icons as ICONS } from 'trezor-ui-components';
import { NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import l10nCommonMessages from 'views/common.messages';
import Divider from '../Divider'; import Divider from '../Divider';
import RowCoin from '../RowCoin'; import RowCoin from '../RowCoin';
@ -102,7 +103,9 @@ class CoinMenu extends PureComponent<Props> {
values={{ values={{
TR_SELECT_COINS_LINK: ( TR_SELECT_COINS_LINK: (
<StyledLinkEmpty to="/settings"> <StyledLinkEmpty to="/settings">
<FormattedMessage {...l10nMessages.TR_SELECT_COINS_LINK} /> <FormattedMessage
{...l10nCommonMessages.TR_SELECT_COINS_LINK}
/>
</StyledLinkEmpty> </StyledLinkEmpty>
), ),
}} }}

@ -12,10 +12,6 @@ const definedMessages: Messages = defineMessages({
description: 'COMPLETE SENTENCE: Select a coin in application settings', description: 'COMPLETE SENTENCE: Select a coin in application settings',
defaultMessage: 'Select a coin in {TR_SELECT_COINS_LINK}', defaultMessage: 'Select a coin in {TR_SELECT_COINS_LINK}',
}, },
TR_SELECT_COINS_LINK: {
id: 'TR_SELECT_COINS_LINK',
defaultMessage: 'application settings',
},
}); });
export default definedMessages; export default definedMessages;

@ -6,6 +6,7 @@ import { NavLink } from 'react-router-dom';
import { CoinLogo, H4, P, Link } from 'trezor-ui-components'; import { CoinLogo, H4, P, Link } from 'trezor-ui-components';
import coins from 'constants/coins'; import coins from 'constants/coins';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import l10nCommonMessages from 'views/common.messages';
import l10nMessages from './index.messages'; import l10nMessages from './index.messages';
import type { Props } from './Container'; import type { Props } from './Container';
@ -94,10 +95,10 @@ const Dashboard = (props: Props) => {
<FormattedMessage <FormattedMessage
{...l10nMessages.TR_PLEASE_SELECT_YOUR_EMPTY} {...l10nMessages.TR_PLEASE_SELECT_YOUR_EMPTY}
values={{ values={{
TR_PLEASE_SELECT_YOUR_EMPTY_LINK: ( TR_SELECT_COINS_LINK: (
<StyledLinkEmpty to="/settings"> <StyledLinkEmpty to="/settings">
<FormattedMessage <FormattedMessage
{...l10nMessages.TR_PLEASE_SELECT_YOUR_EMPTY_LINK} {...l10nCommonMessages.TR_SELECT_COINS_LINK}
/> />
</StyledLinkEmpty> </StyledLinkEmpty>
), ),

@ -10,12 +10,7 @@ const definedMessages: Messages = defineMessages({
}, },
TR_PLEASE_SELECT_YOUR_EMPTY: { TR_PLEASE_SELECT_YOUR_EMPTY: {
id: 'TR_PLEASE_SELECT_YOUR_EMPTY', id: 'TR_PLEASE_SELECT_YOUR_EMPTY',
defaultMessage: 'Please select your coin in {TR_PLEASE_SELECT_YOUR_EMPTY_LINK}', defaultMessage: 'Please select your coin in {TR_SELECT_COINS_LINK}',
description: 'Title of the dashboard component if coin was not selected',
},
TR_PLEASE_SELECT_YOUR_EMPTY_LINK: {
id: 'TR_PLEASE_SELECT_YOUR_EMPTY_LINK',
defaultMessage: 'application settings',
description: 'Title of the dashboard component if coin was not selected', description: 'Title of the dashboard component if coin was not selected',
}, },
TR_YOU_WILL_GAIN_ACCESS: { TR_YOU_WILL_GAIN_ACCESS: {

@ -11,6 +11,10 @@ const definedMessages: Messages = defineMessages({
id: 'TR_APPLICATION_SETTINGS', id: 'TR_APPLICATION_SETTINGS',
defaultMessage: 'Application settings', defaultMessage: 'Application settings',
}, },
TR_SELECT_COINS_LINK: {
id: 'TR_SELECT_COINS_LINK',
defaultMessage: 'application settings',
},
TR_ACCOUNT_HASH: { TR_ACCOUNT_HASH: {
id: 'TR_ACCOUNT_HASH', id: 'TR_ACCOUNT_HASH',
defaultMessage: 'Account #{number}', defaultMessage: 'Account #{number}',

Loading…
Cancel
Save