Skip to content

Commit

Permalink
Add translation to App.js
Browse files Browse the repository at this point in the history
  • Loading branch information
iamonuwa committed Jul 8, 2019
1 parent 00b4e64 commit ea37439
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let mainStyle = {
mainColor:"white",
}

let title = i18n.t('app_name')
// let title = t('app_name')
let titleImage = (
<span style={{paddingRight:20,paddingLeft:16}}><i className="fas fa-fire" /></span>
)
Expand Down Expand Up @@ -101,7 +101,6 @@ export default class App extends Component {
constructor(props) {


console.log("[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["+title+"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]")
let view = 'main'
let cachedView = localStorage.getItem("view")
let cachedViewSetAge = Date.now() - localStorage.getItem("viewSetTime")
Expand All @@ -121,7 +120,7 @@ export default class App extends Component {
sendKey: "",
alert: null,
loadingTitle:'loading...',
title: title,
title: this.props.t,
extraHeadroom:0,
balance: 0.00,
vendors: {},
Expand Down Expand Up @@ -841,7 +840,7 @@ export default class App extends Component {
<div>
<Card>
<NavCard
title={i18n.t('history_chat')}
title={t('history_chat')}
goBack={this.goBack.bind(this)}/>
{defaultBalanceDisplay}
<History
Expand Down Expand Up @@ -880,7 +879,7 @@ export default class App extends Component {
<div>
<Card>
<NavCard
title={i18n.t('offramp.history.title')}
title={t('offramp.history.title')}
goBack={this.goBack.bind(this)}/>
<BityHistory
changeAlert={this.changeAlert}
Expand Down Expand Up @@ -953,7 +952,7 @@ export default class App extends Component {
</Card>
<Bottom
icon={"Settings"}
text={i18n.t('advance_title')}
text={t('advance_title')}
action={()=>{
this.changeView('advanced')
}}
Expand All @@ -965,7 +964,7 @@ export default class App extends Component {
<div>
{this.state.scannerOpen ? sendByScan : null}
<Card>
<NavCard title={i18n.t("offramp.title")} goBack={this.goBack.bind(this)}/>
<NavCard title={t("offramp.title")} goBack={this.goBack.bind(this)}/>
<div>
<Balance
icon={eth}
Expand All @@ -986,7 +985,7 @@ export default class App extends Component {
/>
</Card>
<Bottom
text={i18n.t('done')}
text={t('done')}
action={this.goBack.bind(this)}
/>
</div>
Expand All @@ -996,7 +995,7 @@ export default class App extends Component {
<div>
{this.state.scannerOpen ? sendByScan : null}
<Card>
<NavCard title={i18n.t('advance_title')} goBack={this.goBack.bind(this)}/>
<NavCard title={t('advance_title')} goBack={this.goBack.bind(this)}/>
<Advanced
isVendor={this.state.isVendor && this.state.isVendor.isAllowed}
buttonStyle={buttonStyle}
Expand All @@ -1011,7 +1010,7 @@ export default class App extends Component {
/>
</Card>
<Bottom
text={i18n.t('done')}
text={t('done')}
action={this.goBack.bind(this)}
/>
</div>
Expand All @@ -1021,7 +1020,7 @@ export default class App extends Component {
<div>
{this.state.scannerOpen ? sendByScan : null}
<Card>
<NavCard title={i18n.t('withdraw')} goBack={this.goBack.bind(this)}/>
<NavCard title={t('withdraw')} goBack={this.goBack.bind(this)}/>
{defaultBalanceDisplay}
<WithdrawFromPrivate
products={this.state.products}
Expand Down Expand Up @@ -1055,7 +1054,7 @@ export default class App extends Component {
<div>
{this.state.scannerOpen ? sendByScan : null}
<Card>
<NavCard title={i18n.t('send_to_address_title')} goBack={this.goBack.bind(this)}/>
<NavCard title={t('send_to_address_title')} goBack={this.goBack.bind(this)}/>
{defaultBalanceDisplay}
<SendToAddress
parseAndCleanPath={this.parseAndCleanPath.bind(this)}
Expand All @@ -1074,7 +1073,7 @@ export default class App extends Component {
/>
</Card>
<Bottom
text={i18n.t('cancel')}
text={t('cancel')}
action={this.goBack.bind(this)}
/>
</div>
Expand All @@ -1084,7 +1083,7 @@ export default class App extends Component {
<div>
{this.state.scannerOpen ? sendByScan : null}
<Card>
<NavCard title={i18n.t('receipt_title')} goBack={this.goBack.bind(this)}/>
<NavCard title={t('receipt_title')} goBack={this.goBack.bind(this)}/>
<Receipt
receipt={this.state.receipt}
view={this.state.view}
Expand Down Expand Up @@ -1114,7 +1113,7 @@ export default class App extends Component {
<div>
{this.state.scannerOpen ? sendByScan : null}
<Card>
<NavCard title={i18n.t('receive_title')} goBack={this.goBack.bind(this)}/>
<NavCard title={t('receive_title')} goBack={this.goBack.bind(this)}/>
{defaultBalanceDisplay}
<Receive
view={this.state.view}
Expand Down Expand Up @@ -1144,7 +1143,7 @@ export default class App extends Component {
<div>
{this.state.scannerOpen ? sendByScan : null}
<Card>
<NavCard title={i18n.t('request_funds_title')} goBack={this.goBack.bind(this)}/>
<NavCard title={t('request_funds_title')} goBack={this.goBack.bind(this)}/>
{defaultBalanceDisplay}
<RequestFunds
block={this.state.block}
Expand Down Expand Up @@ -1265,7 +1264,7 @@ export default class App extends Component {
<div>
{this.state.scannerOpen ? sendByScan : null}
<Card>
<NavCard title={i18n.t('exchange_title')} goBack={this.goBack.bind(this)}/>
<NavCard title={t('exchange_title')} goBack={this.goBack.bind(this)}/>
<Exchange
eth={eth}
dai={dai}
Expand Down

0 comments on commit ea37439

Please sign in to comment.