From d59e4fd99af921e2e41c174f08121f7f83e364a6 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Wed, 11 Dec 2019 08:17:05 -0800 Subject: [PATCH] make verify-locales pass --- .../permissions-tab.component.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 )