diff --git a/awx/ui/client/features/applications/add-applications.controller.js b/awx/ui/client/features/applications/add-applications.controller.js index 9687db48b7..d19c853009 100644 --- a/awx/ui/client/features/applications/add-applications.controller.js +++ b/awx/ui/client/features/applications/add-applications.controller.js @@ -1,4 +1,4 @@ -function AddApplicationsController (models, $state, strings, $scope, Alert, $filter) { +function AddApplicationsController (models, $state, strings, $scope, Alert, $filter, i18n) { const vm = this || {}; const { application, me, organization } = models; @@ -28,12 +28,12 @@ function AddApplicationsController (models, $state, strings, $scope, Alert, $fil vm.form.organization = { type: 'field', - label: 'Organization', + label: i18n._('Organization'), id: 'organization' }; vm.form.description = { type: 'String', - label: 'Description', + label: i18n._('Description'), id: 'description' }; @@ -112,6 +112,7 @@ AddApplicationsController.$inject = [ '$scope', 'Alert', '$filter', + 'i18n' ]; export default AddApplicationsController; diff --git a/awx/ui/client/features/applications/list-applications.controller.js b/awx/ui/client/features/applications/list-applications.controller.js index b9353f8d88..db1bb88b5d 100644 --- a/awx/ui/client/features/applications/list-applications.controller.js +++ b/awx/ui/client/features/applications/list-applications.controller.js @@ -101,7 +101,7 @@ function ListApplicationsController ( resourceName: $filter('sanitize')(app.name), body: deleteModalBody, action, - actionText: 'DELETE' + actionText: strings.get('DELETE') }); }; } diff --git a/awx/ui/client/features/credentials/legacy.credentials.js b/awx/ui/client/features/credentials/legacy.credentials.js index 027374f749..cb1bd1625d 100644 --- a/awx/ui/client/features/credentials/legacy.credentials.js +++ b/awx/ui/client/features/credentials/legacy.credentials.js @@ -67,7 +67,7 @@ function LegacyCredentialsService () { actions: { add: { ngClick: '$state.go(\'.add\')', - label: 'Add', + label: N_('Add'), awToolTip: N_('Add a permission'), actionClass: 'at-Button--add', actionId: 'button-add', diff --git a/awx/ui/client/features/output/output.strings.js b/awx/ui/client/features/output/output.strings.js index 8d6042c934..f65c8d9a57 100644 --- a/awx/ui/client/features/output/output.strings.js +++ b/awx/ui/client/features/output/output.strings.js @@ -119,6 +119,12 @@ function OutputStrings (BaseString) { STANDARD_OUT: t.s('Standard Out'), STANDARD_ERROR: t.s('Standard Error') }; + + ns.workflow_status = { + SUCCESSFUL: t.s('SUCCESSFUL'), + FAILED: t.s('FAILED'), + NO_JOBS_FINISHED: t.s('NO JOBS FINISHED') + }; } OutputStrings.$inject = ['BaseStringService']; diff --git a/awx/ui/client/features/users/tokens/users-tokens-add.controller.js b/awx/ui/client/features/users/tokens/users-tokens-add.controller.js index 76236238bc..dcd47d2e37 100644 --- a/awx/ui/client/features/users/tokens/users-tokens-add.controller.js +++ b/awx/ui/client/features/users/tokens/users-tokens-add.controller.js @@ -1,6 +1,6 @@ function AddTokensController ( models, $state, strings, Alert, Wait, - $filter, ProcessErrors, $scope + $filter, ProcessErrors, $scope, i18n ) { const vm = this || {}; const { application, token, user } = models; @@ -12,7 +12,7 @@ function AddTokensController ( vm.form = { application: { type: 'field', - label: 'Application', + label: i18n._('Application'), id: 'application', required: false, help_text: strings.get('add.APPLICATION_HELP_TEXT'), @@ -23,7 +23,7 @@ function AddTokensController ( }, description: { type: 'String', - label: 'Description', + label: i18n._('Description'), id: 'description', required: false }, @@ -35,7 +35,7 @@ function AddTokensController ( ], help_text: strings.get('add.SCOPE_HELP_TEXT'), id: 'scope', - label: 'Scope', + label: i18n._('Scope'), required: true, _component: 'at-input-select', _data: [ @@ -116,7 +116,8 @@ AddTokensController.$inject = [ 'Wait', '$filter', 'ProcessErrors', - '$scope' + '$scope', + 'i18n' ]; export default AddTokensController; diff --git a/awx/ui/client/lib/components/components.strings.js b/awx/ui/client/lib/components/components.strings.js index 4eaa0eea64..48de0e5ab5 100644 --- a/awx/ui/client/lib/components/components.strings.js +++ b/awx/ui/client/lib/components/components.strings.js @@ -89,7 +89,11 @@ function ComponentsStrings (BaseString) { VIEWS_HEADER: t.s('Views'), RESOURCES_HEADER: t.s('Resources'), ACCESS_HEADER: t.s('Access'), - ADMINISTRATION_HEADER: t.s('Administration') + ADMINISTRATION_HEADER: t.s('Administration'), + AUTHENTICATION: t.s('Authentication'), + SYSTEM: t.s('System'), + USER_INTERFACE: t.s('User Interface'), + LICENSE: t.s('License') }; ns.relaunch = { diff --git a/awx/ui/client/lib/components/layout/side-nav.partial.html b/awx/ui/client/lib/components/layout/side-nav.partial.html index 14bf34231e..028888d14b 100644 --- a/awx/ui/client/lib/components/layout/side-nav.partial.html +++ b/awx/ui/client/lib/components/layout/side-nav.partial.html @@ -8,11 +8,11 @@
- Authentication - Jobs - System - User Interface - License + {{ layoutVm.getString('AUTHENTICATION') }} + {{ layoutVm.getString('JOBS') }} + {{ layoutVm.getString('SYSTEM') }} + {{ layoutVm.getString('USER_INTERFACE') }} + {{ layoutVm.getString('LICENSE') }}
diff --git a/awx/ui/client/src/access/permissions-list.controller.js b/awx/ui/client/src/access/permissions-list.controller.js index ff132d211f..ee0caaebcc 100644 --- a/awx/ui/client/src/access/permissions-list.controller.js +++ b/awx/ui/client/src/access/permissions-list.controller.js @@ -4,8 +4,8 @@ * All Rights Reserved *************************************************/ -export default ['$scope', 'ListDefinition', 'Dataset', 'Wait', 'Rest', 'ProcessErrors', 'Prompt', '$state', '$filter', - function($scope, list, Dataset, Wait, Rest, ProcessErrors, Prompt, $state, $filter) { +export default ['$scope', 'ListDefinition', 'Dataset', 'Wait', 'Rest', 'ProcessErrors', 'Prompt', '$state', '$filter', 'i18n', + function($scope, list, Dataset, Wait, Rest, ProcessErrors, Prompt, $state, $filter, i18n) { init(); function init() { @@ -54,7 +54,7 @@ export default ['$scope', 'ListDefinition', 'Dataset', 'Wait', 'Rest', 'ProcessE `, action: action, - actionText: 'REMOVE' + actionText: i18n._('REMOVE') }); }; @@ -87,7 +87,7 @@ export default ['$scope', 'ListDefinition', 'Dataset', 'Wait', 'Rest', 'ProcessE `, action: action, - actionText: 'REMOVE' + actionText: i18n._('REMOVE') }); }; } 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 ef6b04988f..0ee778939f 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', - function(templateUrl, Wait, GetBasePath, Rest, $state, ProcessErrors, Prompt, $filter, $rootScope) { + [ 'templateUrl', 'Wait', 'GetBasePath', 'Rest', '$state', 'ProcessErrors', 'Prompt', '$filter', '$rootScope', 'i18n', + function(templateUrl, Wait, GetBasePath, Rest, $state, ProcessErrors, Prompt, $filter, $rootScope, i18n) { return { restrict: 'E', scope: { @@ -67,17 +67,17 @@ export default if (accessListEntry.team_id) { Prompt({ - hdr: `Team access removal`, + 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.
`, action: action, - actionText: 'REMOVE TEAM ACCESS' + actionText: i18n._('REMOVE TEAM ACCESS') }); } else { Prompt({ - hdr: `User access removal`, + hdr: i18n._(`User access removal`), body: `
Please confirm that you would like to remove ${entry.name} access from ${$filter('sanitize')(user.username)}.
`, action: action, - actionText: 'REMOVE' + actionText: i18n._('REMOVE') }); } }; diff --git a/awx/ui/client/src/configuration/settings.partial.html b/awx/ui/client/src/configuration/settings.partial.html index 588c055d78..ebfb5b5eb0 100644 --- a/awx/ui/client/src/configuration/settings.partial.html +++ b/awx/ui/client/src/configuration/settings.partial.html @@ -1,17 +1,17 @@ - - Enable simplified login for your Tower applications + + Enable simplified login for your Tower applications - - Update settings pertaining to Jobs within Tower + + Update settings pertaining to Jobs within Tower - - Define system-level features and functions + + Define system-level features and functions - - Set preferences for data collection, logos, and logins + + Set preferences for data collection, logos, and logins - - View and edit your license information + + View and edit your license information \ No newline at end of file diff --git a/awx/ui/client/src/credential-types/list/list.controller.js b/awx/ui/client/src/credential-types/list/list.controller.js index d4ecde7d6f..353cb5bd3a 100644 --- a/awx/ui/client/src/credential-types/list/list.controller.js +++ b/awx/ui/client/src/credential-types/list/list.controller.js @@ -107,7 +107,7 @@ export default ['$rootScope', '$scope', 'Wait', 'CredentialTypesList', body: deleteModalBody, action: action, hideActionButton: credentialTypeInUse ? true : false, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }); }; diff --git a/awx/ui/client/src/credentials/credentials.form.js b/awx/ui/client/src/credentials/credentials.form.js index 70a36695d9..063e9a3a6b 100644 --- a/awx/ui/client/src/credentials/credentials.form.js +++ b/awx/ui/client/src/credentials/credentials.form.js @@ -414,7 +414,7 @@ export default ['i18n', function(i18n) { ngShow: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)' }, save: { - label: 'Save', + label: i18n._('Save'), ngClick: 'formSave()', //$scope.function to call on click, optional ngDisabled: true, ngShow: '(credential_obj.summary_fields.user_capabilities.edit || canAdd)' //Disable when $pristine or $invalid, optional @@ -444,7 +444,7 @@ export default ['i18n', function(i18n) { add: { mode: 'all', ngClick: "$state.go('.add')", - label: 'Add', + label: i18n._('Add'), awToolTip: i18n._('Add a permission'), actionClass: 'at-Button--add', actionId: 'button-add', diff --git a/awx/ui/client/src/credentials/list/credentials-list.controller.js b/awx/ui/client/src/credentials/list/credentials-list.controller.js index 37d4bd4441..8fad7b7a71 100644 --- a/awx/ui/client/src/credentials/list/credentials-list.controller.js +++ b/awx/ui/client/src/credentials/list/credentials-list.controller.js @@ -177,7 +177,7 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', ' resourceName: $filter('sanitize')(name), body: deleteModalBody, action: action, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }); }; diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js index 7bef0d52cc..d60962a492 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js @@ -157,7 +157,7 @@ function InventoriesList($scope, resourceName: $filter('sanitize')(name), body: deleteModalBody, action: action, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }); }; diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.directive.js b/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.directive.js index 391c9d20a8..ad91778a2d 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.directive.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.directive.js @@ -68,7 +68,7 @@ export default ['templateUrl', '$compile', 'Wait', '$filter', 'i18n', } else { html += ""; - html += ""; + html += ``; html += "NA"; html += "" + $filter('sanitize')(ellipsis(row.name)) + ""; html += "\n"; @@ -76,7 +76,7 @@ export default ['templateUrl', '$compile', 'Wait', '$filter', 'i18n', }); html += "\n"; html += "\n"; - title = "Sync Status"; + title = i18n._("Sync Status"); attachElem(event, html, title); }; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/list/host-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/list/host-list.controller.js index d1c9a2be47..cf79463247 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/list/host-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/list/host-list.controller.js @@ -125,10 +125,10 @@ export default ['$scope', 'ListDefinition', '$rootScope', 'GetBasePath', }; // Prompt depends on having $rootScope.promptActionBtnClass available... Prompt({ - hdr: 'Delete Host', + hdr: i18n._('Delete Host'), body: body, action: action, - actionText: 'DELETE', + actionText: i18n._('DELETE'), }); $rootScope.promptActionBtnClass = 'Modal-errorButton'; }; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-groups-labels/relatedGroupsLabelsList.directive.js b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-groups-labels/relatedGroupsLabelsList.directive.js index d5a7672c63..7ecdee5973 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-groups-labels/relatedGroupsLabelsList.directive.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-groups-labels/relatedGroupsLabelsList.directive.js @@ -78,10 +78,10 @@ export default }; Prompt({ - hdr: 'Remove host from ' + group.name , + hdr: i18n._('Remove host from ') + group.name , body: '
' + i18n._('Confirm the removal of the') + ' ' + $filter('sanitize')(host.name) + ' ' + i18n._('from the') + ' ' + $filter('sanitize')(group.name) + ' ' + i18n._('group') + '.
', action: action, - actionText: 'REMOVE' + actionText: i18n._('REMOVE') }); }; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js index 1a9f96bbe3..e1ba3dfd75 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js @@ -195,7 +195,7 @@ resourceName: $filter('sanitize')(inventory_source.name), body: deleteModalBody, action: action, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); $rootScope.promptActionBtnClass = 'Modal-errorButton'; }); diff --git a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/host-filter-modal/host-filter-modal.directive.js b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/host-filter-modal/host-filter-modal.directive.js index 80727fc742..ef77fcc0fe 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/host-filter-modal/host-filter-modal.directive.js +++ b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/host-filter-modal/host-filter-modal.directive.js @@ -22,7 +22,7 @@ export default ['templateUrl', function(templateUrl) { }; }, - controller: ['$scope', 'QuerySet', 'GetBasePath', 'HostsList', '$compile', 'generateList', function($scope, qs, GetBasePath, HostsList, $compile, GenerateList) { + controller: ['$scope', 'QuerySet', 'GetBasePath', 'HostsList', '$compile', 'generateList', 'i18n', function($scope, qs, GetBasePath, HostsList, $compile, GenerateList, i18n) { function init() { @@ -55,7 +55,7 @@ export default ['templateUrl', function(templateUrl) { delete hostList.fields.inventory.ngClick; hostList.fields.inventory.columnClass = 'col-sm-6'; hostList.fields.inventory.ngBind = 'host.summary_fields.inventory.name'; - hostList.emptyListText = 'You must have access to at least one host in order to create a smart inventory host filter'; + hostList.emptyListText = i18n._('You must have access to at least one host in order to create a smart inventory host filter'); hostList.layoutClass = 'List-defaultLayout'; let html = GenerateList.build({ list: hostList, diff --git a/awx/ui/client/src/inventory-scripts/list/list.controller.js b/awx/ui/client/src/inventory-scripts/list/list.controller.js index 4202a07f5e..6db58983cc 100644 --- a/awx/ui/client/src/inventory-scripts/list/list.controller.js +++ b/awx/ui/client/src/inventory-scripts/list/list.controller.js @@ -127,7 +127,7 @@ export default ['$rootScope', '$scope', 'Wait', 'InventoryScriptsList', resourceName: $filter('sanitize')(name), body: deleteModalBody, action: action, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }); }; diff --git a/awx/ui/client/src/job-submission/job-submission-factories/create-launch-dialog.factory.js b/awx/ui/client/src/job-submission/job-submission-factories/create-launch-dialog.factory.js index 062b47ece3..a114c65668 100644 --- a/awx/ui/client/src/job-submission/job-submission-factories/create-launch-dialog.factory.js +++ b/awx/ui/client/src/job-submission/job-submission-factories/create-launch-dialog.factory.js @@ -1,5 +1,5 @@ export default - function CreateLaunchDialog($compile, CreateDialog, Wait, ParseTypeChange) { + function CreateLaunchDialog($compile, CreateDialog, Wait, ParseTypeChange, i18n) { return function(params) { var buttons, scope = params.scope, @@ -21,7 +21,7 @@ export default } buttons = [{ - label: "Cancel", + label: i18n._("Cancel"), onClick: function() { $('#password-modal').dialog('close'); // scope.$emit('CancelJob'); @@ -30,7 +30,7 @@ export default "class": "btn btn-default", "id": "password-cancel-button" },{ - label: "Launch", + label: i18n._("Launch"), onClick: function() { scope.$emit(callback); $('#password-modal').dialog('close'); @@ -46,7 +46,7 @@ export default width: 620, height: "auto", minWidth: 500, - title: 'Launch Configuration', + title: i18n._('Launch Configuration'), callback: 'DialogReady', onOpen: function(){ Wait('stop'); @@ -69,5 +69,6 @@ CreateLaunchDialog.$inject = [ '$compile', 'CreateDialog', 'Wait', - 'ParseTypeChange' + 'ParseTypeChange', + 'i18n' ]; diff --git a/awx/ui/client/src/management-jobs/scheduler/schedulerForm.partial.html b/awx/ui/client/src/management-jobs/scheduler/schedulerForm.partial.html index fa978c5892..065a78d4e3 100644 --- a/awx/ui/client/src/management-jobs/scheduler/schedulerForm.partial.html +++ b/awx/ui/client/src/management-jobs/scheduler/schedulerForm.partial.html @@ -29,9 +29,10 @@ name="schedulerName" id="schedulerName" ng-model="schedulerName" required - placeholder="Schedule name"> + placeholder="{{strings.get('form.SCHEDULE_NAME')}}">
+ ng-show="scheduler_form.$dirty && scheduler_form.schedulerName.$error.required" + translate> A schedule name is required.
@@ -54,11 +55,13 @@ * Start Time + ng-show="schedulerShowTimeZone" + translate> (HH24:MM:SS) + ng-show="!schedulerShowTimeZone" + translate> (HH24:MM:SS UTC) @@ -71,7 +74,7 @@ ScheduleTime-input SpinnerInput" aw-spinner="schedulerStartHour" ng-model="schedulerStartHour" - placeholder="HH24" + placeholder="{{strings.get('form.HH24')}}" aw-min="0" min="0" aw-max="23" max="23" data-zero-pad="2" required ng-change="timeChange()" > @@ -87,7 +90,7 @@ SchedulerTime-input SpinnerInput" aw-spinner="schedulerStartMinute" ng-model="schedulerStartMinute" - placeholder="MM" + placeholder="{{strings.get('form.MM')}}" min="0" max="59" data-zero-pad="2" required ng-change="timeChange()" > @@ -103,7 +106,7 @@ SchedulerTime-input SpinnerInput" aw-spinner="schedulerStartSecond" ng-model="schedulerStartSecond" - placeholder="SS" + placeholder="{{strings.get('form.SS')}}" min="0" max="59" data-zero-pad="2" required ng-change="timeChange()" > @@ -121,7 +124,8 @@ -->
+ ng-show="scheduler_startTime_error" + translate> The time must be in HH24:MM:SS format.
@@ -161,15 +165,19 @@
- - + +
A value is required.
This is not a valid number.
Please input a number greater than 1.
- Frequency Details
+ Frequency Details +
* - Every + Every + ng-show="$parent.scheduler_interval_error" + translate> Please provide a value between 1 and 999.
@@ -214,7 +223,8 @@ ng-model="$parent.monthlyRepeatOption" ng-change="monthlyRepeatChange()" name="monthlyRepeatOption" - id="monthlyRepeatOption"> + id="monthlyRepeatOption" + translate> on day @@ -229,7 +239,8 @@ min="1" max="31" ng-change="resetError('scheduler_monthDay_error')" >
+ ng-show="$parent.scheduler_monthDay_error" + translate> The day must be between 1 and 31.
@@ -246,7 +257,8 @@ ng-model="$parent.monthlyRepeatOption" ng-change="monthlyRepeatChange()" name="monthlyRepeatOption" - id="monthlyRepeatOption"> + id="monthlyRepeatOption" + translate> on the @@ -285,7 +297,8 @@ ng-model="$parent.yearlyRepeatOption" ng-change="yearlyRepeatChange()" name="yearlyRepeatOption" - id="yearlyRepeatOption"> + id="yearlyRepeatOption" + translate> on @@ -313,7 +326,8 @@ >
+ ng-show="$parent.scheduler_yearlyMonthDay_error" + translate> The day must be between 1 and 31.
@@ -330,7 +344,8 @@ ng-model="$parent.yearlyRepeatOption" ng-change="yearlyRepeatChange()" name="yearlyRepeatOption" - id="yearlyRepeatOption"> + id="yearlyRepeatOption" + translate> on the @@ -378,7 +393,7 @@ ng-if="schedulerFrequency && schedulerFrequency.value == 'weekly'">
@@ -392,7 +407,8 @@ class="btn btn-default RepeatFrequencyOptions-weekButton" data-value="SU" - ng-click="$parent.setWeekday($event,'su')"> + ng-click="$parent.setWeekday($event,'su')" + translate> Sun
+ ng-show="$parent.scheduler_weekDays_error" + translate> Please select one or more days.
@@ -461,7 +484,7 @@ ng-if="schedulerShowInterval">
+ ng-show="$parent.scheduler_occurrenceCount_error" + translate> Please provide a value between 1 and 999.
@@ -505,14 +529,15 @@ ng-if="schedulerEnd && schedulerEnd.value == 'on'">
+ ng-show="$parent.scheduler_endDt_error" + translate> Please provide a valid date.
@@ -524,13 +549,13 @@
-

+

The scheduler options are invalid or incomplete.

-
- + \ No newline at end of file diff --git a/awx/ui/client/src/notifications/notificationTemplates.form.js b/awx/ui/client/src/notifications/notificationTemplates.form.js index 87bfd8c457..d97f171f7e 100644 --- a/awx/ui/client/src/notifications/notificationTemplates.form.js +++ b/awx/ui/client/src/notifications/notificationTemplates.form.js @@ -325,7 +325,7 @@ export default ['i18n', function(i18n) { ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)' }, api_url: { - label: 'API URL', + label: i18n._('API URL'), type: 'text', placeholder: 'https://mycompany.hipchat.com', awRequiredWhen: { diff --git a/awx/ui/client/src/organizations/edit/organizations-edit.controller.js b/awx/ui/client/src/organizations/edit/organizations-edit.controller.js index 0619f4aa86..e58b19aa6d 100644 --- a/awx/ui/client/src/organizations/edit/organizations-edit.controller.js +++ b/awx/ui/client/src/organizations/edit/organizations-edit.controller.js @@ -5,10 +5,10 @@ *************************************************/ export default ['$scope', '$location', '$stateParams', 'OrgAdminLookup', - 'OrganizationForm', 'Rest', 'ProcessErrors', 'Prompt', '$rootScope', + 'OrganizationForm', 'Rest', 'ProcessErrors', 'Prompt', '$rootScope', 'i18n', 'GetBasePath', 'Wait', '$state', 'ToggleNotification', 'CreateSelect2', 'InstanceGroupsService', 'InstanceGroupsData', 'ConfigData', function($scope, $location, $stateParams, OrgAdminLookup, - OrganizationForm, Rest, ProcessErrors, Prompt, $rootScope, + OrganizationForm, Rest, ProcessErrors, Prompt, $rootScope, i18n, GetBasePath, Wait, $state, ToggleNotification, CreateSelect2, InstanceGroupsService, InstanceGroupsData, ConfigData) { let form = OrganizationForm(), @@ -159,10 +159,10 @@ export default ['$scope', '$location', '$stateParams', 'OrgAdminLookup', }; Prompt({ - hdr: 'Delete', + hdr: i18n._('Delete'), body: '
Are you sure you want to remove the ' + title + ' below from ' + $scope.name + '?
' + name + '
', action: action, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }; diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js index ab5908c041..1d84f962ca 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js @@ -5,12 +5,11 @@ *************************************************/ export default ['$stateParams', '$scope', 'Rest', '$state', - '$compile', 'Wait', 'OrgAdminList', - 'OrgAdminsDataset', + '$compile', 'Wait', 'OrgAdminList', 'OrgAdminsDataset', 'i18n', 'Prompt', 'ProcessErrors', 'GetBasePath', '$filter', function($stateParams, $scope, Rest, $state, - $compile, Wait, OrgAdminList, OrgAdminsDataset, Prompt, ProcessErrors, - GetBasePath, $filter) { + $compile, Wait, OrgAdminList, OrgAdminsDataset, i18n, + Prompt, ProcessErrors, GetBasePath, $filter) { var orgBase = GetBasePath('organizations'); @@ -63,10 +62,10 @@ export default ['$stateParams', '$scope', 'Rest', '$state', }; Prompt({ - hdr: 'Delete', - body: '
Are you sure you want to remove the following administrator from this organization?
' + $filter('sanitize')(name) + '
', + hdr: i18n._('Delete'), + body: `
${i18n._('Are you sure you want to remove the following administrator from this organization?')}
` + $filter('sanitize')(name) + '
', action: action, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }; diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js index 57cf501c4d..ccc01e859c 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js @@ -46,28 +46,28 @@ export default ['$scope', '$rootScope', '$location', if (item.has_inventory_sources) { if (item.inventory_sources_with_failures > 0) { item.syncStatus = 'error'; - item.syncTip = item.inventory_sources_with_failures + ' groups with sync failures. Click for details'; + item.syncTip = item.inventory_sources_with_failures + i18n._(' groups with sync failures. Click for details'); } else { item.syncStatus = 'successful'; - item.syncTip = 'No inventory sync failures. Click for details.'; + item.syncTip = i18n._('No inventory sync failures. Click for details.'); } } else { item.syncStatus = 'na'; - item.syncTip = 'Not configured for inventory sync.'; + item.syncTip = i18n._('Not configured for inventory sync.'); item.launch_class = "btn-disabled"; } if (item.has_active_failures) { item.hostsStatus = 'eritemror'; - item.hostsTip = item.hosts_with_active_failures + ' hosts with failures. Click for details.'; + item.hostsTip = item.hosts_with_active_failures + i18n._(' hosts with failures. Click for details.'); } else if (item.total_hosts) { item.hostsStatus = 'successful'; - item.hostsTip = 'No hosts with failures. Click for details.'; + item.hostsTip = i18n._('No hosts with failures. Click for details.'); } else { item.hostsStatus = 'none'; - item.hostsTip = 'Inventory contains 0 hosts.'; + item.hostsTip = i18n._('Inventory contains 0 hosts.'); } - item.kind_label = item.kind === '' ? 'Inventory' : (item.kind === 'smart' ? i18n._('Smart Inventory'): i18n._('Inventory')); + item.kind_label = item.kind === '' ? i18n._('Inventory') : (item.kind === 'smart' ? i18n._('Smart Inventory'): i18n._('Inventory')); return item; } @@ -182,7 +182,7 @@ export default ['$scope', '$rootScope', '$location', }); html += "\n"; html += "\n"; - title = "Sync Status"; + title = i18n._("Sync Status"); attachElem(event, html, title); }); diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js index d657b973c8..b5676fb782 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js @@ -6,10 +6,10 @@ export default ['$stateParams', '$scope', 'OrgUserList','Rest', '$state', '$compile', 'Wait', 'OrgUsersDataset', - 'Prompt', 'ProcessErrors', 'GetBasePath', '$filter', + 'Prompt', 'ProcessErrors', 'GetBasePath', '$filter', 'i18n', function($stateParams, $scope, OrgUserList, Rest, $state, $compile, Wait, OrgUsersDataset, Prompt, ProcessErrors, - GetBasePath, $filter) { + GetBasePath, $filter, i18n) { var orgBase = GetBasePath('organizations'); @@ -62,10 +62,10 @@ export default ['$stateParams', '$scope', 'OrgUserList','Rest', '$state', }; Prompt({ - hdr: 'Delete', - body: '
Are you sure you want to remove the following user from this organization?
' + $filter('sanitize')(name) + '
', + hdr: i18n._('Delete'), + body: `
${i18n._('Are you sure you want to remove the following user from this organization?')}
` + $filter('sanitize')(name) + '
', action: action, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }; diff --git a/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js b/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js index 33dbc25983..877676af62 100644 --- a/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js +++ b/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js @@ -57,13 +57,13 @@ let lists = [{ return qs.search(path, $stateParams.user_search); } ], - OrgUserList: ['UserList', 'GetBasePath', '$stateParams', function(UserList, GetBasePath, $stateParams) { + OrgUserList: ['UserList', 'GetBasePath', '$stateParams', 'i18n', function(UserList, GetBasePath, $stateParams, i18n) { let list = _.cloneDeep(UserList); delete list.actions.add; list.basePath = `${GetBasePath('organizations')}${$stateParams.organization_id}/users`; list.searchRowActions = { add: { - awToolTip: 'Add existing user to organization', + awToolTip: i18n._('Add existing user to organization'), actionClass: 'at-Button--add', actionId: 'button-add', ngClick: 'addUsers()' @@ -101,14 +101,14 @@ let lists = [{ features: ['FeaturesService', function(FeaturesService) { return FeaturesService.get(); }], - OrgTeamList: ['TeamList', 'GetBasePath', '$stateParams', function(TeamList, GetBasePath, $stateParams) { + OrgTeamList: ['TeamList', 'GetBasePath', '$stateParams', 'i18n', function(TeamList, GetBasePath, $stateParams, i18n) { let list = _.cloneDeep(TeamList); delete list.actions.add; // @issue Why is the delete action unavailable in this view? delete list.fieldActions.delete; - list.listTitle = N_('Teams') + ` | {{ name }}`; + list.listTitle = i18n._('Teams') + ` | {{ name }}`; list.basePath = `${GetBasePath('organizations')}${$stateParams.organization_id}/teams`; - list.emptyListText = `${N_('This list is populated by teams added from the')} ${N_('Teams')} ${N_('section')}`; + list.emptyListText = `${i18n._('This list is populated by teams added from the')} ${N_('Teams')} ${N_('section')}`; return list; }], OrgTeamsDataset: ['OrgTeamList', 'QuerySet', '$stateParams', 'GetBasePath', @@ -147,15 +147,15 @@ let lists = [{ features: ['FeaturesService', function(FeaturesService) { return FeaturesService.get(); }], - OrgInventoryList: ['InventoryList', 'GetBasePath', '$stateParams', function(InventoryList, GetBasePath, $stateParams) { + OrgInventoryList: ['InventoryList', 'GetBasePath', '$stateParams', 'i18n', function(InventoryList, GetBasePath, $stateParams, i18n) { let list = _.cloneDeep(InventoryList); delete list.actions.add; // @issue Why is the delete action unavailable in this view? delete list.fieldActions.delete; list.title = true; - list.listTitle = N_('Inventories') + ` | {{ name }}`; + list.listTitle = i18n._('Inventories') + ` | {{ name }}`; list.basePath = `${GetBasePath('organizations')}${$stateParams.organization_id}/inventories`; - list.emptyListText = `${N_("This list is populated by inventories added from the")} ${N_("Inventories")} ${N_("section")}`; + list.emptyListText = `${i18n._("This list is populated by inventories added from the")} ${N_("Inventories")} ${N_("section")}`; return list; }], OrgInventoryDataset: ['OrgInventoryList', 'QuerySet', '$stateParams', 'GetBasePath', @@ -199,14 +199,14 @@ let lists = [{ features: ['FeaturesService', function(FeaturesService) { return FeaturesService.get(); }], - OrgProjectList: ['ProjectList', 'GetBasePath', '$stateParams', function(ProjectList, GetBasePath, $stateParams) { + OrgProjectList: ['ProjectList', 'GetBasePath', '$stateParams', 'i18n', function(ProjectList, GetBasePath, $stateParams, i18n) { let list = _.cloneDeep(ProjectList); delete list.actions; // @issue Why is the delete action unavailable in this view? delete list.fieldActions.delete; - list.listTitle = N_('Projects') + ` | {{ name }}`; + list.listTitle = i18n._('Projects') + ` | {{ name }}`; list.basePath = `${GetBasePath('organizations')}${$stateParams.organization_id}/projects`; - list.emptyListText = `${N_("This list is populated by projects added from the")} ${N_("Projects")} ${N_("section")}`; + list.emptyListText = `${i18n._("This list is populated by projects added from the")} ${N_("Projects")} ${N_("section")}`; return list; }], OrgProjectDataset: ['OrgProjectList', 'QuerySet', '$stateParams', 'GetBasePath', @@ -267,18 +267,18 @@ let lists = [{ return qs.search(path, $stateParams[`user_search`]); } ], - OrgAdminList: ['UserList', 'GetBasePath', '$stateParams', function(UserList, GetBasePath, $stateParams) { + OrgAdminList: ['UserList', 'GetBasePath', '$stateParams', 'i18n', function(UserList, GetBasePath, $stateParams, i18n) { let list = _.cloneDeep(UserList); delete list.actions.add; list.basePath = `${GetBasePath('organizations')}${$stateParams.organization_id}/admins`; list.searchRowActions = { add: { - awToolTip: 'Add existing user to organization as administrator', + awToolTip: i18n._('Add existing user to organization as administrator'), actionClass: 'at-Button--add', ngClick: 'addUsers()' } }; - list.listTitle = N_('Admins') + ` | {{ name }}`; + list.listTitle = i18n._('Admins') + ` | {{ name }}`; return list; }] } diff --git a/awx/ui/client/src/organizations/organizations.form.js b/awx/ui/client/src/organizations/organizations.form.js index 3c58fa5aa7..56cfbebeae 100644 --- a/awx/ui/client/src/organizations/organizations.form.js +++ b/awx/ui/client/src/organizations/organizations.form.js @@ -130,7 +130,7 @@ export default ['NotificationsList', 'i18n', actions: { add: { ngClick: "$state.go('.add')", - label: 'Add', + label: i18n._('Add'), awToolTip: i18n._('Add a permission'), actionClass: 'at-Button--add', actionId: 'button-add', diff --git a/awx/ui/client/src/projects/projects.form.js b/awx/ui/client/src/projects/projects.form.js index a4daadd52d..d8a5b2d3fd 100644 --- a/awx/ui/client/src/projects/projects.form.js +++ b/awx/ui/client/src/projects/projects.form.js @@ -251,7 +251,7 @@ export default ['i18n', 'NotificationsList', 'TemplateList', actions: { add: { ngClick: "$state.go('.add')", - label: 'Add', + label: i18n._('Add'), awToolTip: i18n._('Add a permission'), actionClass: 'at-Button--add', actionId: 'button-add', diff --git a/awx/ui/client/src/scheduler/factories/delete-schedule.factory.js b/awx/ui/client/src/scheduler/factories/delete-schedule.factory.js index d4526cab8b..f766fe083c 100644 --- a/awx/ui/client/src/scheduler/factories/delete-schedule.factory.js +++ b/awx/ui/client/src/scheduler/factories/delete-schedule.factory.js @@ -1,6 +1,6 @@ export default function DeleteSchedule(GetBasePath, Rest, Wait, $state, - ProcessErrors, Prompt, Find, $location, $filter) { + ProcessErrors, Prompt, Find, $location, $filter, i18n) { return function(params) { var scope = params.scope, id = params.id, @@ -55,9 +55,9 @@ export default Prompt({ hdr: hdr, resourceName: $filter('sanitize')(schedule.name), - body: '
Are you sure you want to delete this schedule?
', + body: `
${i18n._('Are you sure you want to delete this schedule?')}
`, action: action, - actionText: 'DELETE', + actionText: i18n._('DELETE'), backdrop: false }); }; @@ -66,5 +66,5 @@ export default DeleteSchedule.$inject = [ 'GetBasePath','Rest', 'Wait', '$state', 'ProcessErrors', 'Prompt', 'Find', '$location', - '$filter' + '$filter', 'i18n' ]; diff --git a/awx/ui/client/src/scheduler/scheduler.strings.js b/awx/ui/client/src/scheduler/scheduler.strings.js index 95b66edfdf..b32b4289b9 100644 --- a/awx/ui/client/src/scheduler/scheduler.strings.js +++ b/awx/ui/client/src/scheduler/scheduler.strings.js @@ -56,7 +56,12 @@ function SchedulerStrings (BaseString) { CANCEL: t.s('Cancel'), SAVE: t.s('Save'), WARNING: t.s('Warning'), - CREDENTIAL_REQUIRES_PASSWORD_WARNING: t.s('This Job Template has a default credential that requires a password before launch. Adding or editing schedules is prohibited while this credential is selected. To add or edit a schedule, credentials that require a password must be removed from the Job Template.') + CREDENTIAL_REQUIRES_PASSWORD_WARNING: t.s('This Job Template has a default credential that requires a password before launch. Adding or editing schedules is prohibited while this credential is selected. To add or edit a schedule, credentials that require a password must be removed from the Job Template.'), + SCHEDULE_NAME: t.s('Schedule name'), + HH24: t.s('HH24'), + MM: t.s('MM'), + SS: t.s('SS'), + DAYS_DATA: t.s('Days of data to keep') }; ns.prompt = { diff --git a/awx/ui/client/src/scheduler/schedulerForm.partial.html b/awx/ui/client/src/scheduler/schedulerForm.partial.html index 586a04456f..900b24f941 100644 --- a/awx/ui/client/src/scheduler/schedulerForm.partial.html +++ b/awx/ui/client/src/scheduler/schedulerForm.partial.html @@ -29,7 +29,7 @@ id="schedulerName" ng-model="schedulerName" required ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd) || credentialRequiresPassword" - placeholder="Schedule name"> + placeholder="{{strings.get('form.SCHEDULE_NAME')}}">
{{ strings.get('form.NAME_REQUIRED_MESSAGE') }} @@ -71,7 +71,7 @@ ScheduleTime-input SpinnerInput" aw-spinner="schedulerStartHour" ng-model="schedulerStartHour" - placeholder="HH24" + placeholder="{{strings.get('form.HH24')}}" aw-min="0" min="0" aw-max="23" max="23" data-zero-pad="2" required ng-change="timeChange()" > @@ -87,7 +87,7 @@ SchedulerTime-input SpinnerInput" aw-spinner="schedulerStartMinute" ng-model="schedulerStartMinute" - placeholder="MM" + placeholder="{{strings.get('form.MM')}}" min="0" max="59" data-zero-pad="2" required ng-change="timeChange()" > @@ -103,7 +103,7 @@ SchedulerTime-input SpinnerInput" aw-spinner="schedulerStartSecond" ng-model="schedulerStartSecond" - placeholder="SS" + placeholder="{{strings.get('form.SS')}}" min="0" max="59" data-zero-pad="2" required ng-change="timeChange()" > @@ -521,7 +521,7 @@ ScheduleTime-input SpinnerInput" aw-spinner="$parent.schedulerEndHour" ng-model="$parent.schedulerEndHour" - placeholder="HH24" + placeholder="{{strings.get('form.HH24')}}" aw-min="0" min="0" aw-max="23" max="23" data-zero-pad="2" required ng-change="schedulerEndChange('schedulerEndHour', $parent.schedulerEndHour)" > @@ -537,7 +537,7 @@ SchedulerTime-input SpinnerInput" aw-spinner="$parent.schedulerEndMinute" ng-model="$parent.schedulerEndMinute" - placeholder="MM" + placeholder="{{strings.get('form.MM')}}" min="0" max="59" data-zero-pad="2" required ng-change="schedulerEndChange('schedulerEndMinute', $parent.schedulerEndMinute)" > @@ -553,7 +553,7 @@ SchedulerTime-input SpinnerInput" aw-spinner="$parent.schedulerEndSecond" ng-model="$parent.schedulerEndSecond" - placeholder="SS" + placeholder="{{strings.get('form.SS')}}" min="0" max="59" data-zero-pad="2" required ng-change="schedulerEndChange('schedulerEndSecond', $parent.schedulerEndSecond)" > @@ -598,7 +598,8 @@ class="SchedulerFormDetail-dateFormatsLabel"> {{ strings.get('form.DATE_FORMAT') }} -
- + \ No newline at end of file diff --git a/awx/ui/client/src/shared/form-generator.js b/awx/ui/client/src/shared/form-generator.js index e9042bc572..4ba0f3890a 100644 --- a/awx/ui/client/src/shared/form-generator.js +++ b/awx/ui/client/src/shared/form-generator.js @@ -1857,7 +1857,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat html += `
- System Administrators have access to all ${collection.iterator}s + ${i18n._('System Administrators have access to all ' + collection.iterator + 's')}
`; @@ -1883,7 +1883,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat `; } if (collection.fieldActions) { - html += `
Actions
`; + html += `
${i18n._('Actions')}
`; } html += ""; diff --git a/awx/ui/client/src/shared/list-generator/list-generator.factory.js b/awx/ui/client/src/shared/list-generator/list-generator.factory.js index bab6a479f0..51f4eae891 100644 --- a/awx/ui/client/src/shared/list-generator/list-generator.factory.js +++ b/awx/ui/client/src/shared/list-generator/list-generator.factory.js @@ -412,7 +412,7 @@ export default ['$compile', 'Attr', 'Icon', }); } if (field_action === 'pending_deletion') { - innerTable += `Pending Delete`; + innerTable += `${i18n._('Pending Delete')}`; } else if (field_action === 'submit') { innerTable += ``; } else { diff --git a/awx/ui/client/src/shared/paginate/paginate.partial.html b/awx/ui/client/src/shared/paginate/paginate.partial.html index 890fc9a7f9..e551675379 100644 --- a/awx/ui/client/src/shared/paginate/paginate.partial.html +++ b/awx/ui/client/src/shared/paginate/paginate.partial.html @@ -42,7 +42,7 @@ --> {{ 'ITEMS' | translate }}  {{dataRange}} - of {{dataset.count | number}} + {{ 'of' | translate }} {{dataset.count | number}}
VIEW PER PAGE
diff --git a/awx/ui/client/src/teams/list/teams-list.controller.js b/awx/ui/client/src/teams/list/teams-list.controller.js index 88df298f55..25826495a2 100644 --- a/awx/ui/client/src/teams/list/teams-list.controller.js +++ b/awx/ui/client/src/teams/list/teams-list.controller.js @@ -75,11 +75,11 @@ export default ['$scope', 'Rest', 'TeamList', 'Prompt', }; Prompt({ - hdr: 'Delete', + hdr: i18n._('Delete'), resourceName: $filter('sanitize')(name), body: '
' + i18n._('Are you sure you want to delete this team?') + '
', action: action, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }; } diff --git a/awx/ui/client/src/teams/teams.form.js b/awx/ui/client/src/teams/teams.form.js index 16d1564ac9..376dd9fcc2 100644 --- a/awx/ui/client/src/teams/teams.form.js +++ b/awx/ui/client/src/teams/teams.form.js @@ -158,7 +158,7 @@ export default ['i18n', function(i18n) { actions: { add: { ngClick: "$state.go('.add')", - label: 'Add', + label: i18n._('Add'), awToolTip: i18n._('Grant Permission'), actionClass: 'at-Button--add', actionId: 'button-add', diff --git a/awx/ui/client/src/templates/labels/labelsList.directive.js b/awx/ui/client/src/templates/labels/labelsList.directive.js index 422f04da33..158343babd 100644 --- a/awx/ui/client/src/templates/labels/labelsList.directive.js +++ b/awx/ui/client/src/templates/labels/labelsList.directive.js @@ -9,7 +9,8 @@ export default '$q', '$filter', '$state', - function(templateUrl, Wait, Rest, GetBasePath, ProcessErrors, Prompt, $q, $filter, $state) { + 'i18n', + function(templateUrl, Wait, Rest, GetBasePath, ProcessErrors, Prompt, $q, $filter, $state, i18n) { return { restrict: 'E', scope: { @@ -89,10 +90,10 @@ export default }; Prompt({ - hdr: 'Remove Label from ' + template.name , + hdr: i18n._('Remove Label from ') + template.name, body: '
Confirm the removal of the ' + $filter('sanitize')(label.name) + ' label.
', action: action, - actionText: 'REMOVE' + actionText: i18n._('REMOVE') }); }; diff --git a/awx/ui/client/src/templates/prompt/prompt.controller.js b/awx/ui/client/src/templates/prompt/prompt.controller.js index 82e42ca7eb..666cab0fab 100644 --- a/awx/ui/client/src/templates/prompt/prompt.controller.js +++ b/awx/ui/client/src/templates/prompt/prompt.controller.js @@ -1,8 +1,5 @@ -export default [ 'Rest', 'GetBasePath', 'ProcessErrors', 'CredentialTypeModel', 'TemplatesStrings', - function (Rest, GetBasePath, ProcessErrors, CredentialType, strings) { - - // strings.get('deleteResource.HEADER') - // ${strings.get('deleteResource.CONFIRM', 'template')} +export default [ 'ProcessErrors', 'CredentialTypeModel', 'TemplatesStrings', + function (ProcessErrors, CredentialType, strings) { const vm = this || {}; @@ -186,7 +183,7 @@ export default [ 'Rest', 'GetBasePath', 'ProcessErrors', 'CredentialTypeModel', } vm.steps.preview.tab.order = order; vm.steps.preview.tab._disabled = vm.readOnlyPrompts ? false : true; - modal.show('PROMPT'); + modal.show(strings.get('prompt.PROMPT')); vm.promptData.triggerModalOpen = false; modal.onClose = () => { diff --git a/awx/ui/client/src/templates/prompt/steps/credential/prompt-credential.directive.js b/awx/ui/client/src/templates/prompt/steps/credential/prompt-credential.directive.js index 8d971dfff8..d629d4a984 100644 --- a/awx/ui/client/src/templates/prompt/steps/credential/prompt-credential.directive.js +++ b/awx/ui/client/src/templates/prompt/steps/credential/prompt-credential.directive.js @@ -6,8 +6,8 @@ import promptCredentialController from './prompt-credential.controller'; -export default [ 'templateUrl', '$compile', 'generateList', - (templateUrl, $compile, GenerateList) => { +export default [ 'templateUrl', '$compile', 'generateList', 'i18n', + (templateUrl, $compile, GenerateList, i18n) => { return { scope: { promptData: '=', @@ -34,7 +34,7 @@ export default [ 'templateUrl', '$compile', 'generateList', if(credKind && scope.promptData.prompts.credentials.credentialTypes[credKind] === "vault") { list.fields.name.modalColumnClass = 'col-md-6'; list.fields.info = { - label: 'Vault ID', + label: i18n._('Vault ID'), ngBind: 'credential.inputs.vault_id', key: false, nosort: true, diff --git a/awx/ui/client/src/templates/survey-maker/shared/question-definition.form.js b/awx/ui/client/src/templates/survey-maker/shared/question-definition.form.js index 817dff15e2..86c188fdcf 100644 --- a/awx/ui/client/src/templates/survey-maker/shared/question-definition.form.js +++ b/awx/ui/client/src/templates/survey-maker/shared/question-definition.form.js @@ -44,9 +44,9 @@ export default ['i18n', function(i18n){ label: i18n._('Answer Variable Name'), control: '
'+ - '
Please enter an answer variable name.
'+ - '
Please remove the illegal character from the survey question variable name.
'+ - '
This question variable is already in use. Please enter a different variable name.
' + + '
' + i18n._('Please enter an answer variable name.') + '
'+ + '
' + i18n._('Please remove the illegal character from the survey question variable name.') + '
'+ + '
' + i18n._('This question variable is already in use. Please enter a different variable name.') + '
' + '
'+ '
', awPopOver: i18n._("The suggested format for variable names is lowercase and underscore-separated (for example, foo_bar, user_id, host_name, etc.). Variable names with spaces are not allowed."), @@ -89,15 +89,15 @@ export default ['i18n', function(i18n){ type: 'custom', control:'
'+ '
'+ - ''+ - '
The minimum length you entered is not a valid number. Please enter a whole number.
'+ - '
The minimium length is too high. Please enter a lower number.
'+ - '
The minimum length is too low. Please enter a positive number.
'+ + ''+ + '
' + i18n._('The minimum length you entered is not a valid number. Please enter a whole number.') + '
'+ + '
' + i18n._('The minimium length is too high. Please enter a lower number.') + '
'+ + '
' + i18n._('The minimum length is too low. Please enter a positive number.') + '
'+ '
'+ '
'+ - ''+ - '
The maximum length you entered is not a valid number. Please enter a whole nnumber.
'+ - '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ + ''+ + '
' + i18n._('The maximum length you entered is not a valid number. Please enter a whole nnumber.') + '
'+ + '
' + i18n._('The maximum length is too low. Please enter a number larger than the minimum length you set.') + '
'+ '
'+ '
', ngShow: 'type.type==="text" ', @@ -110,15 +110,15 @@ export default ['i18n', function(i18n){ type: 'custom', control:'
'+ '
'+ - ''+ - '
The minimum length you entered is not a valid number. Please enter a whole number.
'+ - '
The minimium length is too high. Please enter a lower number.
'+ - '
The minimum length is too low. Please enter a positive number.
'+ + ''+ + '
' + i18n._('The minimum length you entered is not a valid number. Please enter a whole number.') + '
'+ + '
' + i18n._('The minimium length is too high. Please enter a lower number.') + '
'+ + '
' + i18n._('The minimum length is too low. Please enter a positive number.') + '
'+ '
'+ '
'+ - ''+ - '
The maximum length you entered is not a valid number. Please enter a whole number.
'+ - '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ + ''+ + '
' + i18n._('The maximum length you entered is not a valid number. Please enter a whole number.') + '
'+ + '
' + i18n._('The maximum length is too low. Please enter a number larger than the minimum length you set.') + '
'+ '
'+ '
', ngShow: 'type.type==="textarea" ', @@ -131,15 +131,15 @@ export default ['i18n', function(i18n){ type: 'custom', control:'
'+ '
'+ - ''+ - '
The minimum length you entered is not a valid number. Please enter a whole number.
'+ - '
The minimium length is too high. Please enter a lower number.
'+ - '
The minimum length is too low. Please enter a positive number.
'+ + ''+ + '
' + i18n._('The minimum length you entered is not a valid number. Please enter a whole number.') + '
'+ + '
' + i18n._('The minimium length is too high. Please enter a lower number.') + '
'+ + '
' + i18n._('The minimum length is too low. Please enter a positive number.') + '
'+ '
'+ '
'+ - ''+ - '
The maximum length you entered is not a valid number. Please enter a whole number.
'+ - '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ + ''+ + '
' + i18n._('The maximum length you entered is not a valid number. Please enter a whole number.') + '
'+ + '
' + i18n._('The maximum length is too low. Please enter a number larger than the minimum length you set.') + '
'+ '
'+ '
', ngShow: 'type.type==="password" ', @@ -153,14 +153,14 @@ export default ['i18n', function(i18n){ type: 'custom', control:'
'+ '
'+ - ''+ - '
Please enter a valid integer.
'+ - '
Please enter a smaller integer.
'+ + ''+ + '
' + i18n._('Please enter a valid integer.') + '
'+ + '
' + i18n._('Please enter a smaller integer.') + '
'+ '
'+ '
'+ - ''+ - '
Please enter a valid integer.
'+ - '
Please enter a larger integer.
'+ + ''+ + '
' + i18n._('Please enter a valid integer.') + '
'+ + '
' + i18n._('Please enter a larger integer.') + '
'+ '
'+ '
', ngShow: 'type.type==="integer" ', @@ -173,14 +173,14 @@ export default ['i18n', function(i18n){ type: 'custom', control: '
'+ '
'+ - ''+ - '
Please enter a valid float.
'+ - '
Please enter a smaller float.
'+ + ''+ + '
' + i18n._('Please enter a valid float.') + '
'+ + '
' + i18n._('Please enter a smaller float.') + '
'+ '
'+ '
'+ - ''+ - '
Please enter a valid float.
'+ - '
Please enter a larger float.
'+ + ''+ + '
' + i18n._('Please enter a valid float.') + '
'+ + '
' + i18n._('Please enter a larger float.') + '
'+ '
'+ '
', @@ -193,12 +193,12 @@ export default ['i18n', function(i18n){ realName: 'default_answer', type: 'custom' , control: '
'+ - ''+ + ''+ '
'+ ''+ - '
Please enter an answer from the choices listed.
' + - '
The answer is shorter than the minimium length. Please make the answer longer.
' + - '
The answer is longer than the maximum length. Please make the answer shorter.
' + + '
' + i18n._('Please enter an answer from the choices listed.') + '
' + + '
' + i18n._('The answer is shorter than the minimium length. Please make the answer longer.') + '
' + + '
' + i18n._('The answer is longer than the maximum length. Please make the answer shorter.') + '
' + '
'+ '
'+ '
', @@ -210,10 +210,10 @@ export default ['i18n', function(i18n){ realName: 'default_answer' , type: 'custom', control: '
'+ - ''+ + ''+ '
'+ ''+ - '
Please enter an answer/answers from the choices listed.
' + + '
' + i18n._('Please enter an answer/answers from the choices listed.') + '
' + '
'+ '
'+ '
', @@ -225,11 +225,11 @@ export default ['i18n', function(i18n){ realName: 'default_answer', type: 'custom', control: '
'+ - ''+ + ''+ ''+ - '
Please enter a valid integer.
'+ - '
Please enter a minimum default of {{int_min}}.
'+ - '
Please enter a maximum default of {{int_max}}.
'+ + '
' + i18n._('Please enter a valid integer.') + '
'+ + '
' + i18n._('Please enter a minimum default of {{int_min}}.') + '
'+ + '
' + i18n._('Please enter a maximum default of {{int_max}}.') + '
'+ '
', column: 2, ngShow: 'type.type === "integer" ', @@ -239,11 +239,11 @@ export default ['i18n', function(i18n){ realName: 'default_answer', type: 'custom', control: '
'+ - ''+ + ''+ ''+ - '
Please enter a valid float.
'+ - '
Please enter a minimum default of {{float_min}}.
'+ - '
Please enter a maximum default of {{float_max}}.
'+ + '
' + i18n._('Please enter a valid float.') + '
'+ + '
' + i18n._('Please enter a minimum default of {{float_min}}.') + '
'+ + '
' + i18n._('Please enter a maximum default of {{float_max}}.') + '
'+ '
', column: 2, ngShow: 'type.type=== "float" ', @@ -253,11 +253,11 @@ export default ['i18n', function(i18n){ realName: "default_answer" , type: 'custom', control: '
'+ - ''+ + ''+ '
'+ ''+ - '
The answer is shorter than the minimium length. Please make the answer longer.
' + - '
The answer is longer than the maximum length. Please make the answer shorter.
' + + '
' + i18n._('The answer is shorter than the minimium length. Please make the answer longer.') + '
' + + '
' + i18n._('The answer is longer than the maximum length. Please make the answer shorter.') + '
' + '
'+ '
'+ '
', @@ -269,16 +269,16 @@ export default ['i18n', function(i18n){ realName: 'default_answer' , type: 'custom' , control: '
'+ - ''+ + ''+ '
'+ '
'+ ''+ - ''+ + ''+ ''+ ''+ '
'+ - '
The answer is shorter than the minimium length. Please make the answer longer.
' + - '
The answer is longer than the maximum length. Please make the answer shorter.
' + + '
' + i18n._('The answer is shorter than the minimium length. Please make the answer longer.') + '
' + + '
' + i18n._('The answer is longer than the maximum length. Please make the answer shorter.') + '
' + '
'+ '
'+ '
', @@ -309,4 +309,4 @@ export default ['i18n', function(i18n){ } } }; -}]; +}]; \ No newline at end of file diff --git a/awx/ui/client/src/users/users.form.js b/awx/ui/client/src/users/users.form.js index 85b1aa20df..056bba1319 100644 --- a/awx/ui/client/src/users/users.form.js +++ b/awx/ui/client/src/users/users.form.js @@ -219,7 +219,7 @@ export default ['i18n', function(i18n) { actions: { add: { ngClick: "$state.go('.add')", - label: 'Add', + label: i18n._('Add'), awToolTip: i18n._('Grant Permission'), actionClass: 'at-Button--add', actionId: 'button-add', diff --git a/awx/ui/client/src/workflow-results/workflow-results.controller.js b/awx/ui/client/src/workflow-results/workflow-results.controller.js index 9870d2c7b1..fbbcaf635f 100644 --- a/awx/ui/client/src/workflow-results/workflow-results.controller.js +++ b/awx/ui/client/src/workflow-results/workflow-results.controller.js @@ -120,6 +120,7 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions', $scope.labels = jobLabels; $scope.showManualControls = false; $scope.readOnly = true; + $scope.count = count.val; // Start elapsed time updater for job known to be running if ($scope.workflow.started !== null && $scope.workflow.status === 'running') { @@ -287,6 +288,9 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions', $scope.$broadcast("refreshWorkflowChart"); } }); + + $scope.count = workflowResultsService + .getCounts($scope.graphState.arrayOfNodesForChart); } getLabelsAndTooltips(); }); diff --git a/awx/ui/client/src/workflow-results/workflow-results.route.js b/awx/ui/client/src/workflow-results/workflow-results.route.js index 06fbb5f814..85d81cc49d 100644 --- a/awx/ui/client/src/workflow-results/workflow-results.route.js +++ b/awx/ui/client/src/workflow-results/workflow-results.route.js @@ -26,7 +26,7 @@ export default { controller: workflowResultsController, resolve: { // the GET for the particular workflow - workflowData: ['Rest', 'GetBasePath', '$stateParams', '$q', '$state', 'Alert', function(Rest, GetBasePath, $stateParams, $q, $state, Alert) { + workflowData: ['Rest', 'GetBasePath', '$stateParams', '$q', '$state', 'Alert', 'i18n', function(Rest, GetBasePath, $stateParams, $q, $state, Alert, i18n) { Rest.setUrl(GetBasePath('workflow_jobs') + $stateParams.id); var defer = $q.defer(); Rest.get() @@ -36,9 +36,9 @@ export default { defer.reject(data); if (data.status === 404) { - Alert('Job Not Found', 'Cannot find job.', 'alert-info'); + Alert(i18n._('Job Not Found'), i18n._('Cannot find job.'), 'alert-info'); } else if (data.status === 403) { - Alert('Insufficient Permissions', 'You do not have permission to view this job.', 'alert-info'); + Alert(i18n._('Insufficient Permissions'), i18n._('You do not have permission to view this job.'), 'alert-info'); } $state.go('jobs'); diff --git a/awx/ui/client/src/workflow-results/workflow-results.service.js b/awx/ui/client/src/workflow-results/workflow-results.service.js index 6fbfc59371..ea180d34b8 100644 --- a/awx/ui/client/src/workflow-results/workflow-results.service.js +++ b/awx/ui/client/src/workflow-results/workflow-results.service.js @@ -5,13 +5,15 @@ *************************************************/ -export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'WorkflowJobModel', '$interval', 'moment', 'ComponentsStrings', function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, WorkflowJob, $interval, moment, strings) { +export default ['i18n', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'WorkflowJobModel', '$interval', 'moment', 'ComponentsStrings', function (i18n, Prompt, $filter, Wait, Rest, $state, ProcessErrors, WorkflowJob, $interval, moment, strings) { var val = { getCounts: function(workflowNodes){ var nodeArr = []; workflowNodes.forEach(node => { if(node && node.summary_fields && node.summary_fields.job && node.summary_fields.job.status){ nodeArr.push(node.summary_fields.job.status); + } else if (_.has(node, 'job.status')) { + nodeArr.push(node.job.status); } }); // use the workflow nodes data populate above to get the count @@ -34,10 +36,10 @@ export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErr }, deleteJob: function(workflow) { Prompt({ - hdr: 'Delete Job', + hdr: i18n._('Delete Job'), resourceName: `#${workflow.id} ` + $filter('sanitize')(workflow.name), body: `
- Are you sure you want to delete this workflow? + ${i18n._('Are you sure you want to delete this workflow?')}
`, action: function() { Wait('start'); @@ -52,13 +54,12 @@ export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErr Wait('stop'); $('#prompt-modal').modal('hide'); ProcessErrors(null, obj, status, null, { - hdr: 'Error!', - msg: `Could not delete job. - Returned status: ${status}` + hdr: i18n._('Error!'), + msg: `${i18n._('Could not delete job. Returned status: ' + status)}` }); }); }, - actionText: 'DELETE' + actionText: i18n._('DELETE') }); }, cancelJob: function(workflow) { @@ -73,18 +74,17 @@ export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErr Wait('stop'); $('#prompt-modal').modal('hide'); ProcessErrors(null, obj, status, null, { - hdr: 'Error!', - msg: `Could not cancel workflow. - Returned status: ${status}` + hdr: i18n._('Error!'), + msg: `${i18n._('Could not cancel workflow. Returned status: ' + status)}` }); }); }; Prompt({ - hdr: 'Cancel Workflow', + hdr: i18n._('Cancel Workflow'), resourceName: `#${workflow.id} ${$filter('sanitize')(workflow.name)}`, body: `
- Are you sure you want to cancel this workflow job? + ${i18n._('Are you sure you want to cancel this workflow job?')}
`, action: function() { Wait('start'); @@ -96,14 +96,13 @@ export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErr } else { $('#prompt-modal').modal('hide'); ProcessErrors(null, data, null, null, { - hdr: 'Error!', - msg: `Job has completed, - unabled to be canceled.` + hdr: i18n._('Error!'), + msg: `${i18n._('Job has completed. Unable to be canceled.')}` }); } }); }, - actionText: 'PROCEED' + actionText: i18n._('PROCEED') }); }, relaunchJob: function(scope) { diff --git a/awx/ui/client/src/workflow-results/workflow-status-bar/workflow-status-bar.directive.js b/awx/ui/client/src/workflow-results/workflow-status-bar/workflow-status-bar.directive.js index c53fc2dcba..8ffe84beae 100644 --- a/awx/ui/client/src/workflow-results/workflow-status-bar/workflow-status-bar.directive.js +++ b/awx/ui/client/src/workflow-results/workflow-status-bar/workflow-status-bar.directive.js @@ -4,13 +4,14 @@ * All Rights Reserved *************************************************/ -export default [ 'templateUrl', - function(templateUrl) { +export default [ 'templateUrl', 'OutputStrings', + function(templateUrl, OutputStrings) { return { scope: true, templateUrl: templateUrl('workflow-results/workflow-status-bar/workflow-status-bar'), restrict: 'E', link: function(scope) { + scope.strings = OutputStrings; // as count is changed by jobs coming in, // update the workflow status bar scope.$watch('count', function(val) { @@ -22,10 +23,21 @@ export default [ 'templateUrl', $(`.WorkflowStatusBar-${key}`) .css('flex', `${val[key]} 0 auto`); + let tooltipLabel = key; + + switch(key) { + case 'successful': + tooltipLabel = scope.strings.get('workflow_status.SUCCESSFUL'); + break; + case 'failed': + tooltipLabel = scope.strings.get('workflow_status.FAILED'); + break; + } + // set the tooltip to give how many jobs of // each type if (val[key] > 0) { - scope[`${key}CountTip`] = `${key}${val[key]}`; + scope[`${key}CountTip`] = `${tooltipLabel}${val[key]}`; } }); diff --git a/awx/ui/client/src/workflow-results/workflow-status-bar/workflow-status-bar.partial.html b/awx/ui/client/src/workflow-results/workflow-status-bar/workflow-status-bar.partial.html index c2bc7d87a5..0a7c2f07f3 100644 --- a/awx/ui/client/src/workflow-results/workflow-status-bar/workflow-status-bar.partial.html +++ b/awx/ui/client/src/workflow-results/workflow-status-bar/workflow-status-bar.partial.html @@ -2,13 +2,17 @@
+ data-tip-watch="successfulCountTip"> +
+ data-tip-watch="failedCountTip"> +
- + data-placement="top"> + + \ No newline at end of file diff --git a/awx/ui/test/spec/workflow--results/workflow-results.service-test.js b/awx/ui/test/spec/workflow--results/workflow-results.service-test.js index f7d6a80426..8a1bd3b94c 100644 --- a/awx/ui/test/spec/workflow--results/workflow-results.service-test.js +++ b/awx/ui/test/spec/workflow--results/workflow-results.service-test.js @@ -6,7 +6,7 @@ describe('workflowResultsService', () => { let $interval; beforeEach(angular.mock.module('workflowResults', ($provide) => { - ['PromptDialog', 'Prompt', 'Wait', 'Rest', 'ProcessErrors', '$state', 'WorkflowJobModel', 'ComponentsStrings'] + ['i18n', 'PromptDialog', 'Prompt', 'Wait', 'Rest', 'ProcessErrors', '$state', 'WorkflowJobModel', 'ComponentsStrings'] .forEach(function(item) { $provide.value(item, {}); });