diff --git a/awx/ui/client/lib/services/base-string.service.js b/awx/ui/client/lib/services/base-string.service.js index 3e7b3b7cd7..ccd5dc2c64 100644 --- a/awx/ui/client/lib/services/base-string.service.js +++ b/awx/ui/client/lib/services/base-string.service.js @@ -85,6 +85,18 @@ function BaseStringService (namespace) { CONFIRM: resourceType => t.s('Are you sure you want to delete this {{ resourceType }}?', { resourceType }) }; + this.removeTeamAccess = { + HEADER: t.s('Team access removal'), + ACTION_TEXT: t.s('REMOVE TEAM ACCESS'), + CONFIRM: (role, name) => t.s('Please confirm that you would like to remove {{ role }} access from the team {{ name }}. This will affect all members of the team. If you would like to only remove access for this particular user, please remove them from the team.', { role, name }), + }; + + this.removeUserAccess = { + HEADER: t.s('Role access removal'), + ACTION_TEXT: t.s('REMOVE ACCESS'), + CONFIRM: (role, name) => t.s('Please confirm that you would like to remove {{ role }} access from {{ name }}.', { role, name }), + }; + this.cancelJob = { HEADER: t.s('Cancel'), SUBMIT_REQUEST: t.s('Are you sure you want to submit the request to cancel this job?'), diff --git a/awx/ui/client/src/access/rbac-role-column/roleList.directive.js b/awx/ui/client/src/access/rbac-role-column/roleList.directive.js index 55bf04dc51..3dd3ee0790 100644 --- a/awx/ui/client/src/access/rbac-role-column/roleList.directive.js +++ b/awx/ui/client/src/access/rbac-role-column/roleList.directive.js @@ -1,7 +1,7 @@ /* jshint unused: vars */ export default - [ 'templateUrl', 'Wait', 'GetBasePath', 'Rest', '$state', 'ProcessErrors', 'Prompt', '$filter', '$rootScope', 'i18n', - function(templateUrl, Wait, GetBasePath, Rest, $state, ProcessErrors, Prompt, $filter, $rootScope, i18n) { + [ 'templateUrl', 'Wait', 'GetBasePath', 'Rest', '$state', 'ProcessErrors', 'Prompt', '$filter', '$rootScope', 'i18n', 'AppStrings', + function(templateUrl, Wait, GetBasePath, Rest, $state, ProcessErrors, Prompt, $filter, $rootScope, i18n, strings) { return { restrict: 'E', scope: { @@ -96,17 +96,17 @@ export default if (accessListEntry.team_id) { Prompt({ - hdr: i18n._(`Team access removal`), - body: `
Please confirm that you would like to remove ${entry.name} access from the team ${$filter('sanitize')(entry.team_name)}. This will affect all members of the team. If you would like to only remove access for this particular user, please remove them from the team.
`, + hdr: strings.get('removeTeamAccess.HEADER'), + body: `
${strings.get('removeTeamAccess.CONFIRM', entry.name, $filter('sanitize')(entry.team_name))}
`, action: action, - actionText: i18n._('REMOVE TEAM ACCESS') + actionText: strings.get('removeTeamAccess.ACTION_TEXT'), }); } else { Prompt({ - hdr: i18n._(`User access removal`), - body: `
Please confirm that you would like to remove ${entry.name} access from ${$filter('sanitize')(user.username)}.
`, + hdr: strings.get('removeUserAccess.HEADER'), + body: `
${strings.get('removeUserAccess.CONFIRM', entry.name, $filter('sanitize')(user.username))}
`, action: action, - actionText: i18n._('REMOVE') + actionText: strings.get('removeUserAccess.ACTION_TEXT'), }); } };