Add i18n to tx status

feature/default_network_editable
Thomas 7 years ago
parent d4eb883958
commit dd19a93447
  1. 12
      app/_locales/en/messages.json
  2. 27
      ui/app/components/tx-list-item.js

@ -37,6 +37,9 @@
"message": "MetaMask", "message": "MetaMask",
"description": "The name of the application" "description": "The name of the application"
}, },
"approved": {
"message": "Approved"
},
"attemptingConnect": { "attemptingConnect": {
"message": "Attempting to connect to blockchain." "message": "Attempting to connect to blockchain."
}, },
@ -232,6 +235,9 @@
"downloadStatelogs": { "downloadStatelogs": {
"message": "Download State Logs" "message": "Download State Logs"
}, },
"dropped": {
"message": "Dropped"
},
"edit": { "edit": {
"message": "Edit" "message": "Edit"
}, },
@ -717,6 +723,9 @@
"sign": { "sign": {
"message": "Sign" "message": "Sign"
}, },
"signed": {
"message": "Signed"
},
"signMessage": { "signMessage": {
"message": "Sign Message" "message": "Sign Message"
}, },
@ -747,6 +756,9 @@
"submit": { "submit": {
"message": "Submit" "message": "Submit"
}, },
"submitted": {
"message": "Submitted"
},
"supportCenter": { "supportCenter": {
"message": "Visit our Support Center" "message": "Visit our Support Center"
}, },

@ -265,7 +265,7 @@ TxListItem.prototype.render = function () {
'tx-list-status--dropped': transactionStatus === 'dropped', 'tx-list-status--dropped': transactionStatus === 'dropped',
}), }),
}, },
transactionStatus, this.txStatusIndicator(),
), ),
]), ]),
]), ]),
@ -300,3 +300,28 @@ TxListItem.prototype.render = function () {
]), // holding on icon from design ]), // holding on icon from design
]) ])
} }
TxListItem.prototype.txStatusIndicator = function () {
const { transactionStatus } = this.props
let name
if (transactionStatus === 'unapproved') {
name = t('unapproved')
} else if (transactionStatus === 'rejected') {
name = t('rejected')
} else if (transactionStatus === 'approved') {
name = t('approved')
} else if (transactionStatus === 'signed') {
name = t('signed')
} else if (transactionStatus === 'submitted') {
name = t('submitted')
} else if (transactionStatus === 'confirmed') {
name = t('confirmed')
} else if (transactionStatus === 'failed') {
name = t('failed')
} else if (transactionStatus === 'dropped') {
name = t('dropped')
}
return name
}

Loading…
Cancel
Save