Marking strings for translation. This covers a lot of breadcrumbs as well as login, activity stream and project list

This commit is contained in:
Michael Abashian
2017-01-28 10:28:26 -05:00
parent e5f7556fc2
commit 131a0edfb4
30 changed files with 147 additions and 111 deletions

View File

@@ -1,12 +1,13 @@
import {templateUrl} from '../shared/template-url/template-url.factory'; import {templateUrl} from '../shared/template-url/template-url.factory';
import controller from './about.controller'; import controller from './about.controller';
import { N_ } from '../i18n';
export default { export default {
name: 'setup.about', name: 'setup.about',
route: '/about', route: '/about',
controller: controller, controller: controller,
ncyBreadcrumb: { ncyBreadcrumb: {
label: "ABOUT" label: N_("ABOUT")
}, },
onExit: function(){ onExit: function(){
// hacky way to handle user browsing away via URL bar // hacky way to handle user browsing away via URL bar

View File

@@ -4,6 +4,8 @@
* All Rights Reserved * All Rights Reserved
*************************************************/ *************************************************/
import { N_ } from '../i18n';
export default { export default {
name: 'activityStream', name: 'activityStream',
route: '/activity_stream?target&id', route: '/activity_stream?target&id',
@@ -22,7 +24,7 @@ export default {
} }
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
label: "ACTIVITY STREAM" label: N_("ACTIVITY STREAM")
}, },
onExit: function() { onExit: function() {
$('#stream-detail-modal').modal('hide'); $('#stream-detail-modal').modal('hide');

View File

@@ -1,6 +1,6 @@
export default export default
['templateUrl', '$state', 'FeaturesService', 'ProcessErrors','$rootScope', 'Store', 'Empty', '$window', 'BreadCrumbService', ['templateUrl', '$state', 'FeaturesService', 'ProcessErrors','$rootScope', 'Store', 'Empty', '$window', 'BreadCrumbService', 'i18n',
function(templateUrl, $state, FeaturesService, ProcessErrors, $rootScope, Store, Empty, $window, BreadCrumbService) { function(templateUrl, $state, FeaturesService, ProcessErrors, $rootScope, Store, Empty, $window, BreadCrumbService, i18n) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: templateUrl('bread-crumb/bread-crumb'), templateUrl: templateUrl('bread-crumb/bread-crumb'),
@@ -103,7 +103,7 @@ export default
if(features){ if(features){
scope.loadingLicense = false; scope.loadingLicense = false;
scope.activityStreamActive = (toState.name === 'activityStream') ? true : false; scope.activityStreamActive = (toState.name === 'activityStream') ? true : false;
scope.activityStreamTooltip = (toState.name === 'activityStream') ? 'Hide Activity Stream' : 'View Activity Stream'; scope.activityStreamTooltip = (toState.name === 'activityStream') ? i18n._('Hide Activity Stream') : i18n._('View Activity Stream');
scope.showActivityStreamButton = (FeaturesService.featureEnabled('activity_streams') || toState.name ==='activityStream') ? true : false; scope.showActivityStreamButton = (FeaturesService.featureEnabled('activity_streams') || toState.name ==='activityStream') ? true : false;
} }
} }

View File

@@ -12,6 +12,7 @@
import ConfigurationJobsController from './jobs-form/configuration-jobs.controller'; import ConfigurationJobsController from './jobs-form/configuration-jobs.controller';
import ConfigurationSystemController from './system-form/configuration-system.controller'; import ConfigurationSystemController from './system-form/configuration-system.controller';
import ConfigurationUiController from './ui-form/configuration-ui.controller'; import ConfigurationUiController from './ui-form/configuration-ui.controller';
import { N_ } from '../i18n';
export default { export default {
name: 'configuration', name: 'configuration',
@@ -26,7 +27,7 @@
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'setup', parent: 'setup',
label: "Edit Configuration" label: N_("Edit Configuration")
}, },
controller: ConfigurationController, controller: ConfigurationController,
resolve: { resolve: {

View File

@@ -9,6 +9,7 @@ import form from './dashboard-hosts.form';
import listController from './dashboard-hosts-list.controller'; import listController from './dashboard-hosts-list.controller';
import editController from './dashboard-hosts-edit.controller'; import editController from './dashboard-hosts-edit.controller';
import service from './dashboard-hosts.service'; import service from './dashboard-hosts.service';
import { N_ } from '../../i18n';
export default export default
angular.module('dashboardHosts', []) angular.module('dashboardHosts', [])
@@ -51,7 +52,7 @@ angular.module('dashboardHosts', [])
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'dashboard', parent: 'dashboard',
label: "HOSTS" label: N_("HOSTS")
}, },
}) })
}); });

View File

@@ -12,45 +12,45 @@
export default export default
angular.module('ActivityStreamHelper', ['Utilities']) angular.module('ActivityStreamHelper', ['Utilities'])
.factory('GetTargetTitle', [ .factory('GetTargetTitle', ['i18n',
function () { function (i18n) {
return function (target) { return function (target) {
var rtnTitle = 'ALL ACTIVITY'; var rtnTitle = i18n._('ALL ACTIVITY');
switch(target) { switch(target) {
case 'project': case 'project':
rtnTitle = 'PROJECTS'; rtnTitle = i18n._('PROJECTS');
break; break;
case 'inventory': case 'inventory':
rtnTitle = 'INVENTORIES'; rtnTitle = i18n._('INVENTORIES');
break; break;
case 'credential': case 'credential':
rtnTitle = 'CREDENTIALS'; rtnTitle = i18n._('CREDENTIALS');
break; break;
case 'user': case 'user':
rtnTitle = 'USERS'; rtnTitle = i18n._('USERS');
break; break;
case 'team': case 'team':
rtnTitle = 'TEAMS'; rtnTitle = i18n._('TEAMS');
break; break;
case 'organization': case 'organization':
rtnTitle = 'ORGANIZATIONS'; rtnTitle = i18n._('ORGANIZATIONS');
break; break;
case 'job': case 'job':
rtnTitle = 'JOBS'; rtnTitle = i18n._('JOBS');
break; break;
case 'inventory_script': case 'inventory_script':
rtnTitle = 'INVENTORY SCRIPTS'; rtnTitle = i18n._('INVENTORY SCRIPTS');
break; break;
case 'schedule': case 'schedule':
rtnTitle = 'SCHEDULES'; rtnTitle = i18n._('SCHEDULES');
break; break;
case 'host': case 'host':
rtnTitle = 'HOSTS'; rtnTitle = i18n._('HOSTS');
break; break;
case 'template': case 'template':
rtnTitle = 'TEMPLATES'; rtnTitle = i18n._('TEMPLATES');
break; break;
} }

View File

@@ -12,6 +12,7 @@ import inventoryManageListRoute from './manage/inventory-manage.route';
import { copyMoveGroupRoute, copyMoveHostRoute } from './manage/copy-move/copy-move.route'; import { copyMoveGroupRoute, copyMoveHostRoute } from './manage/copy-move/copy-move.route';
import adHocRoute from './manage/adhoc/adhoc.route'; import adHocRoute from './manage/adhoc/adhoc.route';
import { templateUrl } from '../shared/template-url/template-url.factory'; import { templateUrl } from '../shared/template-url/template-url.factory';
import { N_ } from '../i18n';
export default export default
angular.module('inventory', [ angular.module('inventory', [
inventoryAdd.name, inventoryAdd.name,
@@ -55,7 +56,7 @@ angular.module('inventory', [
searchPrefix: 'schedule', searchPrefix: 'schedule',
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'inventoryManage.editGroup({group_id: parentObject.id})', parent: 'inventoryManage.editGroup({group_id: parentObject.id})',
label: 'SCHEDULES' label: N_('SCHEDULES')
}, },
resolve: { resolve: {
Dataset: ['SchedulesList', 'QuerySet', '$stateParams', 'GetBasePath', 'groupData', Dataset: ['SchedulesList', 'QuerySet', '$stateParams', 'GetBasePath', 'groupData',
@@ -89,7 +90,7 @@ angular.module('inventory', [
'@': { '@': {
templateProvider: function(SchedulesList, generateList, ParentObject) { templateProvider: function(SchedulesList, generateList, ParentObject) {
// include name of parent resource in listTitle // include name of parent resource in listTitle
SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Schedules`; SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('Schedules');
let html = generateList.build({ let html = generateList.build({
list: SchedulesList, list: SchedulesList,
mode: 'edit' mode: 'edit'
@@ -106,7 +107,7 @@ angular.module('inventory', [
name: 'inventoryManage.editGroup.schedules.add', name: 'inventoryManage.editGroup.schedules.add',
url: '/add', url: '/add',
ncyBreadcrumb: { ncyBreadcrumb: {
label: "CREATE SCHEDULE" label: N_("CREATE SCHEDULE")
}, },
views: { views: {
'form': { 'form': {

View File

@@ -5,6 +5,7 @@
*************************************************/ *************************************************/
import {templateUrl} from '../../../shared/template-url/template-url.factory'; import {templateUrl} from '../../../shared/template-url/template-url.factory';
import { N_ } from '../../../i18n';
export default { export default {
url: '/adhoc', url: '/adhoc',
@@ -22,6 +23,6 @@ export default {
} }
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
label: "RUN COMMAND" label: N_("RUN COMMAND")
} }
}; };

View File

@@ -4,6 +4,7 @@
* All Rights Reserved * All Rights Reserved
*************************************************/ *************************************************/
import {templateUrl} from '../../../shared/template-url/template-url.factory'; import {templateUrl} from '../../../shared/template-url/template-url.factory';
import { N_ } from '../../../i18n';
import CopyMoveGroupsController from './copy-move-groups.controller'; import CopyMoveGroupsController from './copy-move-groups.controller';
import CopyMoveHostsController from './copy-move-hosts.controller'; import CopyMoveHostsController from './copy-move-hosts.controller';
@@ -25,7 +26,7 @@ var copyMoveGroupRoute = {
} }
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
label: "COPY OR MOVE {{item.name}}" label: N_("COPY OR MOVE") + " {{item.name}}"
}, },
resolve: { resolve: {
Dataset: ['CopyMoveGroupList', 'QuerySet', '$stateParams', 'GetBasePath', 'group', Dataset: ['CopyMoveGroupList', 'QuerySet', '$stateParams', 'GetBasePath', 'group',
@@ -61,7 +62,7 @@ var copyMoveHostRoute = {
url: '/copy-move-host/{host_id}', url: '/copy-move-host/{host_id}',
searchPrefix: 'copy', searchPrefix: 'copy',
ncyBreadcrumb: { ncyBreadcrumb: {
label: "COPY OR MOVE {{item.name}}" label: N_("COPY OR MOVE") + " {{item.name}}"
}, },
resolve: { resolve: {
Dataset: ['CopyMoveGroupList', 'QuerySet', '$stateParams', 'GetBasePath', Dataset: ['CopyMoveGroupList', 'QuerySet', '$stateParams', 'GetBasePath',

View File

@@ -9,6 +9,7 @@ import inventoryScriptsAdd from './add/main';
import inventoryScriptsEdit from './edit/main'; import inventoryScriptsEdit from './edit/main';
import list from './inventory-scripts.list'; import list from './inventory-scripts.list';
import form from './inventory-scripts.form'; import form from './inventory-scripts.form';
import { N_ } from '../i18n';
export default export default
angular.module('inventoryScripts', [ angular.module('inventoryScripts', [
@@ -62,7 +63,7 @@ angular.module('inventoryScripts', [
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'setup', parent: 'setup',
label: 'INVENTORY SCRIPTS' label: N_('INVENTORY SCRIPTS')
} }
}) })
}); });

View File

@@ -5,6 +5,7 @@
*************************************************/ *************************************************/
import {templateUrl} from '../shared/template-url/template-url.factory'; import {templateUrl} from '../shared/template-url/template-url.factory';
import { N_ } from '../i18n';
export default { export default {
name: 'license', name: 'license',
@@ -14,7 +15,7 @@ export default {
data: {}, data: {},
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'setup', parent: 'setup',
label: 'LICENSE' label: N_('LICENSE')
}, },
resolve: { resolve: {
features: ['CheckLicense', '$rootScope', features: ['CheckLicense', '$rootScope',

View File

@@ -7,7 +7,8 @@
export default export default
angular.module('SchedulesListDefinition', []) angular.module('SchedulesListDefinition', [])
.value('SchedulesList', { .factory('StreamList', ['i18n', function(i18n) {
return {
name: 'schedules', name: 'schedules',
iterator: 'schedule', iterator: 'schedule',
@@ -30,22 +31,22 @@ export default
}, },
name: { name: {
key: true, key: true,
label: 'Name', label: i18n._('Name'),
ngClick: "editSchedule(schedule)", ngClick: "editSchedule(schedule)",
columnClass: "col-md-3 col-sm-3 col-xs-6" columnClass: "col-md-3 col-sm-3 col-xs-6"
}, },
dtstart: { dtstart: {
label: 'First Run', label: i18n._('First Run'),
filter: "longDate", filter: "longDate",
columnClass: "List-staticColumn--schedulerTime hidden-sm hidden-xs" columnClass: "List-staticColumn--schedulerTime hidden-sm hidden-xs"
}, },
next_run: { next_run: {
label: 'Next Run', label: i18n._('Next Run'),
filter: "longDate", filter: "longDate",
columnClass: "List-staticColumn--schedulerTime hidden-xs" columnClass: "List-staticColumn--schedulerTime hidden-xs"
}, },
dtend: { dtend: {
label: 'Final Run', label: i18n._('Final Run'),
filter: "longDate", filter: "longDate",
columnClass: "List-staticColumn--schedulerTime hidden-xs" columnClass: "List-staticColumn--schedulerTime hidden-xs"
}, },
@@ -54,45 +55,45 @@ export default
actions: { actions: {
refresh: { refresh: {
mode: 'all', mode: 'all',
awToolTip: "Refresh the page", awToolTip: i18n._("Refresh the page"),
ngClick: "refreshSchedules()", ngClick: "refreshSchedules()",
actionClass: 'btn List-buttonDefault', actionClass: 'btn List-buttonDefault',
ngShow: "socketStatus == 'error'", ngShow: "socketStatus == 'error'",
buttonContent: 'REFRESH' buttonContent: i18n._('REFRESH')
}, },
add: { add: {
mode: 'all', mode: 'all',
ngClick: 'addSchedule()', ngClick: 'addSchedule()',
awToolTip: 'Add a new schedule', awToolTip: i18n._('Add a new schedule'),
actionClass: 'btn List-buttonSubmit', actionClass: 'btn List-buttonSubmit',
buttonContent: '&#43; ADD', buttonContent: '&#43; ' + i18n._('ADD'),
ngShow: 'canAdd' ngShow: 'canAdd'
} }
}, },
fieldActions: { fieldActions: {
edit: { edit: {
label: 'Edit', label: i18n._('Edit'),
ngClick: "editSchedule(schedule)", ngClick: "editSchedule(schedule)",
icon: 'icon-edit', icon: 'icon-edit',
awToolTip: 'Edit schedule', awToolTip: i18n._('Edit schedule'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: 'schedule.summary_fields.user_capabilities.edit' ngShow: 'schedule.summary_fields.user_capabilities.edit'
}, },
view: { view: {
label: 'View', label: i18n._('View'),
ngClick: "editSchedule(schedule)", ngClick: "editSchedule(schedule)",
awToolTip: 'View schedule', awToolTip: i18n._('View schedule'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: '!schedule.summary_fields.user_capabilities.edit' ngShow: '!schedule.summary_fields.user_capabilities.edit'
}, },
"delete": { "delete": {
label: 'Delete', label: i18n._('Delete'),
ngClick: "deleteSchedule(schedule.id)", ngClick: "deleteSchedule(schedule.id)",
icon: 'icon-trash', icon: 'icon-trash',
awToolTip: 'Delete schedule', awToolTip: i18n._('Delete schedule'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: 'schedule.summary_fields.user_capabilities.delete' ngShow: 'schedule.summary_fields.user_capabilities.delete'
} }
} }
}); };}]);

View File

@@ -7,15 +7,16 @@
export default export default
angular.module('StreamListDefinition', []) angular.module('StreamListDefinition', [])
.value('StreamList', { .factory('StreamList', ['i18n', function(i18n) {
return {
name: 'activities', name: 'activities',
iterator: 'activity', iterator: 'activity',
basePath: 'activity_stream', basePath: 'activity_stream',
editTitle: 'Activity Stream', editTitle: i18n._('Activity Stream'),
listTitle: 'Activity Stream<span ng-show="streamSubTitle"><div class="List-titleLockup"></div>{{streamSubTitle}}<span>', listTitle: '<span translate>Activity Stream</span><span ng-show="streamSubTitle"><div class="List-titleLockup"></div>{{streamSubTitle}}<span>',
listTitleBadge: false, listTitleBadge: false,
emptyListText: 'There are no events to display at this time', emptyListText: i18n._('There are no events to display at this time'),
selectInstructions: '', selectInstructions: '',
index: false, index: false,
hover: true, hover: true,
@@ -24,7 +25,7 @@ export default
fields: { fields: {
timestamp: { timestamp: {
label: 'Time', label: i18n._('Time'),
key: true, key: true,
desc: true, desc: true,
noLink: true, noLink: true,
@@ -32,14 +33,14 @@ export default
columnClass: 'col-lg-3 col-md-2 col-sm-3 col-xs-3' columnClass: 'col-lg-3 col-md-2 col-sm-3 col-xs-3'
}, },
user: { user: {
label: 'Initiated by', label: i18n._('Initiated by'),
ngBindHtml: 'activity.user', // @todo punch monkey ngBindHtml: 'activity.user', // @todo punch monkey
sourceModel: 'actor', sourceModel: 'actor',
sourceField: 'username', sourceField: 'username',
columnClass: 'col-lg-3 col-md-3 col-sm-3 col-xs-3' columnClass: 'col-lg-3 col-md-3 col-sm-3 col-xs-3'
}, },
description: { description: {
label: 'Event', label: i18n._('Event'),
ngBindHtml: 'activity.description', // @todo punch monkey ngBindHtml: 'activity.description', // @todo punch monkey
nosort: true, nosort: true,
columnClass: 'ActivityStream-eventColumnHeader col-lg-5 col-md-6 col-sm-4 col-xs-4' columnClass: 'ActivityStream-eventColumnHeader col-lg-5 col-md-6 col-sm-4 col-xs-4'
@@ -50,7 +51,7 @@ export default
refresh: { refresh: {
mode: 'all', mode: 'all',
id: 'activity-stream-refresh-btn', id: 'activity-stream-refresh-btn',
awToolTip: "Refresh the page", awToolTip: i18n._("Refresh the page"),
ngClick: "refreshStream()", ngClick: "refreshStream()",
actionClass: 'btn List-buttonDefault ActivityStream-refreshButton', actionClass: 'btn List-buttonDefault ActivityStream-refreshButton',
buttonContent: 'REFRESH' buttonContent: 'REFRESH'
@@ -62,13 +63,13 @@ export default
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2', columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2',
view: { view: {
label: 'View', label: i18n._('View'),
ngClick: "showDetail(activity.id)", ngClick: "showDetail(activity.id)",
icon: 'fa-zoom-in', icon: 'fa-zoom-in',
"class": 'btn-default btn-xs', "class": 'btn-default btn-xs',
awToolTip: 'View event details', awToolTip: i18n._('View event details'),
dataPlacement: 'top' dataPlacement: 'top'
} }
} }
}); };}]);

View File

@@ -86,7 +86,7 @@
</div> </div>
</div> </div>
</form> </form>
<div id="login_modal_notice" class="LoginModalNotice" ng-if="customLoginInfoPresent"><div class="LoginModalNotice-title">NOTICE</div>{{ customLoginInfo | sanitize }}</div> <div id="login_modal_notice" class="LoginModalNotice" ng-if="customLoginInfoPresent"><div class="LoginModalNotice-title" translate>NOTICE</div>{{ customLoginInfo | sanitize }}</div>
</div> </div>
<div class="LoginModal-footer"> <div class="LoginModal-footer">
<div class="LoginModal-footerBlock"> <div class="LoginModal-footerBlock">

View File

@@ -4,6 +4,8 @@
* All Rights Reserved * All Rights Reserved
*************************************************/ *************************************************/
import { N_ } from '../../i18n';
export default { export default {
name: 'managementJobsList.notifications', name: 'managementJobsList.notifications',
route: '/:management_id/notifications', route: '/:management_id/notifications',
@@ -16,7 +18,7 @@ export default {
controller: 'managementJobsNotificationsController', controller: 'managementJobsNotificationsController',
templateProvider: function(NotificationsList, generateList, ParentObject) { templateProvider: function(NotificationsList, generateList, ParentObject) {
// include name of parent resource in listTitle // include name of parent resource in listTitle
NotificationsList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Notifications`; NotificationsList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('Notifications');
let html = generateList.build({ let html = generateList.build({
list: NotificationsList, list: NotificationsList,
mode: 'edit' mode: 'edit'
@@ -41,6 +43,6 @@ export default {
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'managementJobsList', parent: 'managementJobsList',
label: 'NOTIFICATIONS' label: N_('NOTIFICATIONS')
} }
}; };

View File

@@ -9,6 +9,7 @@ import { templateUrl } from '../../shared/template-url/template-url.factory';
import controller from '../../scheduler/schedulerList.controller'; import controller from '../../scheduler/schedulerList.controller';
import addController from '../../scheduler/schedulerAdd.controller'; import addController from '../../scheduler/schedulerAdd.controller';
import editController from '../../scheduler/schedulerEdit.controller'; import editController from '../../scheduler/schedulerEdit.controller';
import { N_ } from '../../i18n';
export default export default
angular.module('managementJobScheduler', []) angular.module('managementJobScheduler', [])
@@ -22,13 +23,13 @@ angular.module('managementJobScheduler', [])
route: '/management_jobs/:id/schedules', route: '/management_jobs/:id/schedules',
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'managementJobsList', parent: 'managementJobsList',
label: 'SCHEDULES' label: N_('SCHEDULES')
}, },
views: { views: {
'@': { '@': {
templateProvider: function(SchedulesList, generateList, ParentObject) { templateProvider: function(SchedulesList, generateList, ParentObject) {
// include name of parent resource in listTitle // include name of parent resource in listTitle
SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Schedules`; SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('Schedules');
let html = generateList.build({ let html = generateList.build({
list: SchedulesList, list: SchedulesList,
mode: 'edit' mode: 'edit'
@@ -70,7 +71,7 @@ angular.module('managementJobScheduler', [])
route: '/add', route: '/add',
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'managementJobSchedules', parent: 'managementJobSchedules',
label: 'CREATE SCHEDULED JOB' label: N_('CREATE SCHEDULED JOB')
}, },
views: { views: {
'form': { 'form': {
@@ -84,7 +85,7 @@ angular.module('managementJobScheduler', [])
route: '/edit/:schedule_id', route: '/edit/:schedule_id',
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'managementJobSchedules', parent: 'managementJobSchedules',
label: 'EDIT SCHEDULED JOB' label: N_('EDIT SCHEDULED JOB')
}, },
views: { views: {
'form': { 'form': {

View File

@@ -18,7 +18,7 @@
<div class="form-group SchedulerForm-formGroup"> <div class="form-group SchedulerForm-formGroup">
<label class="Form-inputLabel"> <label class="Form-inputLabel">
<span class="red-text">*</span> <span class="red-text">*</span>
Name <span translate>Name</span>
</label> </label>
<input <input
type="text" type="text"
@@ -30,14 +30,14 @@
ng-model="schedulerName" required ng-model="schedulerName" required
placeholder="Schedule name"> placeholder="Schedule name">
<div class="error" <div class="error"
ng-show="scheduler_form.$dirty && scheduler_form.schedulerName.$error.required"> ng-show="scheduler_form.$dirty && scheduler_form.schedulerName.$error.required" translate>
A schedule name is required. A schedule name is required.
</div> </div>
</div> </div>
<div class="form-group SchedulerForm-formGroup"> <div class="form-group SchedulerForm-formGroup">
<label class="Form-inputLabel"> <label class="Form-inputLabel">
<span class="red-text">*</span> <span class="red-text">*</span>
Start Date <span translate>Start Date</span>
</label> </label>
<div class="input-group Form-inputGroup SchedulerForm-inputGroup--date"> <div class="input-group Form-inputGroup SchedulerForm-inputGroup--date">
<scheduler-date-picker date="schedulerStartDt"> <scheduler-date-picker date="schedulerStartDt">
@@ -51,7 +51,7 @@
<div class="form-group SchedulerForm-formGroup"> <div class="form-group SchedulerForm-formGroup">
<label class="Form-inputLabel"> <label class="Form-inputLabel">
<span class="red-text">*</span> <span class="red-text">*</span>
Start Time <span translate>Start Time</span>
<span class="fmt-help" <span class="fmt-help"
ng-show="schedulerShowTimeZone"> ng-show="schedulerShowTimeZone">
(HH24:MM:SS) (HH24:MM:SS)
@@ -117,7 +117,7 @@
</div> --> </div> -->
</div> </div>
<div class="error" <div class="error"
ng-show="scheduler_startTime_error"> ng-show="scheduler_startTime_error" translate>
The time must be in HH24:MM:SS format. The time must be in HH24:MM:SS format.
</div> </div>
</div> </div>
@@ -125,7 +125,7 @@
ng-show="schedulerShowTimeZone"> ng-show="schedulerShowTimeZone">
<label class="Form-inputLabel"> <label class="Form-inputLabel">
<span class="red-text">*</span> <span class="red-text">*</span>
Local Time Zone <span translate>Local Time Zone</span>
</label> </label>
<select <select
class="MakeSelect2" class="MakeSelect2"
@@ -140,7 +140,7 @@
<div class="form-group SchedulerForm-formGroup"> <div class="form-group SchedulerForm-formGroup">
<label class="Form-inputLabel"> <label class="Form-inputLabel">
<span class="red-text">*</span> <span class="red-text">*</span>
Repeat frequency <span translate>Repeat frequency</span>
</label> </label>
<select name="schedulerFrequency" <select name="schedulerFrequency"
id="schedulerFrequency" id="schedulerFrequency"
@@ -157,12 +157,12 @@
<div class="form-group SchedulerForm-formGroup" ng-if="cleanupJob && !isFactCleanup"> <div class="form-group SchedulerForm-formGroup" ng-if="cleanupJob && !isFactCleanup">
<label class="Form-inputLabel"><span class="red-text">*</span> Days of data to keep</label> <label class="Form-inputLabel"><span class="red-text">*</span> Days of data to keep</label>
<input type="number" sch-spinner="scheduler_form" class="scheduler-time-spinner SchedulerTime-input SpinnerInput RepeatFrequencyOptions-number" name="schedulerPurgeDays" id="schedulerPurgeDays" min="1" aw-spinner="schedulerPurgeDays" ng-model="schedulerPurgeDays" required placeholder="Days of data to keep"> <input type="number" sch-spinner="scheduler_form" class="scheduler-time-spinner SchedulerTime-input SpinnerInput RepeatFrequencyOptions-number" name="schedulerPurgeDays" id="schedulerPurgeDays" min="1" aw-spinner="schedulerPurgeDays" ng-model="schedulerPurgeDays" required placeholder="Days of data to keep">
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$dirty && scheduler_form.schedulerPurgeDays.$error.required">A value is required.</div> <div class="error" ng-show="scheduler_form.schedulerPurgeDays.$dirty && scheduler_form.schedulerPurgeDays.$error.required" translate>A value is required.</div>
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$error.number">This is not a valid number.</div> <div class="error" ng-show="scheduler_form.schedulerPurgeDays.$error.number" translate>This is not a valid number.</div>
</div> </div>
<div class="RepeatFrequencyOptions-label" <div class="RepeatFrequencyOptions-label"
ng-show="schedulerFrequency.value && schedulerFrequency.value !== 'none'"> ng-show="schedulerFrequency.value && schedulerFrequency.value !== 'none'">
Frequency Details</div> <span translate>Frequency Details</span></div>
<div class="RepeatFrequencyOptions Form" <div class="RepeatFrequencyOptions Form"
ng-show="schedulerFrequency.value && schedulerFrequency.value !== 'none'"> ng-show="schedulerFrequency.value && schedulerFrequency.value !== 'none'">
<div class="form-group <div class="form-group

View File

@@ -15,6 +15,7 @@ import notificationsList from './notifications.list';
import toggleNotification from './shared/toggle-notification.factory'; import toggleNotification from './shared/toggle-notification.factory';
import notificationsListInit from './shared/notification-list-init.factory'; import notificationsListInit from './shared/notification-list-init.factory';
import typeChange from './shared/type-change.service'; import typeChange from './shared/type-change.service';
import { N_ } from '../i18n';
export default export default
angular.module('notifications', [ angular.module('notifications', [
@@ -39,7 +40,7 @@ angular.module('notifications', [
url: '/notification_templates', url: '/notification_templates',
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'setup', parent: 'setup',
label: "NOTIFICATIONS" label: N_("NOTIFICATIONS")
}, },
lazyLoad: () => stateDefinitions.generateTree({ lazyLoad: () => stateDefinitions.generateTree({
parent: 'notifications', // top-most node in the generated tree parent: 'notifications', // top-most node in the generated tree
@@ -84,7 +85,7 @@ angular.module('notifications', [
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'setup', parent: 'setup',
name: 'NOTIFICATIONS' name: N_('NOTIFICATIONS')
} }
}) })
}); });

View File

@@ -5,7 +5,7 @@
<div class="AddUsers-header"> <div class="AddUsers-header">
<div class="List-header"> <div class="List-header">
<div class="List-title"> <div class="List-title">
<div class="List-titleText ng-binding">{{ $parent.organization_name }}<div class="List-titleLockup"></div>Add {{ addType | capitalize}} <div class="List-titleText ng-binding">{{ $parent.organization_name }}<div class="List-titleLockup"></div><span translate>Add</span> {{ addType | capitalize}}
</div> </div>
</div> </div>
<div class="Form-exitHolder"> <div class="Form-exitHolder">

View File

@@ -10,6 +10,7 @@ import OrganizationsJobTemplates from './controllers/organizations-job-templates
import OrganizationsProjects from './controllers/organizations-projects.controller'; import OrganizationsProjects from './controllers/organizations-projects.controller';
import OrganizationsTeams from './controllers/organizations-teams.controller'; import OrganizationsTeams from './controllers/organizations-teams.controller';
import OrganizationsUsers from './controllers/organizations-users.controller'; import OrganizationsUsers from './controllers/organizations-users.controller';
import { N_ } from '../../i18n';
export default [{ export default [{
name: 'organizations.users', name: 'organizations.users',
@@ -55,7 +56,7 @@ export default [{
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: "organizations.edit", parent: "organizations.edit",
label: "USERS" label: N_("USERS")
}, },
data: { data: {
@@ -128,7 +129,7 @@ export default [{
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: "organizations.edit", parent: "organizations.edit",
label: "TEAMS" label: N_("TEAMS")
}, },
resolve: { resolve: {
features: ['FeaturesService', function(FeaturesService) { features: ['FeaturesService', function(FeaturesService) {
@@ -174,7 +175,7 @@ export default [{
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: "organizations.edit", parent: "organizations.edit",
label: "INVENTORIES" label: N_("INVENTORIES")
}, },
resolve: { resolve: {
features: ['FeaturesService', function(FeaturesService) { features: ['FeaturesService', function(FeaturesService) {
@@ -225,7 +226,7 @@ export default [{
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: "organizations.edit", parent: "organizations.edit",
label: "PROJECTS" label: N_("PROJECTS")
}, },
resolve: { resolve: {
features: ['FeaturesService', function(FeaturesService) { features: ['FeaturesService', function(FeaturesService) {
@@ -283,7 +284,7 @@ export default [{
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: "organizations.edit", parent: "organizations.edit",
label: "JOB TEMPLATES" label: N_("JOB TEMPLATES")
}, },
resolve: { resolve: {
features: ['FeaturesService', function(FeaturesService) { features: ['FeaturesService', function(FeaturesService) {
@@ -359,7 +360,7 @@ export default [{
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: "organizations.edit", parent: "organizations.edit",
label: "ADMINS" label: N_("ADMINS")
}, },
resolve: { resolve: {
features: ['FeaturesService', function(FeaturesService) { features: ['FeaturesService', function(FeaturesService) {

View File

@@ -10,6 +10,7 @@ import OrganizationsAdd from './add/organizations-add.controller';
import OrganizationsEdit from './edit/organizations-edit.controller'; import OrganizationsEdit from './edit/organizations-edit.controller';
import organizationsLinkout from './linkout/main'; import organizationsLinkout from './linkout/main';
import OrganizationsLinkoutStates from './linkout/organizations-linkout.route'; import OrganizationsLinkoutStates from './linkout/organizations-linkout.route';
import { N_ } from '../i18n';
export default export default
@@ -48,7 +49,7 @@ angular.module('Organizations', [
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'setup', parent: 'setup',
label: 'ORGANIZATIONS' label: N_('ORGANIZATIONS')
}, },
// concat manually-defined state definitions with generated defintions // concat manually-defined state definitions with generated defintions
}).then((generated) => { }).then((generated) => {

View File

@@ -1,6 +1,7 @@
import { templateUrl } from '../shared/template-url/template-url.factory'; import { templateUrl } from '../shared/template-url/template-url.factory';
import { PortalModeJobTemplatesController } from './portal-mode-job-templates.controller'; import { PortalModeJobTemplatesController } from './portal-mode-job-templates.controller';
import { PortalModeJobsController } from './portal-mode-jobs.controller'; import { PortalModeJobsController } from './portal-mode-jobs.controller';
import { N_ } from '../i18n';
// Using multiple named views requires a parent layout // Using multiple named views requires a parent layout
// https://github.com/angular-ui/ui-router/wiki/Multiple-Named-Views // https://github.com/angular-ui/ui-router/wiki/Multiple-Named-Views
@@ -8,7 +9,7 @@ export default {
name: 'portalMode', name: 'portalMode',
url: '/portal?{group_search:queryset}{host_search:queryset}', url: '/portal?{group_search:queryset}{host_search:queryset}',
ncyBreadcrumb: { ncyBreadcrumb: {
label: 'MY VIEW' label: N_('MY VIEW')
}, },
params: { params: {
job_search: { job_search: {

View File

@@ -9,6 +9,7 @@ import addController from './schedulerAdd.controller';
import editController from './schedulerEdit.controller'; import editController from './schedulerEdit.controller';
import {templateUrl} from '../shared/template-url/template-url.factory'; import {templateUrl} from '../shared/template-url/template-url.factory';
import schedulerDatePicker from './schedulerDatePicker.directive'; import schedulerDatePicker from './schedulerDatePicker.directive';
import { N_ } from '../i18n';
export default export default
angular.module('scheduler', []) angular.module('scheduler', [])
@@ -32,7 +33,7 @@ export default
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'templates.editJobTemplate({job_template_id: parentObject.id})', parent: 'templates.editJobTemplate({job_template_id: parentObject.id})',
label: 'SCHEDULES' label: N_('SCHEDULES')
}, },
resolve: { resolve: {
Dataset: ['SchedulesList', 'QuerySet', '$stateParams', 'GetBasePath', Dataset: ['SchedulesList', 'QuerySet', '$stateParams', 'GetBasePath',
@@ -63,7 +64,7 @@ export default
'@': { '@': {
templateProvider: function(SchedulesList, generateList, ParentObject){ templateProvider: function(SchedulesList, generateList, ParentObject){
// include name of parent resource in listTitle // include name of parent resource in listTitle
SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Schedules`; SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('Schedules');
let html = generateList.build({ let html = generateList.build({
list: SchedulesList, list: SchedulesList,
mode: 'edit' mode: 'edit'
@@ -86,7 +87,7 @@ export default
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'jobTemplateSchedules', parent: 'jobTemplateSchedules',
label: 'CREATE SCHEDULE' label: N_('CREATE SCHEDULE')
} }
}); });
$stateExtender.addState({ $stateExtender.addState({
@@ -118,7 +119,7 @@ export default
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'templates.editWorkflowJobTemplate({workflow_job_template_id: parentObject.id})', parent: 'templates.editWorkflowJobTemplate({workflow_job_template_id: parentObject.id})',
label: 'SCHEDULES' label: N_('SCHEDULES')
}, },
resolve: { resolve: {
Dataset: ['SchedulesList', 'QuerySet', '$stateParams', 'GetBasePath', Dataset: ['SchedulesList', 'QuerySet', '$stateParams', 'GetBasePath',
@@ -149,7 +150,7 @@ export default
'@': { '@': {
templateProvider: function(SchedulesList, generateList, ParentObject){ templateProvider: function(SchedulesList, generateList, ParentObject){
// include name of parent resource in listTitle // include name of parent resource in listTitle
SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Schedules`; SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('Schedules');
let html = generateList.build({ let html = generateList.build({
list: SchedulesList, list: SchedulesList,
mode: 'edit' mode: 'edit'
@@ -172,7 +173,7 @@ export default
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'workflowJobTemplateSchedules', parent: 'workflowJobTemplateSchedules',
label: 'CREATE SCHEDULE' label: N_('CREATE SCHEDULE')
} }
}); });
$stateExtender.addState({ $stateExtender.addState({
@@ -201,7 +202,7 @@ export default
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'projects.edit({project_id: parentObject.id})', parent: 'projects.edit({project_id: parentObject.id})',
label: 'SCHEDULES' label: N_('SCHEDULES')
}, },
resolve: { resolve: {
Dataset: ['SchedulesList', 'QuerySet', '$stateParams', 'GetBasePath', Dataset: ['SchedulesList', 'QuerySet', '$stateParams', 'GetBasePath',
@@ -232,7 +233,7 @@ export default
'@': { '@': {
templateProvider: function(SchedulesList, generateList, ParentObject){ templateProvider: function(SchedulesList, generateList, ParentObject){
// include name of parent resource in listTitle // include name of parent resource in listTitle
SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>Schedules`; SchedulesList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('Schedules');
let html = generateList.build({ let html = generateList.build({
list: SchedulesList, list: SchedulesList,
mode: 'edit' mode: 'edit'
@@ -249,7 +250,7 @@ export default
name: 'projectSchedules.add', name: 'projectSchedules.add',
route: '/add', route: '/add',
ncyBreadcrumb: { ncyBreadcrumb: {
label: 'CREATE SCHEDULE' label: N_('CREATE SCHEDULE')
}, },
views: { views: {
'form': { 'form': {
@@ -289,7 +290,7 @@ export default
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'jobs', parent: 'jobs',
label: 'SCHEDULED' label: N_('SCHEDULED')
}, },
resolve: { resolve: {
SchedulesList: ['ScheduledJobsList', function(list){ SchedulesList: ['ScheduledJobsList', function(list){

View File

@@ -1,10 +1,11 @@
import {templateUrl} from '../shared/template-url/template-url.factory'; import {templateUrl} from '../shared/template-url/template-url.factory';
import { N_ } from '../i18n';
export default { export default {
name: 'setup', name: 'setup',
route: '/setup', route: '/setup',
ncyBreadcrumb: { ncyBreadcrumb: {
label: "SETTINGS" label: N_("SETTINGS")
}, },
templateUrl: templateUrl('setup-menu/setup-menu'), templateUrl: templateUrl('setup-menu/setup-menu'),
controller: function(orgAdmin, $scope){ controller: function(orgAdmin, $scope){

View File

@@ -30,15 +30,15 @@
</a> </a>
</li> </li>
</ul> </ul>
<span class="Paginate-pager--pageof">Page <span class="Paginate-pager--pageof" translate>Page
<span id="current-page">{{current()}}</span> of <span id="current-page">{{current()}}</span> of
<span id="total-pages">{{last()}}</span> <span id="total-pages">{{last()}}</span>
</span> </span>
</div> </div>
<div class="Paginate-total page-label" ng-hide="dataCount === 0"> <div class="Paginate-total page-label" ng-hide="dataCount === 0">
<span>ITEMS&nbsp; <span translate>ITEMS&nbsp;
<span>{{dataRange}}</span> <span>{{dataRange}}</span>
<span>of {{dataCount()}}</span> <span translate>of {{dataCount()}}</span>
</span> </span>
</div> </div>
</div> </div>

View File

@@ -1,5 +1,5 @@
export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', 'QuerySet', 'SmartSearchService', export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', 'QuerySet', 'SmartSearchService', 'i18n',
function($stateParams, $scope, $state, QuerySet, GetBasePath, qs, SmartSearchService) { function($stateParams, $scope, $state, QuerySet, GetBasePath, qs, SmartSearchService, i18n) {
let path, relations, let path, relations,
defaults, defaults,
@@ -35,6 +35,7 @@ export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', '
$scope.options = data.options.data; $scope.options = data.options.data;
$scope.$emit(`${$scope.list.iterator}_options`, data.options); $scope.$emit(`${$scope.list.iterator}_options`, data.options);
}); });
$scope.searchPlaceholder = $scope.disableSearch ? i18n._('Cannot search running job') : i18n._('Search');
function compareParams(a, b) { function compareParams(a, b) {
for (let key in a) { for (let key in a) {
@@ -73,6 +74,15 @@ export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', '
}); });
$scope.$on('$destroy', stateChangeSuccessListener); $scope.$on('$destroy', stateChangeSuccessListener);
$scope.$watch('disableSearch', function(disableSearch){
if(disableSearch) {
$scope.searchPlaceholder = i18n._('Cannot search running job');
}
else {
$scope.searchPlaceholder = i18n._('Search');
}
});
} }
// Removes state definition defaults and pagination terms // Removes state definition defaults and pagination terms

View File

@@ -4,14 +4,14 @@
<div class="SmartSearch-searchTermContainer"> <div class="SmartSearch-searchTermContainer">
<!-- string search input --> <!-- string search input -->
<form name="smartSearch" class="SmartSearch-form" aw-enter-key="add(searchTerm)" novalidate> <form name="smartSearch" class="SmartSearch-form" aw-enter-key="add(searchTerm)" novalidate>
<input class="SmartSearch-input" ng-model="searchTerm" placeholder="{{disableSearch ? 'Cannot search running job' : 'Search'}}" <input class="SmartSearch-input" ng-model="searchTerm" placeholder="{{searchPlaceholder}}"
ng-disabled="disableSearch"> ng-disabled="disableSearch">
</form> </form>
<div type="submit" class="SmartSearch-searchButton" ng-disabled="!searchTerm" ng-click="add(searchTerm)"> <div type="submit" class="SmartSearch-searchButton" ng-disabled="!searchTerm" ng-click="add(searchTerm)">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
</div> </div>
</div> </div>
<div class="SmartSearch-keyToggle btn" ng-class="{'is-active': showKeyPane}" ng-click="toggleKeyPane()"> <div class="SmartSearch-keyToggle btn" ng-class="{'is-active': showKeyPane}" ng-click="toggleKeyPane()" translate>
Key Key
</div> </div>
</div> </div>
@@ -28,7 +28,7 @@
<span class="SmartSearch-name">{{tag}}</span> <span class="SmartSearch-name">{{tag}}</span>
</div> </div>
</div> </div>
<a href class="SmartSearch-clearAll" ng-click="clearAll()" ng-show="!(searchTags | isEmpty)">CLEAR ALL</a> <a href class="SmartSearch-clearAll" ng-click="clearAll()" ng-show="!(searchTags | isEmpty)" translate>CLEAR ALL</a>
</div> </div>
</div> </div>
</div> </div>
@@ -37,7 +37,7 @@
<div class="SmartSearch-keyRow"> <div class="SmartSearch-keyRow">
<div class="SmartSearch-examples"> <div class="SmartSearch-examples">
<div class="SmartSearch-examples--title"> <div class="SmartSearch-examples--title">
<b>EXAMPLES:</b> <b translate>EXAMPLES:</b>
</div> </div>
<div class="SmartSearch-examples--search">name:foo</div> <div class="SmartSearch-examples--search">name:foo</div>
<div class="SmartSearch-examples--search">organization.name:Default</div> <div class="SmartSearch-examples--search">organization.name:Default</div>
@@ -45,13 +45,13 @@
</div> </div>
</div> </div>
<div class="SmartSearch-keyRow"> <div class="SmartSearch-keyRow">
<b>FIELDS:</b> <span ng-repeat="(key,value) in model.base">{{ key }}<span ng-if="!$last">, </span></span> <b translate>FIELDS:</b> <span ng-repeat="(key,value) in model.base">{{ key }}<span ng-if="!$last">, </span></span>
</div> </div>
<div class="SmartSearch-keyRow"> <div class="SmartSearch-keyRow">
<b>RELATED FIELDS:</b> <span ng-repeat="relation in model.related">{{ relation }}<span ng-if="!$last">, </span></span> <b translate>RELATED FIELDS:</b> <span ng-repeat="relation in model.related">{{ relation }}<span ng-if="!$last">, </span></span>
</div> </div>
<div class="SmartSearch-keyRow"> <div class="SmartSearch-keyRow">
<b>ADDITIONAL INFORMATION:</b> <span>For additional information on advanced search search syntax please see the Ansible Tower documentation.</span> <b translate>ADDITIONAL INFORMATION:</b> <span translate>For additional information on advanced search search syntax please see the Ansible Tower documentation.</span>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,6 +9,8 @@
* generateLookupNodes - Attaches to a form node. Builds an abstract '*.lookup' node with field-specific 'lookup.*' children e.g. {name: 'projects.add.lookup.organizations', ...} * generateLookupNodes - Attaches to a form node. Builds an abstract '*.lookup' node with field-specific 'lookup.*' children e.g. {name: 'projects.add.lookup.organizations', ...}
*/ */
import { N_ } from '../i18n';
export default ['$injector', '$stateExtender', '$log', function($injector, $stateExtender, $log) { export default ['$injector', '$stateExtender', '$log', function($injector, $stateExtender, $log) {
return { return {
/** /**
@@ -150,7 +152,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
url: url, url: url,
ncyBreadcrumb: { ncyBreadcrumb: {
[params.parent ? 'parent' : null]: `${params.parent}`, [params.parent ? 'parent' : null]: `${params.parent}`,
label: `CREATE ${form.breadcrumbName || form.name}` label: N_('CREATE') + ` ${form.breadcrumbName || form.name}`
}, },
views: { views: {
'form': { 'form': {
@@ -492,7 +494,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
// } // }
return state; return state;
} }
function buildRbacUserDirective() { function buildRbacUserDirective() {
let states = []; let states = [];

View File

@@ -5,6 +5,7 @@
*************************************************/ *************************************************/
import {templateUrl} from '../shared/template-url/template-url.factory'; import {templateUrl} from '../shared/template-url/template-url.factory';
import { N_ } from '../i18n';
export default { export default {
name: 'systemTracking', name: 'systemTracking',
@@ -14,7 +15,7 @@ export default {
params: {hosts: null, inventory: null}, params: {hosts: null, inventory: null},
reloadOnSearch: false, reloadOnSearch: false,
ncyBreadcrumb: { ncyBreadcrumb: {
label: "SYSTEM TRACKING" label: N_("SYSTEM TRACKING")
}, },
resolve: { resolve: {
moduleOptions: moduleOptions:

View File

@@ -4,11 +4,13 @@
* All Rights Reserved * All Rights Reserved
*************************************************/ *************************************************/
import { N_ } from '../../i18n';
export default { export default {
name: 'templates', name: 'templates',
route: '/templates', route: '/templates',
ncyBreadcrumb: { ncyBreadcrumb: {
label: "TEMPLATES" label: N_("TEMPLATES")
}, },
data: { data: {
activityStream: true, activityStream: true,