add translation support

This commit is contained in:
Daniel Ternyak 2017-06-25 00:57:43 -05:00
parent 142ed3adc5
commit afe2adbb5a
2 changed files with 10 additions and 6 deletions

View File

@ -2,6 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { DONATION_ADDRESSES_MAP } from 'config/data';
import Validator from 'libs/validator';
import translate from 'translations';
export default class ReceivingAddress extends Component {
constructor(props) {
@ -40,7 +41,7 @@ export default class ReceivingAddress extends Component {
<section className="row">
<div className="col-sm-8 col-sm-offset-2 col-xs-12">
<label>
<span>Your Receiving Address</span>
<span>{translate('SWAP_rec_add')}</span>
<strong> ({destinationKind})</strong>
</label>
<input
@ -56,7 +57,7 @@ export default class ReceivingAddress extends Component {
</section>
<section className="row text-center">
<button disabled={!validAddress} className="btn btn-primary btn-lg">
<span>Start Swap</span>
<span>{translate('SWAP_start_CTA')}</span>
</button>
</section>
</section>

View File

@ -1,6 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { toFixedIfLarger } from 'utils/formatters';
import translate from 'translations';
export default class SwapInformation extends Component {
constructor(props) {
@ -29,7 +30,9 @@ export default class SwapInformation extends Component {
return (
<article className="swap-start">
<section className="row">
<h5 className="col-xs-6 col-xs-offset-3">Your Information</h5>
<h5 className="col-xs-6 col-xs-offset-3">
{translate('SWAP_information')}
</h5>
<div className="col-xs-3">
<a
className="link"
@ -52,13 +55,13 @@ export default class SwapInformation extends Component {
<h4>
{` ${toFixedIfLarger(originAmount, 6)} ${originKind}`}
</h4>
<p>Amount to send</p>
<p>{translate('SEND_amount')}</p>
</div>
<div className="col-sm-4 order-info">
<h4>
{` ${toFixedIfLarger(destinationAmount, 6)} ${destinationKind}`}
</h4>
<p>Amount to receive</p>
<p>{translate('SWAP_rec_amt')}</p>
</div>
<div className="col-sm-4 order-info">
<h4>
@ -67,7 +70,7 @@ export default class SwapInformation extends Component {
6
)} ${originKind}/${destinationKind} `}
</h4>
<p>Your rate</p>
<p>{translate('SWAP_your_rate')}</p>
</div>
</section>
</article>