diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js index 7090e0f870..d76229c0f9 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js +++ b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js @@ -7,9 +7,10 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService', '$state', 'ProcessErrors', 'CreateSelect2', '$q', 'JobTemplateModel', 'Empty', 'PromptService', 'Rest', 'TemplatesStrings', '$timeout', + 'i18n', function($scope, WorkflowService, GetBasePath, TemplatesService, $state, ProcessErrors, CreateSelect2, $q, JobTemplate, - Empty, PromptService, Rest, TemplatesStrings, $timeout) { + Empty, PromptService, Rest, TemplatesStrings, $timeout, i18n) { let promptWatcher, surveyQuestionWatcher, credentialsWatcher; @@ -301,15 +302,15 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService', if (!optionsToInclude) { $scope.edgeTypeOptions = [ { - label: 'Always', + label: i18n._('Always'), value: 'always' }, { - label: 'On Success', + label: i18n._('On Success'), value: 'success' }, { - label: 'On Failure', + label: i18n._('On Failure'), value: 'failure' } ]; @@ -864,19 +865,19 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService', switch($scope.nodeBeingEdited.edgeType) { case "always": - $scope.edgeType = {label: "Always", value: "always"}; + $scope.edgeType = {label: i18n._("Always"), value: "always"}; if (siblingConnectionTypes.length === 1 && _.includes(siblingConnectionTypes, "always") || $scope.nodeBeingEdited.isRoot) { edgeDropdownOptions = ["always"]; } break; case "success": - $scope.edgeType = {label: "On Success", value: "success"}; + $scope.edgeType = {label: i18n._("On Success"), value: "success"}; if (siblingConnectionTypes.length !== 0 && (!_.includes(siblingConnectionTypes, "always"))) { edgeDropdownOptions = ["success", "failure"]; } break; case "failure": - $scope.edgeType = {label: "On Failure", value: "failure"}; + $scope.edgeType = {label: i18n._("On Failure"), value: "failure"}; if (siblingConnectionTypes.length !== 0 && (!_.includes(siblingConnectionTypes, "always"))) { edgeDropdownOptions = ["success", "failure"]; } @@ -1003,7 +1004,7 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService', switch($scope.nodeBeingEdited.edgeType) { case "always": - $scope.edgeType = {label: "Always", value: "always"}; + $scope.edgeType = {label: i18n._("Always"), value: "always"}; if ( _.includes(siblingConnectionTypes, "always") && !_.includes(siblingConnectionTypes, "success") && @@ -1015,7 +1016,7 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService', } break; case "success": - $scope.edgeType = {label: "On Success", value: "success"}; + $scope.edgeType = {label: i18n._("On Success"), value: "success"}; if ( (_.includes(siblingConnectionTypes, "success") || _.includes(siblingConnectionTypes, "failure")) && !_.includes(siblingConnectionTypes, "always") @@ -1026,7 +1027,7 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService', } break; case "failure": - $scope.edgeType = {label: "On Failure", value: "failure"}; + $scope.edgeType = {label: i18n._("On Failure"), value: "failure"}; if ( (_.includes(siblingConnectionTypes, "success") || _.includes(siblingConnectionTypes, "failure")) && !_.includes(siblingConnectionTypes, "always")