diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-03-30 00:37:29 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-03-30 00:37:29 +0800 |
commit | ef61ef2ce885635862bb242612dd821cb3a65b6b (patch) | |
tree | 0f128f8b56b57a1bbe96dcf5743d34b5f95dc4cc /ui/app/components/dropdowns | |
parent | 58f52b2b8de9efd43896e23ab0ac9972f45bb278 (diff) | |
parent | 8766420f19251b95211dd99ff9a45e60cf0177ad (diff) | |
download | tangerine-wallet-browser-ef61ef2ce885635862bb242612dd821cb3a65b6b.tar tangerine-wallet-browser-ef61ef2ce885635862bb242612dd821cb3a65b6b.tar.gz tangerine-wallet-browser-ef61ef2ce885635862bb242612dd821cb3a65b6b.tar.bz2 tangerine-wallet-browser-ef61ef2ce885635862bb242612dd821cb3a65b6b.tar.lz tangerine-wallet-browser-ef61ef2ce885635862bb242612dd821cb3a65b6b.tar.xz tangerine-wallet-browser-ef61ef2ce885635862bb242612dd821cb3a65b6b.tar.zst tangerine-wallet-browser-ef61ef2ce885635862bb242612dd821cb3a65b6b.zip |
Fix i18n merge conflicts
Diffstat (limited to 'ui/app/components/dropdowns')
-rw-r--r-- | ui/app/components/dropdowns/components/account-dropdowns.js | 23 | ||||
-rw-r--r-- | ui/app/components/dropdowns/network-dropdown.js | 30 | ||||
-rw-r--r-- | ui/app/components/dropdowns/token-menu-dropdown.js | 6 |
3 files changed, 30 insertions, 29 deletions
diff --git a/ui/app/components/dropdowns/components/account-dropdowns.js b/ui/app/components/dropdowns/components/account-dropdowns.js index e5359c1d6..5e7c0d554 100644 --- a/ui/app/components/dropdowns/components/account-dropdowns.js +++ b/ui/app/components/dropdowns/components/account-dropdowns.js @@ -3,14 +3,14 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const actions = require('../../../actions') const genAccountLink = require('../../../../lib/account-link.js') -const connect = require('react-redux').connect +const connect = require('../../../metamask-connect') const Dropdown = require('./dropdown').Dropdown const DropdownMenuItem = require('./dropdown').DropdownMenuItem const Identicon = require('../../identicon') const ethUtil = require('ethereumjs-util') const copyToClipboard = require('copy-to-clipboard') const { formatBalance } = require('../../../util') -const t = require('../../../../i18n') + class AccountDropdowns extends Component { constructor (props) { @@ -130,7 +130,7 @@ class AccountDropdowns extends Component { actions.showEditAccountModal(identity) }, }, [ - t('edit'), + this.props.t('edit'), ]), ]), @@ -144,7 +144,7 @@ class AccountDropdowns extends Component { try { // Sometimes keyrings aren't loaded yet: const type = keyring.type const isLoose = type !== 'HD Key Tree' - return isLoose ? h('.keyring-label.allcaps', t('loose')) : null + return isLoose ? h('.keyring-label.allcaps', this.props.t('loose')) : null } catch (e) { return } } @@ -202,7 +202,7 @@ class AccountDropdowns extends Component { fontSize: '16px', lineHeight: '23px', }, - }, t('createAccount')), + }, this.props.t('createAccount')), ], ), h( @@ -236,7 +236,7 @@ class AccountDropdowns extends Component { fontSize: '16px', lineHeight: '23px', }, - }, t('importAccount')), + }, this.props.t('importAccount')), ] ), ] @@ -287,7 +287,7 @@ class AccountDropdowns extends Component { menuItemStyles, ), }, - t('accountDetails'), + this.props.t('accountDetails'), ), h( DropdownMenuItem, @@ -303,7 +303,7 @@ class AccountDropdowns extends Component { menuItemStyles, ), }, - t('etherscanView'), + this.props.t('etherscanView'), ), h( DropdownMenuItem, @@ -319,7 +319,7 @@ class AccountDropdowns extends Component { menuItemStyles, ), }, - t('copyAddress'), + this.props.t('copyAddress'), ), h( DropdownMenuItem, @@ -331,7 +331,7 @@ class AccountDropdowns extends Component { menuItemStyles, ), }, - t('exportPrivateKey'), + this.props.t('exportPrivateKey'), ), h( DropdownMenuItem, @@ -346,7 +346,7 @@ class AccountDropdowns extends Component { menuItemStyles, ), }, - t('addToken'), + this.props.t('addToken'), ), ] @@ -425,6 +425,7 @@ AccountDropdowns.propTypes = { enableAccountsSelector: PropTypes.bool, enableAccountOption: PropTypes.bool, enableAccountOptions: PropTypes.bool, + t: PropTypes.func, } const mapDispatchToProps = (dispatch) => { diff --git a/ui/app/components/dropdowns/network-dropdown.js b/ui/app/components/dropdowns/network-dropdown.js index 5afe730c1..aac7a9ee5 100644 --- a/ui/app/components/dropdowns/network-dropdown.js +++ b/ui/app/components/dropdowns/network-dropdown.js @@ -1,14 +1,14 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits -const connect = require('react-redux').connect +const connect = require('../../metamask-connect') const actions = require('../../actions') const Dropdown = require('./components/dropdown').Dropdown const DropdownMenuItem = require('./components/dropdown').DropdownMenuItem const NetworkDropdownIcon = require('./components/network-dropdown-icon') -const t = require('../../../i18n') const R = require('ramda') + // classes from nodes of the toggle element. const notToggleElementClassnames = [ 'menu-icon', @@ -94,13 +94,13 @@ NetworkDropdown.prototype.render = function () { }, [ h('div.network-dropdown-header', {}, [ - h('div.network-dropdown-title', {}, t('networks')), + h('div.network-dropdown-title', {}, this.props.t('networks')), h('div.network-dropdown-divider'), h('div.network-dropdown-content', {}, - t('defaultNetwork') + this.props.t('defaultNetwork') ), ]), @@ -122,7 +122,7 @@ NetworkDropdown.prototype.render = function () { style: { color: providerType === 'mainnet' ? '#ffffff' : '#9b9b9b', }, - }, t('mainnet')), + }, this.props.t('mainnet')), ] ), @@ -144,7 +144,7 @@ NetworkDropdown.prototype.render = function () { style: { color: providerType === 'ropsten' ? '#ffffff' : '#9b9b9b', }, - }, t('ropsten')), + }, this.props.t('ropsten')), ] ), @@ -166,7 +166,7 @@ NetworkDropdown.prototype.render = function () { style: { color: providerType === 'kovan' ? '#ffffff' : '#9b9b9b', }, - }, t('kovan')), + }, this.props.t('kovan')), ] ), @@ -188,7 +188,7 @@ NetworkDropdown.prototype.render = function () { style: { color: providerType === 'rinkeby' ? '#ffffff' : '#9b9b9b', }, - }, t('rinkeby')), + }, this.props.t('rinkeby')), ] ), @@ -210,7 +210,7 @@ NetworkDropdown.prototype.render = function () { style: { color: activeNetwork === 'http://localhost:8545' ? '#ffffff' : '#9b9b9b', }, - }, t('localhost')), + }, this.props.t('localhost')), ] ), @@ -234,7 +234,7 @@ NetworkDropdown.prototype.render = function () { style: { color: activeNetwork === 'custom' ? '#ffffff' : '#9b9b9b', }, - }, t('customRPC')), + }, this.props.t('customRPC')), ] ), @@ -249,15 +249,15 @@ NetworkDropdown.prototype.getNetworkName = function () { let name if (providerName === 'mainnet') { - name = t('mainnet') + name = this.props.t('mainnet') } else if (providerName === 'ropsten') { - name = t('ropsten') + name = this.props.t('ropsten') } else if (providerName === 'kovan') { - name = t('kovan') + name = this.props.t('kovan') } else if (providerName === 'rinkeby') { - name = t('rinkeby') + name = this.props.t('rinkeby') } else { - name = t('unknownNetwork') + name = this.props.t('unknownNetwork') } return name diff --git a/ui/app/components/dropdowns/token-menu-dropdown.js b/ui/app/components/dropdowns/token-menu-dropdown.js index a4f93b505..630e1f99d 100644 --- a/ui/app/components/dropdowns/token-menu-dropdown.js +++ b/ui/app/components/dropdowns/token-menu-dropdown.js @@ -1,9 +1,9 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits -const connect = require('react-redux').connect +const connect = require('../../metamask-connect') const actions = require('../../actions') -const t = require('../../../i18n') + module.exports = connect(null, mapDispatchToProps)(TokenMenuDropdown) @@ -44,7 +44,7 @@ TokenMenuDropdown.prototype.render = function () { showHideTokenConfirmationModal(this.props.token) this.props.onClose() }, - }, t('hideToken')), + }, this.props.t('hideToken')), ]), ]), |