diff --git a/awx/ui/client/src/inventories-hosts/hosts/host.list.js b/awx/ui/client/src/inventories-hosts/hosts/host.list.js index 865d3eb108..747294c31c 100644 --- a/awx/ui/client/src/inventories-hosts/hosts/host.list.js +++ b/awx/ui/client/src/inventories-hosts/hosts/host.list.js @@ -79,17 +79,15 @@ export default ['i18n', function(i18n) { columnClass: 'col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right', edit: { - //label: 'Edit', ngClick: "editHost(host.id)", icon: 'icon-edit', - awToolTip: 'Edit host', + awToolTip: i18n._('Edit host'), dataPlacement: 'top', ngShow: 'host.summary_fields.user_capabilities.edit' }, view: { - //label: 'Edit', ngClick: "editHost(host.id)", - awToolTip: 'View host', + awToolTip: i18n._('View host'), dataPlacement: 'top', ngShow: '!host.summary_fields.user_capabilities.edit' } @@ -98,18 +96,18 @@ export default ['i18n', function(i18n) { actions: { refresh: { mode: 'all', - awToolTip: "Refresh the page", + awToolTip: i18n._("Refresh the page"), ngClick: "refreshGroups()", ngShow: "socketStatus == 'error'", actionClass: 'btn List-buttonDefault', - buttonContent: 'REFRESH' + buttonContent: i18n._('REFRESH') }, smart_inventory: { mode: 'all', ngClick: "smartInventory()", - awToolTip: "Create a new Smart Inventory from search results.", + awToolTip: i18n._("Create a new Smart Inventory from search results."), actionClass: 'btn List-buttonDefault', - buttonContent: 'SMART INVENTORY', + buttonContent: i18n._('SMART INVENTORY'), ngShow: 'canAdd && (hosts.length > 0 || !(searchTags | isEmpty))', dataPlacement: "top", ngDisabled: '!enableSmartInventoryButton' diff --git a/awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html b/awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html index 1f11db98bb..cedb83b6bd 100644 --- a/awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html +++ b/awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html @@ -33,9 +33,9 @@
| - | Actions | +Actions | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
-
-
+
+
|
diff --git a/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.list.js b/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.list.js
index 103eeca93f..cbfc11a083 100644
--- a/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.list.js
+++ b/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.list.js
@@ -4,66 +4,68 @@
* All Rights Reserved
*************************************************/
-export default {
- name: 'groups',
- iterator: 'group',
- editTitle: '{{ host.name }}',
- well: true,
- wellOverride: true,
- index: false,
- hover: true,
- trackBy: 'group.id',
- basePath: 'api/v2/hosts/{{$stateParams.host_id}}/groups/',
+export default ['i18n', function(i18n) {
+ return {
+ name: 'groups',
+ iterator: 'group',
+ editTitle: '{{ host.name }}',
+ well: true,
+ wellOverride: true,
+ index: false,
+ hover: true,
+ trackBy: 'group.id',
+ basePath: 'api/v2/hosts/{{$stateParams.host_id}}/groups/',
- fields: {
- failed_hosts: {
- label: '',
- nosort: true,
- mode: 'all',
- iconOnly: true,
- awToolTip: "{{ group.hosts_status_tip }}",
- dataPlacement: "top",
- icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
- columnClass: 'status-column List-staticColumn--smallStatus'
+ fields: {
+ failed_hosts: {
+ label: '',
+ nosort: true,
+ mode: 'all',
+ iconOnly: true,
+ awToolTip: "{{ group.hosts_status_tip }}",
+ dataPlacement: "top",
+ icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
+ columnClass: 'status-column List-staticColumn--smallStatus'
+ },
+ name: {
+ label: i18n._('Groups'),
+ key: true,
+ ngClick: "editGroup(group.id)",
+ columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
+ class: 'InventoryManage-breakWord',
+ }
},
- name: {
- label: 'Groups',
- key: true,
- ngClick: "editGroup(group.id)",
- columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
- class: 'InventoryManage-breakWord',
- }
- },
- actions: {
- refresh: {
- mode: 'all',
- awToolTip: "Refresh the page",
- ngClick: "refreshGroups()",
- ngShow: "socketStatus == 'error'",
- actionClass: 'btn List-buttonDefault',
- buttonContent: 'REFRESH'
+ actions: {
+ refresh: {
+ mode: 'all',
+ awToolTip: i18n._("Refresh the page"),
+ ngClick: "refreshGroups()",
+ ngShow: "socketStatus == 'error'",
+ actionClass: 'btn List-buttonDefault',
+ buttonContent: i18n._('REFRESH')
+ },
+ associate: {
+ mode: 'all',
+ ngClick: "associateGroup()",
+ awToolTip: i18n._("Associate this host with a new group"),
+ actionClass: 'btn List-buttonSubmit',
+ buttonContent: '+ ' + i18n._('ASSOCIATE GROUP'),
+ ngShow: 'canAdd',
+ dataPlacement: "top",
+ }
},
- associate: {
- mode: 'all',
- ngClick: "associateGroup()",
- awToolTip: "Associate this host with a new group",
- actionClass: 'btn List-buttonSubmit',
- buttonContent: '+ ASSOCIATE GROUP',
- ngShow: 'canAdd',
- dataPlacement: "top",
- }
- },
- fieldActions: {
- columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
- "delete": {
- //label: 'Delete',
- mode: 'all',
- ngClick: "disassociateHost(group)",
- awToolTip: 'Disassociate host',
- dataPlacement: "top",
- ngShow: "group.summary_fields.user_capabilities.delete"
+ fieldActions: {
+ columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
+ "delete": {
+ //label: 'Delete',
+ mode: 'all',
+ ngClick: "disassociateHost(group)",
+ awToolTip: i18n._('Disassociate host'),
+ dataPlacement: "top",
+ ngShow: "group.summary_fields.user_capabilities.delete"
+ }
}
- }
-};
+ };
+}];
diff --git a/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.partial.html b/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.partial.html
index 3003e1a212..4660f008cb 100644
--- a/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.partial.html
+++ b/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.partial.html
@@ -3,7 +3,7 @@
- Disassociate Host
+ Disassociate Host
diff --git a/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc-credential.route.js b/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc-credential.route.js
index 9ec32d6b04..173c77f445 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc-credential.route.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc-credential.route.js
@@ -30,9 +30,9 @@ export default {
}
},
resolve: {
- ListDefinition: ['CredentialList', function(CredentialList) {
+ ListDefinition: ['CredentialList', 'i18n', function(CredentialList, i18n) {
let list = _.cloneDeep(CredentialList);
- list.lookupConfirmText = 'SELECT';
+ list.lookupConfirmText = i18n._('SELECT');
return list;
}],
Dataset: ['ListDefinition', 'QuerySet', '$stateParams', 'GetBasePath',
diff --git a/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.form.js b/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.form.js
index c58068deb6..3e0eeb67d6 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.form.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.form.js
@@ -12,23 +12,22 @@
export default ['i18n', function(i18n) {
return {
- addTitle: 'EXECUTE COMMAND',
+ addTitle: i18n._('EXECUTE COMMAND'),
name: 'adhoc',
well: true,
forceListeners: true,
fields: {
module_name: {
- label: 'Module',
+ label: i18n._('Module'),
excludeModal: true,
type: 'select',
ngOptions: 'module.label for module in adhoc_module_options' +
' track by module.value',
ngChange: 'moduleChange()',
required: true,
- awPopOver:'
-
Are you sure you want to disassociate the host below from {{disassociateGroup.name}}?
+ Are you sure you want to disassociate the host below from {{disassociateGroup.name}}?
{{ host.name }}
These are the modules that Tower supports ' + - 'running commands against.', - dataTitle: 'Module', + awPopOver: i18n._('These are the modules that Tower supports running commands against.'), + dataTitle: i18n._('Module'), dataPlacement: 'right', dataContainer: 'body' }, @@ -37,13 +36,13 @@ export default ['i18n', function(i18n) { type: 'text', awPopOverWatch: 'argsPopOver', awPopOver: '{{ argsPopOver }}', - dataTitle: 'Arguments', + dataTitle: i18n._('Arguments'), dataPlacement: 'right', dataContainer: 'body', autocomplete: false }, limit: { - label: 'Limit', + label: i18n._('Limit'), type: 'text', awPopOver: ' The pattern used to target hosts in the ' + @@ -53,12 +52,12 @@ export default ['i18n', function(i18n) { 'here. ', - dataTitle: 'Limit', + dataTitle: i18n._('Limit'), dataPlacement: 'right', dataContainer: 'body' }, credential: { - label: 'Machine Credential', + label: i18n._('Machine Credential'), type: 'lookup', list: 'CredentialList', basePath: 'credentials', @@ -70,7 +69,7 @@ export default ['i18n', function(i18n) { 'Choose the credential containing ' + 'the username and SSH key or password that Ansbile ' + 'will need to log into the remote hosts.', - dataTitle: 'Credential', + dataTitle: i18n._('Credential'), dataPlacement: 'right', dataContainer: 'body', awRequiredWhen: { @@ -79,17 +78,17 @@ export default ['i18n', function(i18n) { } }, become_enabled: { - label: 'Enable Privilege Escalation', + label: i18n._('Enable Privilege Escalation'), type: 'checkbox', column: 2, awPopOver: "If enabled, run this playbook as an administrator. This is the equivalent of passing the These are the verbosity levels for standard ' + 'out of the command run that are supported.', - dataTitle: 'Verbosity', + dataTitle: i18n._('Verbosity'), dataPlacement: 'right', dataContainer: 'body', "default": 1 }, forks: { - label: 'Forks', + label: i18n._('Forks'), id: 'forks-number', type: 'number', integer: true, @@ -117,7 +116,7 @@ export default ['i18n', function(i18n) { awPopOver: ' The number of parallel or simultaneous processes to use while executing the command. 0 signifies ' + 'the default value from the ansible configuration file. ', - dataTitle: 'Forks', + dataTitle: i18n._('Forks'), dataPlacement: 'right', dataContainer: "body" }, @@ -143,11 +142,11 @@ export default ['i18n', function(i18n) { reset: { ngClick: 'formReset()', ngDisabled: true, - label: 'Reset', + label: i18n._('Reset'), 'class': 'btn btn-sm Form-cancelButton' }, launch: { - label: 'Save', + label: i18n._('Save'), ngClick: 'launchJob()', ngDisabled: true, 'class': 'btn btn-sm List-buttonSubmit launchButton' diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.directive.js b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.directive.js index cc732bedbe..17a10e0f93 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.directive.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.directive.js @@ -1,5 +1,5 @@ -export default ['templateUrl', 'Wait', '$filter', '$compile', - function(templateUrl, Wait, $filter, $compile) { +export default ['templateUrl', 'Wait', '$filter', '$compile', 'i18n', + function(templateUrl, Wait, $filter, $compile, i18n) { return { restrict: 'E', replace: false, @@ -50,9 +50,9 @@ export default ['templateUrl', 'Wait', '$filter', '$compile', html = "
No recent job data available for this inventory. \n"; + html = "" + i18n._("No recent job data available for this inventory.") + " \n"; } attachElem(event, html, title); }; 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 c74b819df5..87e89f8fed 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 @@ -13,7 +13,7 @@ function InventoriesList($scope, $filter, Rest, InventoryList, Prompt, ProcessErrors, GetBasePath, Wait, $state, - Dataset, canAdd) { + Dataset, canAdd, i18n) { let list = InventoryList, defaultUrl = GetBasePath('inventory'); @@ -40,33 +40,33 @@ function InventoriesList($scope, if (inventory.has_inventory_sources) { if (inventory.inventory_sources_with_failures > 0) { inventory.syncStatus = 'error'; - inventory.syncTip = inventory.inventory_sources_with_failures + ' sources with sync failures. Click for details'; + inventory.syncTip = inventory.inventory_sources_with_failures + i18n._(' sources with sync failures. Click for details'); } else { inventory.syncStatus = 'successful'; - inventory.syncTip = 'No inventory sync failures. Click for details.'; + inventory.syncTip = i18n._('No inventory sync failures. Click for details.'); } } else { inventory.syncStatus = 'na'; - inventory.syncTip = 'Not configured for inventory sync.'; + inventory.syncTip = i18n._('Not configured for inventory sync.'); inventory.launch_class = "btn-disabled"; } if (inventory.has_active_failures) { inventory.hostsStatus = 'error'; - inventory.hostsTip = inventory.hosts_with_active_failures + ' hosts with failures. Click for details.'; + inventory.hostsTip = inventory.hosts_with_active_failures + i18n._(' hosts with failures. Click for details.'); } else if (inventory.total_hosts) { inventory.hostsStatus = 'successful'; - inventory.hostsTip = 'No hosts with failures. Click for details.'; + inventory.hostsTip = i18n._('No hosts with failures. Click for details.'); } else { inventory.hostsStatus = 'none'; - inventory.hostsTip = 'Inventory contains 0 hosts.'; + inventory.hostsTip = i18n._('Inventory contains 0 hosts.'); } - inventory.kind_label = inventory.kind === '' ? 'Inventory' : (inventory.kind === 'smart' ? 'Smart Inventory': 'Inventory'); + inventory.kind_label = inventory.kind === '' ? 'Inventory' : (inventory.kind === 'smart' ? i18n._('Smart Inventory'): i18n._('Inventory')); } $scope.editInventory = function (inventory) { @@ -97,10 +97,10 @@ function InventoriesList($scope, Prompt({ hdr: 'Delete', - body: 'Are you sure you want to delete the inventory below? ' + $filter('sanitize')(name) + ' ' +
- 'Note: The inventory will be in a pending status until the final delete is processed. ',
+ body: '' + i18n._('Are you sure you want to delete the inventory below?') + ' ' + $filter('sanitize')(name) + ' ' +
+ 'Note: ' + i18n._('The inventory will be in a pending status until the final delete is processed.') + ' ',
action: action,
- actionText: 'DELETE'
+ actionText: i18n._('DELETE')
});
};
@@ -129,5 +129,5 @@ function InventoriesList($scope,
export default ['$scope',
'$filter', 'Rest', 'InventoryList', 'Prompt',
'ProcessErrors', 'GetBasePath', 'Wait',
- '$state', 'Dataset', 'canAdd', InventoriesList
+ '$state', 'Dataset', 'canAdd', 'i18n', InventoriesList
];
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 dcc9cad354..a42530cfde 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
@@ -1,5 +1,5 @@
-export default ['templateUrl', '$compile', 'Wait', '$filter',
- function(templateUrl, $compile, Wait, $filter) {
+export default ['templateUrl', '$compile', 'Wait', '$filter', 'i18n',
+ function(templateUrl, $compile, Wait, $filter, i18n) {
return {
restrict: 'E',
replace: false,
@@ -52,16 +52,16 @@ export default ['templateUrl', '$compile', 'Wait', '$filter',
html = "
|