add missing messages

pull/481/head
slowbackspace 5 years ago
parent 190b574d06
commit 64f257cade

@ -3,10 +3,11 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { FormattedMessage } from 'react-intl';
import { getOldWalletUrl } from 'utils/url';
import { H5, P, Icon, Button, Link, colors, icons } from 'trezor-ui-components';
import l10nCommonMessages from 'views/common.messages';
import type { TrezorDevice } from 'flowtype';
import type { Props as BaseProps } from '../../Container';
@ -66,20 +67,21 @@ const Confirmation = (props: Props) => (
<StyledLink onClick={() => props.onReceiveConfirmation(false)}>
<Icon size={12} color={colors.TEXT_SECONDARY} icon={icons.CLOSE} />
</StyledLink>
<H5>Your Trezor is not backed up</H5>
<H5>
<FormattedMessage {...l10nCommonMessages.TR_YOUR_TREZOR_IS_NOT_BACKED_UP} />
</H5>
<Icon size={32} color={colors.WARNING_PRIMARY} icon={icons.WARNING} />
<StyledP size="small">
If your device is ever lost or damaged, your funds will be lost. Backup your device
first, to protect your coins against such events.
<FormattedMessage {...l10nCommonMessages.TR_IF_YOUR_DEVICE_IS_EVER_LOST} />
</StyledP>
<Row>
<Link href={`${getOldWalletUrl(props.device)}/?backup`} target="_self">
<BackupButton onClick={() => props.onReceiveConfirmation(false)}>
Create a backup in 3 minutes
<FormattedMessage {...l10nCommonMessages.TR_CREATE_BACKUP_IN_3_MINUTES} />
</BackupButton>
</Link>
<ProceedButton isWhite onClick={() => props.onReceiveConfirmation(true)}>
Show address, I will take the risk
<FormattedMessage {...l10nCommonMessages.TR_SHOW_ADDRESS_I_WILL_TAKE_THE_RISK} />
</ProceedButton>
</Row>
</Wrapper>

@ -7,6 +7,7 @@ import { FormattedMessage } from 'react-intl';
import { Link, Button, Icon, P, H5, colors, icons } from 'trezor-ui-components';
import type { TrezorDevice } from 'flowtype';
import l10nCommonMessages from 'views/common.messages';
import l10nMessages from './index.messages';
import type { Props as BaseProps } from '../../Container';
@ -169,16 +170,26 @@ class ConfirmUnverifiedAddress extends PureComponent<Props> {
{needsBackup && (
<>
<Content>
<H5>Device {device.label} is not backed up</H5>
<H5>
<FormattedMessage
{...l10nMessages.TR_DEVICE_LABEL_IS_NOT_BACKED_UP}
values={{ deviceLabel: device.label }}
/>
</H5>
<StyledP size="small">
If your device is ever lost or damaged, your funds will be lost.
Backup your device first, to protect your coins against such events.
<FormattedMessage
{...l10nCommonMessages.TR_IF_YOUR_DEVICE_IS_EVER_LOST}
/>
</StyledP>
</Content>
<Content>
<Row>
<Link href={`${getOldWalletUrl(device)}/?backup`}>
<BackupButton>Create a backup in 3 minutes</BackupButton>
<BackupButton>
<FormattedMessage
{...l10nCommonMessages.TR_CREATE_BACKUP_IN_3_MINUTES}
/>
</BackupButton>
</Link>
</Row>
</Content>

@ -7,6 +7,10 @@ const definedMessages: Messages = defineMessages({
id: 'TR_DEVICE_LABEL_IS_NOT_CONNECTED',
defaultMessage: 'Device {deviceLabel} is not connected',
},
TR_DEVICE_LABEL_IS_NOT_BACKED_UP: {
id: 'TR_DEVICE_LABEL_IS_NOT_BACKED_UP',
defaultMessage: 'Device {deviceLabel} is not backed up',
},
TR_DEVICE_LABEL_IS_UNAVAILABLE: {
id: 'TR_DEVICE_LABEL_IS_UNAVAILABLE',
defaultMessage: 'Device {deviceLabel} is unavailable',

@ -6,8 +6,11 @@ import styled from 'styled-components';
import { Button, H5, Link, P, Icon, icons, colors } from 'trezor-ui-components';
import coins from 'constants/coins';
import { FormattedMessage } from 'react-intl';
import TezosImage from './images/xtz.png';
import type { Props as BaseProps } from '../../Container';
import l10nCommonMessages from '../common.messages';
import l10nMessages from './index.messages';
type Props = {
onCancel: $ElementType<$ElementType<BaseProps, 'modalActions'>, 'onCancel'>,
@ -44,11 +47,17 @@ const TezosWallet = (props: Props) => (
<Icon size={12} color={colors.TEXT_SECONDARY} icon={icons.CLOSE} />
</StyledLink>
<Img src={TezosImage} />
<H5>Tezos wallet</H5>
<P isSmaller>You will be redirected to external wallet</P>
<H5>
<FormattedMessage {...l10nMessages.TR_TEZOS_WALLET} />
</H5>
<P size="small">
<FormattedMessage {...l10nCommonMessages.TR_YOU_WILL_BE_REDIRECTED_TO_EXTERNAL} />
</P>
<Link href={coins.find(i => i.id === 'xtz').url}>
<StyledButton onClick={props.onCancel}>Go to external wallet</StyledButton>
<StyledButton onClick={props.onCancel}>
<FormattedMessage {...l10nCommonMessages.TR_GO_TO_EXTERNAL_WALLET} />
</StyledButton>
</Link>
</Wrapper>
);

@ -0,0 +1,12 @@
/* @flow */
import { defineMessages } from 'react-intl';
import type { Messages } from 'flowtype/npm/react-intl';
const definedMessages: Messages = defineMessages({
TR_TEZOS_WALLET: {
id: 'TR_TEZOS_WALLET',
defaultMessage: 'Tezos wallet',
},
});
export default definedMessages;

@ -1,7 +1,8 @@
/* @flow */
import * as React from 'react';
import { Notification } from 'trezor-ui-components';
import { FormattedMessage } from 'react-intl';
import l10nCommonMessages from 'views/common.messages';
import type { Props } from '../../index';
export default (props: Props) => {
@ -13,11 +14,13 @@ export default (props: Props) => {
<Notification
key="no-backup"
type="warning"
title="Your Trezor is not backed up!"
message="If your device is ever lost or damaged, your funds will be lost. Backup your device first, to protect your coins against such events."
title={<FormattedMessage {...l10nCommonMessages.TR_YOUR_TREZOR_IS_NOT_BACKED_UP} />}
message={<FormattedMessage {...l10nCommonMessages.TR_IF_YOUR_DEVICE_IS_EVER_LOST} />}
actions={[
{
label: 'Create a backup',
label: (
<FormattedMessage {...l10nCommonMessages.TR_CREATE_BACKUP_IN_3_MINUTES} />
),
callback: props.routerActions.gotoBackup,
},
]}

@ -150,7 +150,12 @@ class ConnectDevice extends PureComponent<Props> {
<Wrapper>
<ConnectTrezorWrapper>
{this.props.showDisconnect && `Unplug "${this.props.deviceLabel}" device`}
{this.props.showDisconnect && (
<FormattedMessage
{...l10nMessages.TR_UNPLUG_DEVICE_LABEL}
values={{ deviceLabel: this.props.deviceLabel }}
/>
)}
{!this.props.showDisconnect && (
<React.Fragment>
{this.getTrezorDeviceImage()}

@ -33,6 +33,10 @@ const definedMessages: Messages = defineMessages({
description: 'Part of the sentence: Dont have a Trezor? Get one',
defaultMessage: 'Get one',
},
TR_UNPLUG_DEVICE_LABEL: {
id: 'TR_UNPLUG_DEVICE_LABEL',
defaultMessage: 'Unplug "{deviceLabel}" device',
},
});
export default definedMessages;

@ -141,7 +141,7 @@ class AccountBalance extends PureComponent<Props, State> {
<Tooltip
maxWidth={285}
placement="top"
content="Fiat rates are not currently available."
content={<FormattedMessage {...l10nMessages.TR_FIAT_RATES_ARE_NOT_CURRENTLY} />}
>
<StyledIcon icon={ICONS.HELP} color={colors.TEXT_SECONDARY} size={12} />
</Tooltip>

@ -16,6 +16,10 @@ const definedMessages: Messages = defineMessages({
defaultMessage: 'Reserve',
description: 'Label for minimal XRP account reserve',
},
TR_FIAT_RATES_ARE_NOT_CURRENTLY: {
id: 'TR_FIAT_RATES_ARE_NOT_CURRENTLY',
defaultMessage: 'Fiat rates are not currently available.',
},
});
export default definedMessages;

@ -3,8 +3,10 @@ import React from 'react';
import styled from 'styled-components';
import { Button, Icon, Link, P, H4, colors, icons } from 'trezor-ui-components';
import { getOldWalletUrl } from 'utils/url';
import { FormattedMessage } from 'react-intl';
import l10nCommonMessages from 'views/common.messages';
import type { TrezorDevice } from 'flowtype';
import l10nMessages from './index.messages';
type Props = {
device: ?TrezorDevice,
@ -40,24 +42,29 @@ const StyledIcon = styled(Icon)`
margin-bottom: 15px;
`;
const FirmwareUpdate = (props: Props) => (
const NoBackup = (props: Props) => (
<Wrapper>
<StyledIcon size={64} color={colors.WARNING_PRIMARY} icon={icons.WARNING} />
<StyledH>Your Trezor is not backed up!</StyledH>
<StyledH>
<FormattedMessage {...l10nCommonMessages.TR_YOUR_TREZOR_IS_NOT_BACKED_UP} />
</StyledH>
<Message>
<StyledP>
If your device is ever lost or damaged, your funds will be lost. Backup your device
first, to protect your coins against such events.
<FormattedMessage {...l10nCommonMessages.TR_IF_YOUR_DEVICE_IS_EVER_LOST} />
</StyledP>
<P>Please use Bitcoin wallet interface to create a backup.</P>
<P>
<FormattedMessage {...l10nMessages.TR_PLEASE_USE_TO_CREATE_BACKUP} />
</P>
</Message>
<Link href={`${getOldWalletUrl(props.device)}?backup=1`} target="_self">
<Button>Take me to the Bitcoin wallet</Button>
<Button>
<FormattedMessage {...l10nCommonMessages.TR_TAKE_ME_TO_BITCOIN_WALLET} />
</Button>
</Link>
<StyledNavLink isGray to="/">
Ill do that later.
<FormattedMessage {...l10nCommonMessages.TR_I_WILL_DO_THAT_LATER} />
</StyledNavLink>
</Wrapper>
);
export default FirmwareUpdate;
export default NoBackup;

@ -0,0 +1,12 @@
/* @flow */
import { defineMessages } from 'react-intl';
import type { Messages } from 'flowtype/npm/react-intl';
const definedMessages: Messages = defineMessages({
TR_PLEASE_USE_TO_CREATE_BACKUP: {
id: 'TR_PLEASE_USE_TO_CREATE_BACKUP',
defaultMessage: 'Please use Bitcoin wallet interface to create a backup.',
},
});
export default definedMessages;

@ -78,6 +78,23 @@ const definedMessages: Messages = defineMessages({
id: 'TR_THE_ACCOUNT_BALANCE_IS_HIDDEN',
defaultMessage: 'The account balance is hidden.',
},
TR_IF_YOUR_DEVICE_IS_EVER_LOST: {
id: 'TR_IF_YOUR_DEVICE_IS_EVER_LOST',
defaultMessage:
'If your device is ever lost or damaged, your funds will be lost. Backup your device first, to protect your coins against such events.',
},
TR_CREATE_BACKUP_IN_3_MINUTES: {
id: 'TR_CREATE_BACKUP_IN_3_MINUTES',
defaultMessage: 'Create a backup in 3 minutes',
},
TR_YOUR_TREZOR_IS_NOT_BACKED_UP: {
id: 'TR_YOUR_TREZOR_IS_NOT_BACKED_UP',
defaultMessage: 'Your Trezor is not backed up',
},
TR_SHOW_ADDRESS_I_WILL_TAKE_THE_RISK: {
id: 'TR_SHOW_ADDRESS_I_WILL_TAKE_THE_RISK',
defaultMessage: 'Show address, I will take the risk',
},
});
export default definedMessages;

Loading…
Cancel
Save