James Prado 816ce3180f Translation Updates (#1323)
* Update account view routing

* Temporarily add unicode character to translated strings for testing

* Temporarily select add unicode to all untranslated strings

* Format changes

* Add all english translations for /account & /generate

* Add the rest of the english translations

* Add a few more missing translations

* Update en translations

* Get selectedLanguage from localstorage instead of redux sttate

* Update snapshots

* Add missing translation keys & Update translate functs & change variable prefix

* translate all markdown strings & remove old translation strings

* Update snapshot

* Add a few more translation strs

* Move raw strings being translated into json

* All translation keys are now Uppercase

* Fix up the last few translations

* Update snapshot

* Uppercase de translation strings

* Bring back shapeshift logo on swap

* Fix contracts tab translations

* Fix a few more translations

* Fix translations

* remove debugging stuff

* Update snapshots

* Use react.fragment as markdown root renderer

* Seperate markdown translations into their own function

* Clean up translation functions

* Clean up translation functions

* Update snapshot

* Fix some broken translation strings

* Add prettier ignore file
2018-03-21 22:50:25 -05:00

57 lines
1.7 KiB
TypeScript

import translate from 'translations';
import { Interact } from './components/Interact';
import { Deploy } from './components/Deploy';
import { reset, TReset } from 'actions/transaction';
import { resetWallet, TResetWallet } from 'actions/wallet';
import TabSection from 'containers/TabSection';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Switch, Route, Redirect, RouteComponentProps } from 'react-router';
import SubTabs from 'components/SubTabs';
import { RouteNotFound } from 'components/RouteNotFound';
interface Props {
reset: TReset;
resetWallet: TResetWallet;
}
const tabs = [
{
path: 'interact',
name: translate('CONTRACTS_INTERACT')
},
{
path: 'deploy',
name: translate('CONTRACTS_DEPLOY')
}
];
class Contracts extends Component<Props & RouteComponentProps<{}>> {
public render() {
const { match, location, history } = this.props;
const currentPath = match.url;
return (
<TabSection isUnavailableOffline={true}>
<SubTabs tabs={tabs} match={match} location={location} history={history} />
<section className="Tab-content Contracts">
<div className="Contracts-content">
<Switch>
<Route
exact={true}
path={currentPath}
render={() => <Redirect from={`${currentPath}`} to={`${currentPath}/interact`} />}
/>
<Route exact={true} path={`${currentPath}/interact`} component={Interact} />
<Route exact={true} path={`${currentPath}/deploy`} component={Deploy} />
<RouteNotFound />
</Switch>
</div>
</section>
</TabSection>
);
}
}
export default connect(null, { reset, resetWallet })(Contracts);