mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 13:39:27 -02:30
Mark access removal prompts for translation
This commit is contained in:
@@ -85,6 +85,18 @@ function BaseStringService (namespace) {
|
|||||||
CONFIRM: resourceType => t.s('Are you sure you want to delete this {{ resourceType }}?', { resourceType })
|
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 = {
|
this.cancelJob = {
|
||||||
HEADER: t.s('Cancel'),
|
HEADER: t.s('Cancel'),
|
||||||
SUBMIT_REQUEST: t.s('Are you sure you want to submit the request to cancel this job?'),
|
SUBMIT_REQUEST: t.s('Are you sure you want to submit the request to cancel this job?'),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* jshint unused: vars */
|
/* jshint unused: vars */
|
||||||
export default
|
export default
|
||||||
[ '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) {
|
function(templateUrl, Wait, GetBasePath, Rest, $state, ProcessErrors, Prompt, $filter, $rootScope, i18n, strings) {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
@@ -96,17 +96,17 @@ export default
|
|||||||
|
|
||||||
if (accessListEntry.team_id) {
|
if (accessListEntry.team_id) {
|
||||||
Prompt({
|
Prompt({
|
||||||
hdr: i18n._(`Team access removal`),
|
hdr: strings.get('removeTeamAccess.HEADER'),
|
||||||
body: `<div class="Prompt-bodyQuery">Please confirm that you would like to remove <span class="Prompt-emphasis">${entry.name}</span> access from the team <span class="Prompt-emphasis">${$filter('sanitize')(entry.team_name)}</span>. 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.</div>`,
|
body: `<div class="Prompt-bodyQuery">${strings.get('removeTeamAccess.CONFIRM', entry.name, $filter('sanitize')(entry.team_name))}</div>`,
|
||||||
action: action,
|
action: action,
|
||||||
actionText: i18n._('REMOVE TEAM ACCESS')
|
actionText: strings.get('removeTeamAccess.ACTION_TEXT'),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Prompt({
|
Prompt({
|
||||||
hdr: i18n._(`User access removal`),
|
hdr: strings.get('removeUserAccess.HEADER'),
|
||||||
body: `<div class="Prompt-bodyQuery">Please confirm that you would like to remove <span class="Prompt-emphasis">${entry.name}</span> access from <span class="Prompt-emphasis">${$filter('sanitize')(user.username)}</span>.</div>`,
|
body: `<div class="Prompt-bodyQuery">${strings.get('removeUserAccess.CONFIRM', entry.name, $filter('sanitize')(user.username))}</div>`,
|
||||||
action: action,
|
action: action,
|
||||||
actionText: i18n._('REMOVE')
|
actionText: strings.get('removeUserAccess.ACTION_TEXT'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user