Removed use of N_ in favor of i18n._

This commit is contained in:
Michael Abashian
2017-07-06 11:01:58 -04:00
parent 3d3ee33290
commit 819308dd6c
2 changed files with 142 additions and 143 deletions

View File

@@ -4,9 +4,8 @@
* All Rights Reserved * All Rights Reserved
*************************************************/ *************************************************/
import { N_ } from '../../../../../../i18n'; export default ['i18n', function(i18n) {
return {
export default {
name: 'nested_hosts', name: 'nested_hosts',
iterator: 'nested_host', iterator: 'nested_host',
editTitle: '{{ nested_host.name }}', // i don't think this is correct editTitle: '{{ nested_host.name }}', // i don't think this is correct
@@ -28,9 +27,9 @@ export default {
type: "toggle", type: "toggle",
ngClick: "toggleHost($event, nested_host)", ngClick: "toggleHost($event, nested_host)",
awToolTip: "<p>" + awToolTip: "<p>" +
N_("Indicates if a host is available and should be included in running jobs.") + i18n._("Indicates if a host is available and should be included in running jobs.") +
"</p><p>" + "</p><p>" +
N_("For hosts that are part of an external" + i18n._("For hosts that are part of an external" +
" inventory, this flag cannot be changed. It will be" + " inventory, this flag cannot be changed. It will be" +
" set by the inventory sync process.") + " set by the inventory sync process.") +
"</p>", "</p>",
@@ -55,7 +54,7 @@ export default {
}, },
name: { name: {
key: true, key: true,
label: N_('Hosts'), label: i18n._('Hosts'),
ngClick: "editHost(nested_host.id)", ngClick: "editHost(nested_host.id)",
ngClass: "{ 'host-disabled-label': !nested_host.enabled }", ngClass: "{ 'host-disabled-label': !nested_host.enabled }",
columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7', columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
@@ -71,13 +70,13 @@ export default {
edit: { edit: {
ngClick: "editHost(nested_host.id)", ngClick: "editHost(nested_host.id)",
icon: 'icon-edit', icon: 'icon-edit',
awToolTip: N_('Edit host'), awToolTip: i18n._('Edit host'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: 'nested_host.summary_fields.user_capabilities.edit' ngShow: 'nested_host.summary_fields.user_capabilities.edit'
}, },
view: { view: {
ngClick: "editHost(nested_host.id)", ngClick: "editHost(nested_host.id)",
awToolTip: N_('View host'), awToolTip: i18n._('View host'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: '!nested_host.summary_fields.user_capabilities.edit' ngShow: '!nested_host.summary_fields.user_capabilities.edit'
}, },
@@ -85,7 +84,7 @@ export default {
//label: 'Delete', //label: 'Delete',
ngClick: "disassociateHost(nested_host)", ngClick: "disassociateHost(nested_host)",
icon: 'icon-trash', icon: 'icon-trash',
awToolTip: N_('Disassociate host'), awToolTip: i18n._('Disassociate host'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: 'nested_host.summary_fields.user_capabilities.delete' ngShow: 'nested_host.summary_fields.user_capabilities.delete'
} }
@@ -96,19 +95,19 @@ export default {
mode: 'all', mode: 'all',
ngDisabled: '!hostsSelected', ngDisabled: '!hostsSelected',
ngClick: 'setAdhocPattern()', ngClick: 'setAdhocPattern()',
awToolTip: N_("Select an inventory source by clicking the check box beside it. The inventory source can be a single group or host, a selection of multiple hosts, or a selection of multiple groups."), awToolTip: i18n._("Select an inventory source by clicking the check box beside it. The inventory source can be a single group or host, a selection of multiple hosts, or a selection of multiple groups."),
dataPlacement: 'top', dataPlacement: 'top',
actionClass: 'btn List-buttonDefault', actionClass: 'btn List-buttonDefault',
buttonContent: N_('RUN COMMANDS'), buttonContent: i18n._('RUN COMMANDS'),
showTipWhenDisabled: true, showTipWhenDisabled: true,
tooltipInnerClass: "Tooltip-wide", tooltipInnerClass: "Tooltip-wide",
// TODO: we don't always want to show this // TODO: we don't always want to show this
ngShow: true ngShow: true
}, },
system_tracking: { system_tracking: {
buttonContent: N_('System Tracking'), buttonContent: i18n._('System Tracking'),
ngClick: 'systemTracking()', ngClick: 'systemTracking()',
awToolTip: N_("Select one or two hosts by clicking the checkbox beside the host. System tracking offers the ability to compare the results of two scan runs from different dates on one host or the same date on two hosts."), awToolTip: i18n._("Select one or two hosts by clicking the checkbox beside the host. System tracking offers the ability to compare the results of two scan runs from different dates on one host or the same date on two hosts."),
dataTipWatch: "systemTrackingTooltip", dataTipWatch: "systemTrackingTooltip",
dataPlacement: 'top', dataPlacement: 'top',
awFeature: 'system_tracking', awFeature: 'system_tracking',
@@ -120,33 +119,33 @@ export default {
}, },
refresh: { refresh: {
mode: 'all', mode: 'all',
awToolTip: N_("Refresh the page"), awToolTip: i18n._("Refresh the page"),
ngClick: "refreshGroups()", ngClick: "refreshGroups()",
ngShow: "socketStatus == 'error'", ngShow: "socketStatus == 'error'",
actionClass: 'btn List-buttonDefault', actionClass: 'btn List-buttonDefault',
buttonContent: N_('REFRESH') buttonContent: i18n._('REFRESH')
}, },
add: { add: {
mode: 'all', mode: 'all',
type: 'buttonDropdown', type: 'buttonDropdown',
awToolTip: N_("Add a host"), awToolTip: i18n._("Add a host"),
actionClass: 'btn List-buttonSubmit', actionClass: 'btn List-buttonSubmit',
buttonContent: '&#43; ' + N_('ADD'), buttonContent: '&#43; ' + i18n._('ADD'),
ngShow: 'canAdd', ngShow: 'canAdd',
dataPlacement: "top", dataPlacement: "top",
options: [ options: [
{ {
optionContent: N_('Existing Host'), optionContent: i18n._('Existing Host'),
optionSref: '.associate', optionSref: '.associate',
ngShow: 'canAdd' ngShow: 'canAdd'
}, },
{ {
optionContent: N_('New Host'), optionContent: i18n._('New Host'),
optionSref: '.add', optionSref: '.add',
ngShow: 'canAdd' ngShow: 'canAdd'
} }
], ],
} }
} }
}; };
}];

View File

@@ -11,7 +11,7 @@ import addController from './group-nested-hosts-add.controller';
export default export default
angular.module('nestedHosts', []) angular.module('nestedHosts', [])
.value('NestedHostsListDefinition', nestedHostsListDefinition) .factory('NestedHostsListDefinition', nestedHostsListDefinition)
.factory('NestedHostsFormDefinition', nestedHostsFormDefinition) .factory('NestedHostsFormDefinition', nestedHostsFormDefinition)
.controller('NestedHostsAddController', addController) .controller('NestedHostsAddController', addController)
.controller('NestedHostsListController', controller); .controller('NestedHostsListController', controller);