mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
Merge pull request #431 from jaredevantabor/delete-translations
taging some delete modals for translations
This commit is contained in:
commit
55662efd4c
@ -5,8 +5,8 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'InitiatePlaybookRun', 'GetBasePath', 'Alert', '$rootScope',
|
||||
function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybookRun, GetBasePath, Alert, $rootScope) {
|
||||
export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'InitiatePlaybookRun', 'GetBasePath', 'Alert', '$rootScope', 'i18n',
|
||||
function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybookRun, GetBasePath, Alert, $rootScope, i18n) {
|
||||
var val = {
|
||||
// the playbook_on_stats event returns the count data in a weird format.
|
||||
// format to what we need!
|
||||
@ -90,9 +90,9 @@ function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybo
|
||||
},
|
||||
deleteJob: function(job) {
|
||||
Prompt({
|
||||
hdr: 'Delete Job',
|
||||
hdr: i18n._("Delete Job"),
|
||||
body: `<div class='Prompt-bodyQuery'>
|
||||
Are you sure you want to delete the job below?
|
||||
${i18n._("Are you sure you want to delete the job below?")}
|
||||
</div>
|
||||
<div class='Prompt-bodyTarget'>
|
||||
#${job.id} ${$filter('sanitize')(job.name)}
|
||||
@ -116,7 +116,7 @@ function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybo
|
||||
});
|
||||
});
|
||||
},
|
||||
actionText: 'DELETE'
|
||||
actionText: i18n._('DELETE')
|
||||
});
|
||||
},
|
||||
cancelJob: function(job) {
|
||||
@ -139,9 +139,9 @@ function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybo
|
||||
};
|
||||
|
||||
Prompt({
|
||||
hdr: 'Cancel Job',
|
||||
body: `<div class='Prompt-bodyQuery'>
|
||||
Are you sure you want to cancel the job below?
|
||||
hdr: i18n._('Cancel Job'),
|
||||
body: `<div class='Prompt-bodyQuery' translate>
|
||||
${i18n._("Are you sure you want to cancel the job below?")}
|
||||
</div>
|
||||
<div class='Prompt-bodyTarget'>
|
||||
#${job.id} ${$filter('sanitize')(job.name)}
|
||||
@ -163,7 +163,7 @@ function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybo
|
||||
}
|
||||
});
|
||||
},
|
||||
actionText: 'PROCEED'
|
||||
actionText: i18n._('PROCEED')
|
||||
});
|
||||
},
|
||||
relaunchJob: function(scope) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default
|
||||
export default
|
||||
function DeleteJob($state, Find, Rest, Wait, ProcessErrors, Prompt, Alert,
|
||||
$filter, i18n) {
|
||||
return function(params) {
|
||||
@ -76,7 +76,7 @@ export default
|
||||
reloadListStateParams = _.cloneDeep($state.params);
|
||||
reloadListStateParams.job_search.page = (parseInt(reloadListStateParams.job_search.page)-1).toString();
|
||||
}
|
||||
|
||||
|
||||
$state.go('.', reloadListStateParams, {reload: true});
|
||||
Wait('stop');
|
||||
}
|
||||
@ -107,12 +107,12 @@ export default
|
||||
}
|
||||
scope.removeCancelJob = scope.$on('CancelJob', function() {
|
||||
var cancelBody = "<div class=\"Prompt-bodyQuery\">" + i18n._("Submit the request to cancel?") + "</div>";
|
||||
var deleteBody = "<div class=\"Prompt-bodyQuery\">" + i18n._("Are you sure you want to delete the job below?") + "</div><div class=\"Prompt-bodyTarget\">#" + id + " " + $filter('sanitize')(job.name) + "</div>";
|
||||
var deleteBody = "<div class=\"Prompt-bodyQuery\">" + i18n._("Are you sure you want to delete the job below?") + "</div><div class=\"Prompt-bodyTarget\" translate>#" + id + " " + $filter('sanitize')(job.name) + "</div>";
|
||||
Prompt({
|
||||
hdr: hdr,
|
||||
body: (action_label === 'cancel' || job.status === 'new') ? cancelBody : deleteBody,
|
||||
action: action,
|
||||
actionText: (action_label === 'cancel' || job.status === 'new') ? "OK" : "DELETE"
|
||||
actionText: (action_label === 'cancel' || job.status === 'new') ? i18n._("OK") : i18n._("DELETE")
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -8,12 +8,12 @@ export default ['$scope', '$rootScope',
|
||||
'Alert','TemplateList', 'Prompt', 'ProcessErrors',
|
||||
'GetBasePath', 'InitiatePlaybookRun', 'Wait', '$state', '$filter',
|
||||
'Dataset', 'rbacUiControlService', 'TemplatesService','QuerySet',
|
||||
'TemplateCopyService',
|
||||
'TemplateCopyService', 'i18n',
|
||||
function(
|
||||
$scope, $rootScope, Alert,
|
||||
TemplateList, Prompt, ProcessErrors, GetBasePath,
|
||||
InitiatePlaybookRun, Wait, $state, $filter, Dataset, rbacUiControlService, TemplatesService,
|
||||
qs, TemplateCopyService
|
||||
qs, TemplateCopyService, i18n
|
||||
) {
|
||||
|
||||
var list = TemplateList;
|
||||
@ -99,8 +99,8 @@ export default ['$scope', '$rootScope',
|
||||
$scope.deleteJobTemplate = function(template) {
|
||||
if(template) {
|
||||
Prompt({
|
||||
hdr: 'Delete',
|
||||
body: '<div class="Prompt-bodyQuery">Are you sure you want to delete the template below?</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(template.name) + '</div>',
|
||||
hdr: i18n._('Delete'),
|
||||
body: `<div class="Prompt-bodyQuery">${i18n._("Are you sure you want to delete the template below?")}</div><div class="Prompt-bodyTarget">${$filter('sanitize')(template.name)}</div>`,
|
||||
action: function() {
|
||||
|
||||
function handleSuccessfulDelete(isWorkflow) {
|
||||
@ -151,7 +151,7 @@ export default ['$scope', '$rootScope',
|
||||
Alert('Error: Unable to determine template type', 'We were unable to determine this template\'s type while deleting.');
|
||||
}
|
||||
},
|
||||
actionText: 'DELETE'
|
||||
actionText: i18n._('DELETE')
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user