Skip to content

Commit

Permalink
fix(FormattedMessages) id fixes batch 3
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed May 23, 2018
1 parent 2dee353 commit fafd686
Show file tree
Hide file tree
Showing 20 changed files with 70 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class AcceptTerms extends Component {
{ email }
</Text>
<Link onClick={editEmail} size='14px' weight={300}>
<FormattedMessage id='sfoxexchangedata.create.createaccount.partner.edit' defaultMessage='edit' />
<FormattedMessage id='sfoxexchangedata.create.createaccount.partner.editemail' defaultMessage='edit' />
</Link>
</FieldBox>
<IconContainer>
Expand All @@ -145,7 +145,7 @@ class AcceptTerms extends Component {
{ smsNumber }
</Text>
<Link onClick={editMobile} size='14px' weight={300}>
<FormattedMessage id='sfoxexchangedata.create.createaccount.partner.edit' defaultMessage='edit' />
<FormattedMessage id='sfoxexchangedata.create.createaccount.partner.editmobile' defaultMessage='edit' />
</Link>
</FieldBox>
<IconContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class VerifyEmail extends Component {

let emailHelper = () => {
switch (true) {
case emailVerifiedError: return <FormattedMessage id='coinifyexchangedata.create.verifyemail.helper.error' defaultMessage="That code doesn't match. {resend} or {changeEmail}." values={{ resend: <a onClick={this.resendCode}>Resend</a>, changeEmail: <a onClick={() => this.props.updateUI({ create: 'change_email' })}>change email</a> }} />
case emailVerifiedError: return <FormattedMessage id='sfoxexchangedata.create.verifyemail.helper.error' defaultMessage="That code doesn't match. {resend} or {changeEmail}." values={{ resend: <a onClick={this.resendCode}>Resend</a>, changeEmail: <a onClick={() => this.props.updateUI({ create: 'change_email' })}>change email</a> }} />
case ui.codeSent: return <FormattedMessage id='sfoxexchangedata.create.verifyemail.helper.sentanothercode' defaultMessage='Another code has been sent! {changeEmail}' values={{ changeEmail: <a onClick={() => this.props.updateUI({ create: 'change_email' })}>change email</a> }} />
case !ui.codeSent: return <FormattedMessage id='sfoxexchangedata.create.verifyemail.helper.didntreceive' defaultMessage="Didn't receive your email? {resend} or {changeEmail}." values={{ resend: <a onClick={this.resendCode}>Resend</a>, changeEmail: <a onClick={() => this.props.updateUI({ create: 'change_email' })}>change email</a> }} />
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class VerifyMobile extends Component {

let smsHelper = () => {
switch (true) {
case mobileVerifiedError: return <FormattedMessage id='coinifyexchangedata.create.mobile.helper.error' defaultMessage="That code doesn't match. {resend} or {changeNumber}." values={{ resend: <a onClick={this.resendCode}>Resend</a>, changeNumber: <a onClick={() => this.props.updateUI({ create: 'change_mobile' })}>change number</a> }} />
case mobileVerifiedError: return <FormattedMessage id='sfoxexchangedata.create.mobile.helper.error' defaultMessage="That code doesn't match. {resend} or {changeNumber}." values={{ resend: <a onClick={this.resendCode}>Resend</a>, changeNumber: <a onClick={() => this.props.updateUI({ create: 'change_mobile' })}>change number</a> }} />
case ui.smsCodeResent: return <FormattedMessage id='sfoxexchangedata.create.mobile.helper.sentanothercode' defaultMessage='Another code has been sent!' />
case !ui.smsCodeResent: return <FormattedMessage id='sfoxexchangedata.create.mobile.helper.didntreceive' defaultMessage="Didn't get our text? {resend}." values={{ resend: <a onClick={this.resendCode}>Resend</a> }} />
}
Expand All @@ -80,12 +80,12 @@ class VerifyMobile extends Component {
</PartnerSubHeader>
<MobileInput>
<Text size='14px' weight={400} style={{'marginBottom': '5px'}}>
<FormattedMessage id='sfoxexchangedata.create.mobile.number' defaultMessage='Enter your digits here:' />
<FormattedMessage id='sfoxexchangedata.create.mobile.entermobilenumber' defaultMessage='Enter your digits here:' />
</Text>
<Field name='mobileNumber' defaultValue={this.props.smsNumber} component={PhoneNumberBox} validate={[required, validMobileNumber]} normalize={normalizePhone} />
{
ui.create === 'change_mobile' && <Button nature='primary' type='submit' disabled={!mobileNumber} style={spacing('mt-15')}>
<FormattedMessage id='sfoxexchangedata.create.mobile.number' defaultMessage='Send My Code' />
<FormattedMessage id='sfoxexchangedata.create.mobile.sendmycode' defaultMessage='Send My Code' />
</Button>
}
</MobileInput>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ const AwaitingDeposits = ({ showModal }) => {
<Container>
<LeftCol>
<Text size='30px' weight={600}>
<FormattedMessage id='awaiting_deposits.title' defaultMessage='Verify Your Bank Account' />
<FormattedMessage id='modals.sfoxexchangedata.link.awaitingdeposits.title' defaultMessage='Verify Your Bank Account' />
</Text>
<Image />
<Text size='13px' weight={300}>
<FormattedMessage id='awaiting_deposits.body' defaultMessage='To verify your bank details, SFOX will send two micro-deposits to your bank account for a few cents each. Once received, select Enter Deposit Details to finish setting up your account.' />
<FormattedMessage id='modals.sfoxexchangedata.link.awaitingdeposits.body' defaultMessage='To verify your bank details, SFOX will send two micro-deposits to your bank account for a few cents each. Once received, select Enter Deposit Details to finish setting up your account.' />
</Text>
<Text size='13px' weight={300}>
<FormattedMessage id='awaiting_deposits.note' defaultMessage='Bear with us: receiving these deposits can take up to 5 business days.' />
<FormattedMessage id='modals.sfoxexchangedata.link.awaitingdeposits.note' defaultMessage='Bear with us: receiving these deposits can take up to 5 business days.' />
</Text>
</LeftCol>
<RightCol>
<Button uppercase nature='primary' onClick={() => showModal('SfoxEnterMicroDeposits')}>
<FormattedMessage id='awaiting_deposits.enter' defaultMessage='Enter Deposit Details' />
<FormattedMessage id='modals.sfoxexchangedata.link.awaitingdeposits.enter' defaultMessage='Enter Deposit Details' />
</Button>
</RightCol>
</Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const BankLink = (props) => {
{
ui.toggleManual
? <GoBackLink onClick={toggleManual}>
<FormattedMessage id='go_back' defaultMessage='Go Back' />
<FormattedMessage id='sfoxexchangedata.link.goback' defaultMessage='Go Back' />
</GoBackLink>
: null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ class SfoxTradeDetails extends React.PureComponent {
{ bodyStatus.text }
</Text>
<Text style={spacing('pt-5')} size='13px' weight={300}>
<FormattedMessage id='order_details.trade_id' defaultMessage='Your order ID is: SFX-{id}' values={{ id: trade.id }} />
<FormattedMessage id='sfoxtradedetails.orderdetails.tradeid' defaultMessage='Your order ID is: SFX-{id}' values={{ id: trade.id }} />
</Text>
<Text style={spacing('mt-20')} size='14px' weight={400}>
{ trade.isBuy
? <FormattedMessage id='order_details.method' defaultMessage='Payment Method' />
: <FormattedMessage id='order_details.receiving_funds_into' defaultMessage='Receiving Funds Into' /> }
? <FormattedMessage id='sfoxtradedetails.orderdetails.method' defaultMessage='Payment Method' />
: <FormattedMessage id='sfoxtradedetails.orderdetails.receivingfundsinto' defaultMessage='Receiving Funds Into' /> }
</Text>
<MethodContainer borderDark style={spacing('mt-5')}>
<Icon name='bank-filled' size='30px' />
Expand All @@ -88,7 +88,7 @@ class SfoxTradeDetails extends React.PureComponent {
</OrderDetailsTable>
<ButtonRow>
<Button width='100px' onClick={this.props.close} nature='primary'>
<FormattedMessage id='close' defaultMessage='Close' />
<FormattedMessage id='sfoxtradedetails.close' defaultMessage='Close' />
</Button>
</ButtonRow>
</ModalBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ const DetailRowText = styled(Text)`
const FirstStep = () => (
<div>
<Text size='13px' color='error' weight={500} uppercase>
<FormattedMessage id='modals.show_priv.warning' defaultMessage='Warning' />
<FormattedMessage id='modals.showbtcpriv.warning' defaultMessage='Warning' />
</Text>
<Text size='14px' style={spacing('mt-10')} weight={300}>
<FormattedMessage id='modals.show_priv.warning_message' defaultMessage="Don't share your private key with anyone. This may result in a loss of funds." />
<FormattedMessage id='modals.showbtcpriv.warning.message' defaultMessage="Don't share your private key with anyone. This may result in a loss of funds." />
</Text>
</div>
)
Expand All @@ -43,21 +43,21 @@ const SecondStep = ({ addr, balance, priv, format, formats, onChangeFormat }) =>
<QRCodeReact value={priv} size={120} />
</div>
<DetailTable>
<DetailRow id='modals.show_priv.balance' defaultMessage='Balance'>
<DetailRow id='modals.showbtcpriv.balance' defaultMessage='Balance'>
<CoinDisplay coin='BTC' size='14px'>
{balance}
</CoinDisplay>
</DetailRow>
<DetailRow id='modals.show_priv.address' defaultMessage='Address'>
<DetailRow id='modals.showbtcpriv.address' defaultMessage='Address'>
<Text size='14px' weight={300}>{addr}</Text>
</DetailRow>
<DetailRow id='modals.show_priv.priv_key' defaultMessage='Private Key'>
<DetailRow id='modals.showbtcpriv.privatekey' defaultMessage='Private Key'>
{utils.bitcoin.formatPrivateKeyString(priv, format).fold(
error => (<Text size='14px' weight={300} color='error'>{error.message}</Text>),
keyString => (<Text size='14px' weight={300}>{keyString}</Text>)
)}
</DetailRow>
<DetailRow id='modals.show_priv.priv_key_format' defaultMessage='Private Key Format'>
<DetailRow id='modals.showbtcpriv.privatekeyformat' defaultMessage='Private Key Format'>
<SelectInput
label='Export Format'
value={format}
Expand All @@ -73,18 +73,18 @@ const SecondStep = ({ addr, balance, priv, format, formats, onChangeFormat }) =>
const ShowBtcPrivateKeyTemplate = ({ position, total, close, step, onContinue, ...rest }) => (
<Modal size='large' position={position} total={total}>
<ModalHeader icon='lock' closeButton={false}>
<FormattedMessage id='modals.show_priv.title' defaultMessage='Private Key' />
<FormattedMessage id='modals.showbtcpriv.title' defaultMessage='Private Key' />
</ModalHeader>
<ModalBody>
{step === 0 ? <FirstStep /> : <SecondStep {...rest} />}
</ModalBody>
<ModalFooter align='right'>
<Text cursor='pointer' size='small' weight={300} style={spacing('mr-15')} onClick={close}>
<FormattedMessage id='modals.show_priv.close' defaultMessage='Close' />
<FormattedMessage id='modals.showbtcpriv.close' defaultMessage='Close' />
</Text>
{step === 0 && (
<Button nature='primary' onClick={onContinue}>
<FormattedMessage id='modals.show_priv.continue' defaultMessage='Continue' />
<FormattedMessage id='modals.showbtcpriv.continue' defaultMessage='Continue' />
</Button>
)}
</ModalFooter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const DetailRowText = styled(Text)`
const FirstStep = () => (
<div>
<Text size='13px' color='error' weight={500} uppercase>
<FormattedMessage id='modals.show_eth_priv.warning' defaultMessage='Warning' />
<FormattedMessage id='modals.showethpriv.warning' defaultMessage='Warning' />
</Text>
<Text size='14px' style={spacing('mt-10')} weight={300}>
<FormattedMessage id='modals.show_eth_priv.warning_message' defaultMessage="Don't share your private key with anyone. This may result in a loss of funds." />
<FormattedMessage id='modals.showethpriv.warning.message' defaultMessage="Don't share your private key with anyone. This may result in a loss of funds." />
</Text>
</div>
)
Expand All @@ -42,15 +42,15 @@ const SecondStep = ({ addr, balance, priv }) => (
<QRCodeReact value={priv} size={120} />
</div>
<DetailTable>
<DetailRow id='modals.show_eth_priv.balance' defaultMessage='Balance'>
<DetailRow id='modals.showethpriv.balance' defaultMessage='Balance'>
<CoinDisplay coin='ETH' size='14px'>
{balance}
</CoinDisplay>
</DetailRow>
<DetailRow id='modals.show_eth_priv.address' defaultMessage='Address'>
<DetailRow id='modals.showethpriv.address' defaultMessage='Address'>
<Text size='14px' weight={300}>{addr}</Text>
</DetailRow>
<DetailRow id='modals.show_eth_priv.priv_key' defaultMessage='Private Key'>
<DetailRow id='modals.showethpriv.privatekey' defaultMessage='Private Key'>
<Text size='14px' weight={300}>{priv}</Text>
</DetailRow>
</DetailTable>
Expand All @@ -60,18 +60,18 @@ const SecondStep = ({ addr, balance, priv }) => (
const ShowEthPrivateKeyTemplate = ({ position, total, close, step, onContinue, ...rest }) => (
<Modal size='large' position={position} total={total}>
<ModalHeader icon='lock' closeButton={false}>
<FormattedMessage id='modals.show_eth_priv.title' defaultMessage='Private Key' />
<FormattedMessage id='modals.showethpriv.title' defaultMessage='Private Key' />
</ModalHeader>
<ModalBody>
{step === 0 ? <FirstStep /> : <SecondStep {...rest} />}
</ModalBody>
<ModalFooter align='right'>
<Text cursor='pointer' size='small' weight={300} style={spacing('mr-15')} onClick={close}>
<FormattedMessage id='modals.show_eth_priv.close' defaultMessage='Close' />
<FormattedMessage id='modals.showethpriv.close' defaultMessage='Close' />
</Text>
{step === 0 && (
<Button nature='primary' onClick={onContinue}>
<FormattedMessage id='modals.show_eth_priv.continue' defaultMessage='Continue' />
<FormattedMessage id='modals.showethpriv.continue' defaultMessage='Continue' />
</Button>
)}
</ModalFooter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ const ShowUsedAddresses = (props) => {
<ModalHeader onClose={close}>
<HeaderWrapper>
<Icon name='alert-filled' size='26px' className={'warning-icon'} />
<FormattedMessage id='modals.show_used_addresses.title' defaultMessage='Are you sure?' />
<FormattedMessage id='modals.showusedaddresses.title' defaultMessage='Are you sure?' />
</HeaderWrapper>
</ModalHeader>
<ModalBody>
<Text size='14px' weight={300}>
<FormattedMessage id='modals.show_used_addresses.message' defaultMessage='Viewing used addresses can be helpful for debugging purposes, and is recommended for advanced users only. For privacy reasons, we strongly discourage using each address more than once.'/>
<FormattedMessage id='modals.showusedaddresses.message' defaultMessage='Viewing used addresses can be helpful for debugging purposes, and is recommended for advanced users only. For privacy reasons, we strongly discourage using each address more than once.'/>
</Text>
</ModalBody>
<ModalFooter align='right'>
<CancelBtn size='small' weight={300} style={spacing('mr-15')} onClick={close}>
<FormattedMessage id='modals.show_used_addresses.cancel' defaultMessage='Cancel' />
<FormattedMessage id='modals.showusedaddresses.cancel' defaultMessage='Cancel' />
</CancelBtn>
<Button nature='primary' onClick={handleContinue}>
<FormattedMessage id='modals.show_used_addresses.ok' defaultMessage='OK' />
<FormattedMessage id='modals.showusedaddresses.ok' defaultMessage='OK' />
</Button>
</ModalFooter>
</Modal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const FirstStep = () => (
<FormattedMessage id='modals.xpub.warning' defaultMessage='Warning' />
</Text>
<Text size='14px' style={{ marginTop: 10 }} weight={300}>
<FormattedMessage id='modals.xpub.warning_message' defaultMessage="Don't share your Extended Public Key (xPub) with an untrusted source. Anyone with access to this can keep track of your payments and may be able to disrupt access to your wallet." />
<FormattedMessage id='modals.xpub.warning.message' defaultMessage="Don't share your Extended Public Key (xPub) with an untrusted source. Anyone with access to this can keep track of your payments and may be able to disrupt access to your wallet." />
</Text>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const SignMessage = props => (
<ModalHeader onClose={props.closeAll}>
<FormattedMessage id='modals.signmessage.title' defaultMessage='Sign Message' />
<Tooltip>
<FormattedMessage id='modals.signmessage.label'
defaultMessage='By signing a message, you can prove that you own this bitcoin address. You can verify signed messages by clicking on "More Actions > Verify Message".' />
<FormattedMessage id='modals.signmessage.label' defaultMessage="By signing a message, you can prove that you own this bitcoin address. You can verify signed messages by clicking on 'More Actions' > 'Verify Message'." />
</Tooltip>
</ModalHeader>
<ModalBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ const FirstStep = (props) => {
</ModalBody>
<ModalFooter align='right'>
<Link size='13px' weight={300} fullwidth onClick={close}>
<FormattedMessage id='modals.firststep.transactionreport.close' defaultMessage='Close' />
<FormattedMessage id='modals.firststep.transactionreport.firststep.close' defaultMessage='Close' />
</Link>
<ButtonContainer>
<Button type='submit' nature='primary' disabled={submitting || invalid}>
<FormattedMessage id='modals.firststep.transactionreport.generate' defaultMessage='Export' />
<FormattedMessage id='modals.firststep.transactionreport.firststep.generate' defaultMessage='Export' />
</Button>
</ButtonContainer>
</ModalFooter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const TwoStepGoogleAuthenticator = (props) => {
<FormattedMessage id='modals.twostepgoogleauthenticator.explain' defaultMessage='Scan this QR code with your Google Authenticator app on your mobile phone (download for iOS or Android).' />
</Text>
<Text size='14px' weight={300}>
<FormattedMessage id='modals.twostepgoogleauthenticator.explain' defaultMessage='Once scanned you will be presented with a random 6 digit number.' />
<FormattedMessage id='modals.twostepgoogleauthenticator.explain2' defaultMessage='Once scanned you will be presented with a random 6 digit number.' />
</Text>
<Code>
<Text size='14px' weight={300}>
Expand Down

0 comments on commit fafd686

Please sign in to comment.