1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-09 15:40:55 +00:00

localized beta disclaimer

This commit is contained in:
slowbackspace 2019-02-14 18:06:22 +01:00
parent 9426d7dbac
commit afa1a53bd1
2 changed files with 63 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import React from 'react';
import styled from 'styled-components'; import styled from 'styled-components';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import { FormattedMessage } from 'react-intl';
import colors from 'config/colors'; import colors from 'config/colors';
import icons from 'config/icons'; import icons from 'config/icons';
@ -14,6 +15,7 @@ import Button from 'components/Button';
import P from 'components/Paragraph'; import P from 'components/Paragraph';
import { H2 } from 'components/Heading'; import { H2 } from 'components/Heading';
import * as WalletActions from 'actions/WalletActions'; import * as WalletActions from 'actions/WalletActions';
import l10nMessages from './index.messages';
const Wrapper = styled.div` const Wrapper = styled.div`
width: 100%; width: 100%;
@ -57,18 +59,38 @@ const StyledIcon = styled(Icon)`
const BetaDisclaimer = (props: { close: () => void }) => ( const BetaDisclaimer = (props: { close: () => void }) => (
<Wrapper> <Wrapper>
<ModalWindow> <ModalWindow>
<H2>You are opening Trezor Beta Wallet</H2> <H2><FormattedMessage {...l10nMessages.TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET} /></H2>
<StyledP><i>Trezor Beta Wallet</i> is a public feature-testing version of the <i>Trezor Wallet</i>, offering the newest features before they are available to the general public.</StyledP> <StyledP><FormattedMessage
<StyledP>In contrast, <i>Trezor Wallet</i> is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.</StyledP> {...l10nMessages.TR_TREZOR_BETA_WALLET_IS}
values={{
trezorWallet: <i><FormattedMessage {...l10nMessages.TR_TREZOR_WALLET} /></i>,
trezorBetaWallet: <i><FormattedMessage {...l10nMessages.TR_TREZOR_BETA_WALLET} /></i>,
}}
/>
</StyledP>
<StyledP><FormattedMessage
{...l10nMessages.TR_IN_CONTRAST_COMMA_TREZOR}
values={{
trezorWallet: <i><FormattedMessage {...l10nMessages.TR_TREZOR_WALLET} /></i>,
trezorBetaWallet: <i><FormattedMessage {...l10nMessages.TR_TREZOR_BETA_WALLET} /></i>,
}}
/>
</StyledP>
<StyledP> <StyledP>
<StyledIcon <StyledIcon
size={24} size={24}
color={colors.WARNING_PRIMARY} color={colors.WARNING_PRIMARY}
icon={icons.WARNING} icon={icons.WARNING}
/> />
Please note that the <i>Trezor Beta Wallet</i> might be collecting anonymized usage data, especially error logs, for development purposes. The <i>Trezor Wallet</i> does not log any data. <FormattedMessage
{...l10nMessages.TR_PLEASE_NOTE_THAT_THE_TREZOR}
values={{
trezorWallet: <i><FormattedMessage {...l10nMessages.TR_TREZOR_WALLET} /></i>,
trezorBetaWallet: <i><FormattedMessage {...l10nMessages.TR_TREZOR_BETA_WALLET} /></i>,
}}
/>
</StyledP> </StyledP>
<StyledButton dataTest="Modal__disclaimer__button__confirm" onClick={props.close}>OK, I understand</StyledButton> <StyledButton dataTest="Modal__disclaimer__button__confirm" onClick={props.close}><FormattedMessage {...l10nMessages.TR_OK_COMMA_I_UNDERSTAND} /></StyledButton>
</ModalWindow> </ModalWindow>
</Wrapper> </Wrapper>
); );

View File

@ -0,0 +1,36 @@
/* @flow */
import { defineMessages } from 'react-intl';
import type { Messages } from 'flowtype/npm/react-intl';
const definedMessages: Messages = defineMessages({
TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET: {
id: 'TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET',
defaultMessage: 'You are opening Trezor Beta Wallet',
},
TR_TREZOR_BETA_WALLET_IS: {
id: 'TR_TREZOR_BETA_WALLET_IS',
defaultMessage: '{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.',
},
TR_IN_CONTRAST_COMMA_TREZOR: {
id: 'TR_IN_CONTRAST_COMMA_TREZOR',
defaultMessage: 'In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.',
},
TR_PLEASE_NOTE_THAT_THE_TREZOR: {
id: 'TR_PLEASE_NOTE_THAT_THE_TREZOR',
defaultMessage: 'Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.',
},
TR_OK_COMMA_I_UNDERSTAND: {
id: 'TR_OK_COMMA_I_UNDERSTAND',
defaultMessage: 'OK, I understand',
},
TR_TREZOR_WALLET: {
id: 'TR_TREZOR_WALLET',
defaultMessage: 'Trezor Wallet',
},
TR_TREZOR_BETA_WALLET: {
id: 'TR_TREZOR_BETA_WALLET',
defaultMessage: 'Trezor Beta Wallet',
},
});
export default definedMessages;