diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 3f59a5e74..c574df5c7 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -38,9 +38,6 @@
"confirmClearPlugins": {
"message": "Are you sure you want to remove all Snaps and their associated permissions?"
},
- "clearPluginsSuccess": {
- "message": "Snaps cleared successfully."
- },
"pluginsSettings": {
"message": "Manage Snaps"
},
@@ -68,9 +65,6 @@
"confirmClearPermissions": {
"message": "Are you sure you want to remove all dapp/website permissions?"
},
- "clearPermissionsSuccess": {
- "message": "Permissions cleared successfully."
- },
"updatePermissions": {
"message": "Update Permissions"
},
diff --git a/ui/app/pages/settings/permissions-tab/permissions-tab.component.js b/ui/app/pages/settings/permissions-tab/permissions-tab.component.js
index dcd25dd4e..ad03c878e 100644
--- a/ui/app/pages/settings/permissions-tab/permissions-tab.component.js
+++ b/ui/app/pages/settings/permissions-tab/permissions-tab.component.js
@@ -24,14 +24,13 @@ export default class PermissionsTab extends Component {
t: PropTypes.func,
}
- renderClearButton (messageKey, clickHandler, isDisabled) {
- const { t } = this.context
+ renderClearButton (mainMessage, descriptionMessage, clickHandler, isDisabled) {
return (
- { t(messageKey) }
+ { mainMessage }
- { t(`${messageKey}Description`) }
+ { descriptionMessage }
@@ -46,7 +45,7 @@ export default class PermissionsTab extends Component {
clickHandler()
}}
>
- { t(messageKey) }
+ { mainMessage }
@@ -55,6 +54,7 @@ export default class PermissionsTab extends Component {
}
render () {
+ const { t } = this.context
const { warning } = this.props
const hasPermissions = Object.keys(this.props.permissions).length > 0
const hasPermissionsActivity = this.props.permissionsLog.length > 0
@@ -71,7 +71,8 @@ export default class PermissionsTab extends Component {
/>
{
this.renderClearButton(
- 'clearPermissions',
+ t('clearPermissions'),
+ t('clearPermissionsDescription'),
this.props.showClearPermissionsModal,
!hasPermissions
)
@@ -81,7 +82,8 @@ export default class PermissionsTab extends Component {
/>
{
this.renderClearButton(
- 'clearPermissionsHistory',
+ t('clearPermissionsHistory'),
+ t('clearPermissionsHistoryDescription'),
this.props.showClearPermissionsHistoryModal,
!hasPermissionsHistory
)
@@ -91,7 +93,8 @@ export default class PermissionsTab extends Component {
/>
{
this.renderClearButton(
- 'clearPermissionsActivity',
+ t('clearPermissionsActivity'),
+ t('clearPermissionsActivityDescription'),
this.props.showClearPermissionsActivityModal,
!hasPermissionsActivity
)
diff --git a/ui/app/pages/settings/plugins-tab/plugins-tab.component.js b/ui/app/pages/settings/plugins-tab/plugins-tab.component.js
index 01a917be0..9b146ebcb 100644
--- a/ui/app/pages/settings/plugins-tab/plugins-tab.component.js
+++ b/ui/app/pages/settings/plugins-tab/plugins-tab.component.js
@@ -16,14 +16,13 @@ export default class PluginsTab extends Component {
t: PropTypes.func,
}
- renderClearButton (messageKey, clickHandler, isDisabled) {
- const { t } = this.context
+ renderClearButton (mainMessage, descriptionMessage, clickHandler, isDisabled) {
return (
- { t(messageKey) }
+ { mainMessage }
- { t(`${messageKey}Description`) }
+ { descriptionMessage }
@@ -38,7 +37,7 @@ export default class PluginsTab extends Component {
clickHandler()
}}
>
- { t(messageKey) }
+ { mainMessage }
@@ -47,6 +46,7 @@ export default class PluginsTab extends Component {
}
render () {
+ const { t } = this.context
const { warning } = this.props
const hasPlugins = Object.keys(this.props.plugins).length > 0
@@ -59,7 +59,8 @@ export default class PluginsTab extends Component {
/>
{
this.renderClearButton(
- 'clearPlugins',
+ t('clearPlugins'),
+ t('clearPluginsDescription'),
this.props.showClearPluginsModal,
!hasPlugins
)