Merge pull request #3077 from mabashian/i18n-sweep

Mark strings for translation

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-01-25 21:11:30 +00:00 committed by GitHub
commit 155c214df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 332 additions and 264 deletions

View File

@ -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;

View File

@ -101,7 +101,7 @@ function ListApplicationsController (
resourceName: $filter('sanitize')(app.name),
body: deleteModalBody,
action,
actionText: 'DELETE'
actionText: strings.get('DELETE')
});
};
}

View File

@ -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',

View File

@ -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'];

View File

@ -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;

View File

@ -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 = {

View File

@ -8,11 +8,11 @@
</div>
<div class="at-SettingsSubPane" ng-class="{'at-SettingsSubPane--visible': vm.showSettingsSubMenu}">
<div class="at-SettingsSubPane-content">
<a ui-sref="settings.form({form: 'auth'})">Authentication</a>
<a ui-sref="settings.form({form: 'jobs'})">Jobs</a>
<a ui-sref="settings.form({form: 'system'})">System</a>
<a ui-sref="settings.form({form: 'ui'})">User Interface</a>
<a ui-sref="settings.form({form: 'license'})" ng-if="vm.product === 'Tower'">License</a>
<a ui-sref="settings.form({form: 'auth'})">{{ layoutVm.getString('AUTHENTICATION') }}</a>
<a ui-sref="settings.form({form: 'jobs'})">{{ layoutVm.getString('JOBS') }}</a>
<a ui-sref="settings.form({form: 'system'})">{{ layoutVm.getString('SYSTEM') }}</a>
<a ui-sref="settings.form({form: 'ui'})">{{ layoutVm.getString('USER_INTERFACE') }}</a>
<a ui-sref="settings.form({form: 'license'})" ng-if="vm.product === 'Tower'">{{ layoutVm.getString('LICENSE') }}</a>
</div>
</div>
</div>

View File

@ -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
</div>
`,
action: action,
actionText: 'REMOVE'
actionText: i18n._('REMOVE')
});
};
@ -87,7 +87,7 @@ export default ['$scope', 'ListDefinition', 'Dataset', 'Wait', 'Rest', 'ProcessE
</div>
`,
action: action,
actionText: 'REMOVE'
actionText: i18n._('REMOVE')
});
};
}

View File

@ -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: `<div class="Prompt-bodyQuery">Please confirm that you would like to remove <span class="Prompt-emphasis">${entry.name}</span> access from the team <span class="Prompt-emphasis">${$filter('sanitize')(entry.team_name)}</span>. 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.</div>`,
action: action,
actionText: 'REMOVE TEAM ACCESS'
actionText: i18n._('REMOVE TEAM ACCESS')
});
} else {
Prompt({
hdr: `User access removal`,
hdr: i18n._(`User access removal`),
body: `<div class="Prompt-bodyQuery">Please confirm that you would like to remove <span class="Prompt-emphasis">${entry.name}</span> access from <span class="Prompt-emphasis">${$filter('sanitize')(user.username)}</span>.</div>`,
action: action,
actionText: 'REMOVE'
actionText: i18n._('REMOVE')
});
}
};

View File

@ -1,17 +1,17 @@
<at-card-group>
<at-card title="Authentication" ng-click="vm.goToCard('auth')">
Enable simplified login for your Tower applications
<at-card title="{{'Authentication' | translate}}" ng-click="vm.goToCard('auth')">
<span translate>Enable simplified login for your Tower applications</span>
</at-card>
<at-card title="Jobs" ng-click="vm.goToCard('jobs')">
Update settings pertaining to Jobs within Tower
<at-card title="{{'Jobs' | translate}}" ng-click="vm.goToCard('jobs')">
<span translate>Update settings pertaining to Jobs within Tower</span>
</at-card>
<at-card title="System" ng-click="vm.goToCard('system')">
Define system-level features and functions
<at-card title="{{'System' | translate}}" ng-click="vm.goToCard('system')">
<span translate>Define system-level features and functions</span>
</at-card>
<at-card title="User Interface" ng-click="vm.goToCard('ui')">
Set preferences for data collection, logos, and logins
<at-card title="{{'User Interface' | translate}}" ng-click="vm.goToCard('ui')">
<span translate>Set preferences for data collection, logos, and logins</span>
</at-card>
<at-card title="License" ng-show="vm.product === 'Tower'" ng-click="vm.goToCard('license')">
View and edit your license information
<at-card title="{{'License' | translate}}" ng-show="vm.product === 'Tower'" ng-click="vm.goToCard('license')">
<span translate>View and edit your license information</span>
</at-card>
</at-card-group>

View File

@ -107,7 +107,7 @@ export default ['$rootScope', '$scope', 'Wait', 'CredentialTypesList',
body: deleteModalBody,
action: action,
hideActionButton: credentialTypeInUse ? true : false,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
});
};

View File

@ -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',

View File

@ -177,7 +177,7 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', '
resourceName: $filter('sanitize')(name),
body: deleteModalBody,
action: action,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
});
};

View File

@ -157,7 +157,7 @@ function InventoriesList($scope,
resourceName: $filter('sanitize')(name),
body: deleteModalBody,
action: action,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
});
};

View File

@ -68,7 +68,7 @@ export default ['templateUrl', '$compile', 'Wait', '$filter', 'i18n',
}
else {
html += "<tr>";
html += "<td><a href=\"\" aw-tool-tip=\"No sync data\" aw-tip-placement=\"top\" data-tooltip-outer-class=\"Tooltip-secondary\"><i class=\"fa icon-job-none\"></i></a></td>";
html += `<td><a href=\"\" aw-tool-tip="` + i18n._('No sync data') + `" aw-tip-placement=\"top\" data-tooltip-outer-class=\"Tooltip-secondary\"><i class=\"fa icon-job-none\"></i></a></td>`;
html += "<td>NA</td>";
html += "<td><span>" + $filter('sanitize')(ellipsis(row.name)) + "</span></td>";
html += "</tr>\n";
@ -76,7 +76,7 @@ export default ['templateUrl', '$compile', 'Wait', '$filter', 'i18n',
});
html += "</tbody>\n";
html += "</table>\n";
title = "Sync Status";
title = i18n._("Sync Status");
attachElem(event, html, title);
};

View File

@ -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';
};

View File

@ -78,10 +78,10 @@ export default
};
Prompt({
hdr: 'Remove host from ' + group.name ,
hdr: i18n._('Remove host from ') + group.name ,
body: '<div class="Prompt-bodyQuery">' + i18n._('Confirm the removal of the') + ' <span class="Prompt-emphasis">' + $filter('sanitize')(host.name) + '</span> ' + i18n._('from the') + ' <span class="Prompt-emphasis">' + $filter('sanitize')(group.name) + '</span> ' + i18n._('group') + '.</div>',
action: action,
actionText: 'REMOVE'
actionText: i18n._('REMOVE')
});
};

View File

@ -195,7 +195,7 @@
resourceName: $filter('sanitize')(inventory_source.name),
body: deleteModalBody,
action: action,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
$rootScope.promptActionBtnClass = 'Modal-errorButton';
});

View File

@ -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,

View File

@ -127,7 +127,7 @@ export default ['$rootScope', '$scope', 'Wait', 'InventoryScriptsList',
resourceName: $filter('sanitize')(name),
body: deleteModalBody,
action: action,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
});
};

View File

@ -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'
];

View File

@ -29,9 +29,10 @@
name="schedulerName"
id="schedulerName"
ng-model="schedulerName" required
placeholder="Schedule name">
placeholder="{{strings.get('form.SCHEDULE_NAME')}}">
<div class="error"
ng-show="scheduler_form.$dirty && scheduler_form.schedulerName.$error.required" translate>
ng-show="scheduler_form.$dirty && scheduler_form.schedulerName.$error.required"
translate>
A schedule name is required.
</div>
</div>
@ -54,11 +55,13 @@
<span class="red-text">*</span>
<span translate>Start Time</span>
<span class="fmt-help"
ng-show="schedulerShowTimeZone">
ng-show="schedulerShowTimeZone"
translate>
(HH24:MM:SS)
</span>
<span class="fmt-help"
ng-show="!schedulerShowTimeZone">
ng-show="!schedulerShowTimeZone"
translate>
(HH24:MM:SS UTC)
</span>
</label>
@ -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 @@
</div> -->
</div>
<div class="error"
ng-show="scheduler_startTime_error" translate>
ng-show="scheduler_startTime_error"
translate>
The time must be in HH24:MM:SS format.
</div>
</div>
@ -161,15 +165,19 @@
</div>
</div>
<div class="form-group SchedulerForm-formGroup" ng-if="cleanupJob">
<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" ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
<label class="Form-inputLabel">
<span class="red-text">*</span>
<span translate>Days of data to keep</span>
</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="{{strings.get('form.DAYS_DATA')}}" ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
<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" translate>This is not a valid number.</div>
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$error.min" translate>Please input a number greater than 1.</div>
</div>
<div class="RepeatFrequencyOptions-label"
ng-show="schedulerFrequency.value && schedulerFrequency.value !== 'none'">
<span translate>Frequency Details</span></div>
<span translate>Frequency Details</span>
</div>
<div class="RepeatFrequencyOptions Form"
ng-show="schedulerFrequency.value && schedulerFrequency.value !== 'none'">
<div class="form-group
@ -179,7 +187,7 @@
<label class="Form-inputLabel
RepeatFrequencyOptions-everyLabel">
<span class="red-text">*</span>
Every
<span translate>Every</span>
</label>
<input name="schedulerInterval"
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
@ -200,7 +208,8 @@
<div
class="error
RepeatFrequencyOptions-error"
ng-show="$parent.scheduler_interval_error">
ng-show="$parent.scheduler_interval_error"
translate>
Please provide a value between 1 and 999.
</div>
</div>
@ -214,7 +223,8 @@
ng-model="$parent.monthlyRepeatOption"
ng-change="monthlyRepeatChange()"
name="monthlyRepeatOption"
id="monthlyRepeatOption">
id="monthlyRepeatOption"
translate>
on day
</label>
</div>
@ -229,7 +239,8 @@
min="1" max="31"
ng-change="resetError('scheduler_monthDay_error')" >
<div class="error"
ng-show="$parent.scheduler_monthDay_error">
ng-show="$parent.scheduler_monthDay_error"
translate>
The day must be between 1 and 31.
</div>
</div>
@ -246,7 +257,8 @@
ng-model="$parent.monthlyRepeatOption"
ng-change="monthlyRepeatChange()"
name="monthlyRepeatOption"
id="monthlyRepeatOption">
id="monthlyRepeatOption"
translate>
on the
</label>
</div>
@ -285,7 +297,8 @@
ng-model="$parent.yearlyRepeatOption"
ng-change="yearlyRepeatChange()"
name="yearlyRepeatOption"
id="yearlyRepeatOption">
id="yearlyRepeatOption"
translate>
on
</label>
</div>
@ -313,7 +326,8 @@
>
</div>
<div class="error"
ng-show="$parent.scheduler_yearlyMonthDay_error">
ng-show="$parent.scheduler_yearlyMonthDay_error"
translate>
The day must be between 1 and 31.
</div>
</div>
@ -330,7 +344,8 @@
ng-model="$parent.yearlyRepeatOption"
ng-change="yearlyRepeatChange()"
name="yearlyRepeatOption"
id="yearlyRepeatOption">
id="yearlyRepeatOption"
translate>
on the
</label>
</div>
@ -378,7 +393,7 @@
ng-if="schedulerFrequency && schedulerFrequency.value == 'weekly'">
<label class="Form-inputLabel">
<span class="red-text">*</span>
On Days
<span translate>On Days</span>
</label>
<div class="input-group
RepeatFrequencyOptions-weekButtonContainer">
@ -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
</button>
<button type="button"
@ -401,7 +417,8 @@
class="btn btn-default
RepeatFrequencyOptions-weekButton"
data-value="MO"
ng-click="$parent.setWeekday($event,'mo')">
ng-click="$parent.setWeekday($event,'mo')"
translate>
Mon
</button>
<button type="button"
@ -410,7 +427,8 @@
class="btn btn-default
RepeatFrequencyOptions-weekButton"
data-value="TU"
ng-click="$parent.setWeekday($event,'tu')">
ng-click="$parent.setWeekday($event,'tu')"
translate>
Tue
</button>
<button type="button"
@ -419,7 +437,8 @@
class="btn btn-default
RepeatFrequencyOptions-weekButton"
data-value="WE"
ng-click="$parent.setWeekday($event,'we')">
ng-click="$parent.setWeekday($event,'we')"
translate>
Wed
</button>
<button type="button"
@ -428,7 +447,8 @@
class="btn btn-default
RepeatFrequencyOptions-weekButton"
data-value="TH"
ng-click="$parent.setWeekday($event,'th')">
ng-click="$parent.setWeekday($event,'th')"
translate>
Thu
</button>
<button type="button"
@ -437,7 +457,8 @@
class="btn btn-default
RepeatFrequencyOptions-weekButton"
data-value="FR"
ng-click="$parent.setWeekday($event,'fr')">
ng-click="$parent.setWeekday($event,'fr')"
translate>
Fri
</button>
<button type="button"
@ -446,13 +467,15 @@
class="btn btn-default
RepeatFrequencyOptions-weekButton"
data-value="SA"
ng-click="$parent.setWeekday($event,'sa')">
ng-click="$parent.setWeekday($event,'sa')"
translate>
Sat
</button>
</div>
</div>
<div class="error"
ng-show="$parent.scheduler_weekDays_error">
ng-show="$parent.scheduler_weekDays_error"
translate>
Please select one or more days.
</div>
</div>
@ -461,7 +484,7 @@
ng-if="schedulerShowInterval">
<label class="Form-inputLabel">
<span class="red-text">*</span>
End
<span translate>End</span>
</label>
<div>
<select id="schedulerEnd"
@ -481,7 +504,7 @@
ng-if="schedulerEnd && schedulerEnd.value == 'after'">
<label class="Form-inputLabel">
<span class="red-text">*</span>
Occurrence(s)
<span translate>Occurrence(s)</span>
</label>
<input
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
@ -497,7 +520,8 @@
>
<div class="error
RepeatFrequencyOptions-error"
ng-show="$parent.scheduler_occurrenceCount_error">
ng-show="$parent.scheduler_occurrenceCount_error"
translate>
Please provide a value between 1 and 999.
</div>
</div>
@ -505,14 +529,15 @@
ng-if="schedulerEnd && schedulerEnd.value == 'on'">
<label class="Form-inputLabel">
<span class="red-text">*</span>
End Date
<span translate>End Date</span>
</label>
<scheduler-date-picker date="$parent.schedulerEndDt"
class="input-group Form-inputGroup SchedulerForm-inputGroup--date"
disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
</scheduler-date-picker>
<div class="error"
ng-show="$parent.scheduler_endDt_error">
ng-show="$parent.scheduler_endDt_error"
translate>
Please provide a valid date.
</div>
</div>
@ -524,13 +549,13 @@
<div class="SchedulerFormDetail-container
SchedulerFormDetail-container--error"
ng-show="(scheduler_form.$invalid || !schedulerIsValid) && scheduler_form.$dirty">
<p class="SchedulerFormDetail-errorText">
<p class="SchedulerFormDetail-errorText" translate>
The scheduler options are invalid or incomplete.
</p>
</div>
<div class="SchedulerFormDetail-container"
ng-show="!scheduler_form.$invalid && schedulerIsValid">
<label class="SchedulerFormDetail-label">
<label class="SchedulerFormDetail-label" translate>
Schedule Description
</label>
<div class="SchedulerFormDetail-nlp" ng-hide="rrule_nlp_description == 'Natural language description not available' ">
@ -539,33 +564,37 @@
<div class="SchedulerFormDetail-occurrenceHeader">
<label class="SchedulerFormDetail-label
SchedulerFormDetail-labelOccurrence">
Occurrences
<span translate>Occurrences</span>
<span
class="SchedulerFormDetail-labelDetail">
class="SchedulerFormDetail-labelDetail"
translate>
(Limited to first 10)
</span>
</label>
<div id="date-choice"
class="SchedulerFormDetail-dateFormats">
<label
class="SchedulerFormDetail-dateFormatsLabel">
class="SchedulerFormDetail-dateFormatsLabel"
translate>
Date format
</label>
<label class="radio-inline SchedulerFormDetail-radioLabel">
<label class="radio-inline
SchedulerFormDetail-radioLabel">
<input type="radio"
class="SchedulerFormDetail-radioButton"
ng-model="dateChoice"
id="date-choice-local"
value="local" >
Local time
<span translate>Local time</span>
</label>
<label class="radio-inline SchedulerFormDetail-radioLabel">
<label class="radio-inline
SchedulerFormDetail-radioLabel">
<input type="radio"
class="SchedulerFormDetail-radioButton"
ng-model="dateChoice"
id="date-choice-utc"
value="utc" >
UTC
<span translate>UTC</span>
</label>
</div>
</div>
@ -590,18 +619,21 @@
class="btn btn-sm Form-cancelButton"
id="project_cancel_btn"
ng-show="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
ng-click="formCancel()">Close</button>
ng-click="formCancel()"
translate>Close</button>
<button type="button"
class="btn btn-sm Form-cancelButton"
id="project_cancel_btn"
ng-show="(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
ng-click="formCancel()">Cancel</button>
ng-click="formCancel()"
translate>Cancel</button>
<button type="button"
class="btn btn-sm Form-saveButton"
id="project_save_btn"
ng-click="saveSchedule()"
ng-show="(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
ng-disabled="scheduler_form.$invalid || !schedulerIsValid"> Save</button>
ng-disabled="scheduler_form.$invalid || !schedulerIsValid"
translate> Save</button>
</div>
</div>
</div>
</div>

View File

@ -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: {

View File

@ -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: '<div class="Prompt-bodyQuery">Are you sure you want to remove the ' + title + ' below from ' + $scope.name + '?</div><div class="Prompt-bodyTarget">' + name + '</div>',
action: action,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
};

View File

@ -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: '<div class="Prompt-bodyQuery">Are you sure you want to remove the following administrator from this organization?</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>',
hdr: i18n._('Delete'),
body: `<div class="Prompt-bodyQuery">${i18n._('Are you sure you want to remove the following administrator from this organization?')}</div><div class="Prompt-bodyTarget">` + $filter('sanitize')(name) + '</div>',
action: action,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
};

View File

@ -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 += "</tbody>\n";
html += "</table>\n";
title = "Sync Status";
title = i18n._("Sync Status");
attachElem(event, html, title);
});

View File

@ -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: '<div class="Prompt-bodyQuery">Are you sure you want to remove the following user from this organization?</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>',
hdr: i18n._('Delete'),
body: `<div class="Prompt-bodyQuery">${i18n._('Are you sure you want to remove the following user from this organization?')}</div><div class="Prompt-bodyTarget">` + $filter('sanitize')(name) + '</div>',
action: action,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
};

View File

@ -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')}&nbsp;<a ui-sref='teams.add'>${N_('Teams')}</a>&nbsp;${N_('section')}`;
list.emptyListText = `${i18n._('This list is populated by teams added from the')}&nbsp;<a ui-sref='teams.add'>${N_('Teams')}</a>&nbsp;${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")}&nbsp;<a ui-sref='inventories.add'>${N_("Inventories")}</a>&nbsp;${N_("section")}`;
list.emptyListText = `${i18n._("This list is populated by inventories added from the")}&nbsp;<a ui-sref='inventories.add'>${N_("Inventories")}</a>&nbsp;${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")}&nbsp;<a ui-sref='projects.add'>${N_("Projects")}</a>&nbsp;${N_("section")}`;
list.emptyListText = `${i18n._("This list is populated by projects added from the")}&nbsp;<a ui-sref='projects.add'>${N_("Projects")}</a>&nbsp;${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;
}]
}

View File

@ -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',

View File

@ -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',

View File

@ -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: '<div class="Prompt-bodyQuery">Are you sure you want to delete this schedule?</div>',
body: `<div class="Prompt-bodyQuery">${i18n._('Are you sure you want to delete this schedule?')}</div>`,
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'
];

View File

@ -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 = {

View File

@ -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')}}">
<div class="error"
ng-show="scheduler_form.$dirty && scheduler_form.schedulerName.$error.required">
{{ 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') }}
</label>
<label class="SchedulerFormDetail-radioLabel">
<label class="radio-inline
SchedulerFormDetail-radioLabel">
<input type="radio"
class="SchedulerFormDetail-radioButton"
ng-model="dateChoice"
@ -606,7 +607,8 @@
value="local" >
{{ strings.get('form.LOCAL_TIME_ZONE') }}
</label>
<label class="SchedulerFormDetail-radioLabel">
<label class="radio-inline
SchedulerFormDetail-radioLabel">
<input type="radio"
class="SchedulerFormDetail-radioButton"
ng-model="dateChoice"
@ -684,4 +686,4 @@
</div>
</div>
<prompt prompt-data="promptData" prevent-creds-with-passwords="preventCredsWithPasswords" action-text="{{:: strings.get('prompt.CONFIRM')}}" read-only-prompts="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"></prompt>
</div>
</div>

View File

@ -1857,7 +1857,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += `
<div class="List-noItems" ng-show="is_superuser">
System Administrators have access to all ${collection.iterator}s
${i18n._('System Administrators have access to all ' + collection.iterator + 's')}
</div>
`;
@ -1883,7 +1883,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
</div>`;
}
if (collection.fieldActions) {
html += `<div class="List-tableHeader List-tableHeader--actions ${collection.fieldActions.columnClass}">Actions</div>`;
html += `<div class="List-tableHeader List-tableHeader--actions ${collection.fieldActions.columnClass}">${i18n._('Actions')}</div>`;
}
html += "</div>";

View File

@ -412,7 +412,7 @@ export default ['$compile', 'Attr', 'Icon',
});
}
if (field_action === 'pending_deletion') {
innerTable += `<a ng-if='${list.iterator}.pending_deletion'>Pending Delete</a>`;
innerTable += `<a ng-if='${list.iterator}.pending_deletion'>${i18n._('Pending Delete')}</a>`;
} else if (field_action === 'submit') {
innerTable += `<at-launch-template template="${list.iterator}" ng-if="${list.iterator}.summary_fields.user_capabilities.start"></at-launch-template>`;
} else {

View File

@ -42,7 +42,7 @@
-->
<span class="Paginate-itemsOf">{{ 'ITEMS' | translate }}&nbsp;
<span>{{dataRange}}</span>
<span ng-hide="dataset.count <= basePageSize">of {{dataset.count | number}}</span>
<span ng-hide="dataset.count <= basePageSize">{{ 'of' | translate }} {{dataset.count | number}}</span>
</span>
<div class="Paginate-filteringDropdowns" ng-hide="hideViewPerPage || dataset.count <= basePageSize">
<div class="Paginate-filterLabel" translate>VIEW PER PAGE</div>

View File

@ -75,11 +75,11 @@ export default ['$scope', 'Rest', 'TeamList', 'Prompt',
};
Prompt({
hdr: 'Delete',
hdr: i18n._('Delete'),
resourceName: $filter('sanitize')(name),
body: '<div class="Prompt-bodyQuery">' + i18n._('Are you sure you want to delete this team?') + '</div>',
action: action,
actionText: 'DELETE'
actionText: i18n._('DELETE')
});
};
}

View File

@ -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',

View File

@ -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: '<div class="Prompt-bodyQuery">Confirm the removal of the <span class="Prompt-emphasis">' + $filter('sanitize')(label.name) + '</span> label.</div>',
action: action,
actionText: 'REMOVE'
actionText: i18n._('REMOVE')
});
};

View File

@ -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 = () => {

View File

@ -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,

View File

@ -44,9 +44,9 @@ export default ['i18n', function(i18n){
label: i18n._('Answer Variable Name'),
control:
'<div><input type="text" ng-model="variable" name="variable" id="survey_question_variable" class="form-control Form-textInput ng-pristine ng-invalid ng-invalid-required" required="" aw-survey-variable-name>'+
'<div class="error ng-hide" id="survey_question-variable-required-error" ng-show="survey_question_form.variable.$dirty && survey_question_form.variable.$error.required" translate>Please enter an answer variable name.</div>'+
'<div class="error ng-hide" id="survey_question-variable-variable-error" ng-show="survey_question_form.variable.$dirty && survey_question_form.variable.$error.variable" translate>Please remove the illegal character from the survey question variable name.</div>'+
'<div class="error ng-hide" id="survey_question-variable-duplicate-error" ng-show="duplicate" translate>This question variable is already in use. Please enter a different variable name.</div>' +
'<div class="error ng-hide" id="survey_question-variable-required-error" ng-show="survey_question_form.variable.$dirty && survey_question_form.variable.$error.required">' + i18n._('Please enter an answer variable name.') + '</div>'+
'<div class="error ng-hide" id="survey_question-variable-variable-error" ng-show="survey_question_form.variable.$dirty && survey_question_form.variable.$error.variable">' + i18n._('Please remove the illegal character from the survey question variable name.') + '</div>'+
'<div class="error ng-hide" id="survey_question-variable-duplicate-error" ng-show="duplicate">' + i18n._('This question variable is already in use. Please enter a different variable name.') + '</div>' +
'<div class="error api-error ng-binding" id="survey_question-variable-api-error" ng-bind="variable_api_error"></div>'+
'</div>',
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:'<div class="row">'+
'<div class="col-sm-6">'+
'<label for="text_min"><span class="Form-inputLabel" translate>Minimum Length</span></label><input id="text_min" name="text_min" ng-model="text_min" min=0 aw-min="0" aw-max="text_max" aw-spinner="text_min" integer>'+
'<div class="error" ng-show="survey_question_form.text_min.$error.integer || survey_question_form.text_min.$error.number" translate>The minimum length you entered is not a valid number. Please enter a whole number.</div>'+
'<div class="error" ng-show="survey_question_form.text_min.$error.awMax" translate>The minimium length is too high. Please enter a lower number.</div>'+
'<div class="error" ng-show="survey_question_form.text_min.$error.awMin" translate>The minimum length is too low. Please enter a positive number.</div>'+
'<label for="text_min"><span class="Form-inputLabel">' + i18n._('Minimum Length') + '</span></label><input id="text_min" name="text_min" ng-model="text_min" min=0 aw-min="0" aw-max="text_max" aw-spinner="text_min" integer>'+
'<div class="error" ng-show="survey_question_form.text_min.$error.integer || survey_question_form.text_min.$error.number">' + i18n._('The minimum length you entered is not a valid number. Please enter a whole number.') + '</div>'+
'<div class="error" ng-show="survey_question_form.text_min.$error.awMax">' + i18n._('The minimium length is too high. Please enter a lower number.') + '</div>'+
'<div class="error" ng-show="survey_question_form.text_min.$error.awMin">' + i18n._('The minimum length is too low. Please enter a positive number.') + '</div>'+
'</div>'+
'<div class="col-sm-6">'+
'<label for="text_max"><span class="Form-inputLabel" translate>Maximum Length</span></label><input id="text_max" name="text_max" ng-model="text_max" aw-min="text_min || 0" min=0 aw-spinner="text_max" integer>'+
'<div class="error" ng-show="survey_question_form.text_max.$error.integer || survey_question_form.text_max.$error.number" translate>The maximum length you entered is not a valid number. Please enter a whole nnumber.</div>'+
'<div class="error" ng-show="survey_question_form.text_max.$error.awMin" translate>The maximum length is too low. Please enter a number larger than the minimum length you set.</div>'+
'<label for="text_max"><span class="Form-inputLabel">' + i18n._('Maximum Length') + '</span></label><input id="text_max" name="text_max" ng-model="text_max" aw-min="text_min || 0" min=0 aw-spinner="text_max" integer>'+
'<div class="error" ng-show="survey_question_form.text_max.$error.integer || survey_question_form.text_max.$error.number">' + i18n._('The maximum length you entered is not a valid number. Please enter a whole nnumber.') + '</div>'+
'<div class="error" ng-show="survey_question_form.text_max.$error.awMin">' + i18n._('The maximum length is too low. Please enter a number larger than the minimum length you set.') + '</div>'+
'</div>'+
'</div>',
ngShow: 'type.type==="text" ',
@ -110,15 +110,15 @@ export default ['i18n', function(i18n){
type: 'custom',
control:'<div class="row">'+
'<div class="col-sm-6">'+
'<label for="textarea_min"><span class="Form-inputLabel" translate>Minimum Length</span></label><input id="textarea_min" type="number" name="textarea_min" ng-model="textarea_min" min=0 aw-min="0" aw-max="textarea_max" class="form-control Form-textInput" integer />'+
'<div class="error" ng-show="survey_question_form.textarea_min.$error.integer || survey_question_form.textarea_min.$error.number" translate>The minimum length you entered is not a valid number. Please enter a whole number.</div>'+
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMax" translate>The minimium length is too high. Please enter a lower number.</div>'+
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMin" translate>The minimum length is too low. Please enter a positive number.</div>'+
'<label for="textarea_min"><span class="Form-inputLabel">' + i18n._('Minimum Length') + '</span></label><input id="textarea_min" type="number" name="textarea_min" ng-model="textarea_min" min=0 aw-min="0" aw-max="textarea_max" class="form-control Form-textInput" integer />'+
'<div class="error" ng-show="survey_question_form.textarea_min.$error.integer || survey_question_form.textarea_min.$error.number">' + i18n._('The minimum length you entered is not a valid number. Please enter a whole number.') + '</div>'+
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMax">' + i18n._('The minimium length is too high. Please enter a lower number.') + '</div>'+
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMin">' + i18n._('The minimum length is too low. Please enter a positive number.') + '</div>'+
'</div>'+
'<div class="col-sm-6">'+
'<label for="textarea_max"><span class="Form-inputLabel" translate>Maximum Length</span></label><input id="textarea_max" type="number" name="textarea_max" ng-model="textarea_max" aw-min="textarea_min || 0" min=0 class="form-control Form-textInput" integer >'+
'<div class="error" ng-show="survey_question_form.textarea_max.$error.integer || survey_question_form.textarea_max.$error.number" translate>The maximum length you entered is not a valid number. Please enter a whole number.</div>'+
'<div class="error" ng-show="survey_question_form.textarea_max.$error.awMin" translate>The maximum length is too low. Please enter a number larger than the minimum length you set.</div>'+
'<label for="textarea_max"><span class="Form-inputLabel">' + i18n._('Maximum Length') + '</span></label><input id="textarea_max" type="number" name="textarea_max" ng-model="textarea_max" aw-min="textarea_min || 0" min=0 class="form-control Form-textInput" integer >'+
'<div class="error" ng-show="survey_question_form.textarea_max.$error.integer || survey_question_form.textarea_max.$error.number">' + i18n._('The maximum length you entered is not a valid number. Please enter a whole number.') + '</div>'+
'<div class="error" ng-show="survey_question_form.textarea_max.$error.awMin">' + i18n._('The maximum length is too low. Please enter a number larger than the minimum length you set.') + '</div>'+
'</div>'+
'</div>',
ngShow: 'type.type==="textarea" ',
@ -131,15 +131,15 @@ export default ['i18n', function(i18n){
type: 'custom',
control:'<div class="row">'+
'<div class="col-sm-6">'+
'<label for="password_min"><span class="Form-inputLabel" translate>Minimum Length</span></label><input id="password_min" type="number" name="password_min" ng-model="password_min" min=0 aw-min="0" aw-max="password_max" class="form-control Form-textInput" integer />'+
'<div class="error" ng-show="survey_question_form.password_min.$error.integer || survey_question_form.password_min.$error.number" translate>The minimum length you entered is not a valid number. Please enter a whole number.</div>'+
'<div class="error" ng-show="survey_question_form.password_min.$error.awMax" translate>The minimium length is too high. Please enter a lower number.</div>'+
'<div class="error" ng-show="survey_question_form.password_min.$error.awMin" translate>The minimum length is too low. Please enter a positive number.</div>'+
'<label for="password_min"><span class="Form-inputLabel">' + i18n._('Minimum Length') + '</span></label><input id="password_min" type="number" name="password_min" ng-model="password_min" min=0 aw-min="0" aw-max="password_max" class="form-control Form-textInput" integer />'+
'<div class="error" ng-show="survey_question_form.password_min.$error.integer || survey_question_form.password_min.$error.number">' + i18n._('The minimum length you entered is not a valid number. Please enter a whole number.') + '</div>'+
'<div class="error" ng-show="survey_question_form.password_min.$error.awMax">' + i18n._('The minimium length is too high. Please enter a lower number.') + '</div>'+
'<div class="error" ng-show="survey_question_form.password_min.$error.awMin">' + i18n._('The minimum length is too low. Please enter a positive number.') + '</div>'+
'</div>'+
'<div class="col-sm-6">'+
'<label for="password_max"><span class="Form-inputLabel" translate>Maximum Length</span></label><input id="password_max" type="number" name="password_max" ng-model="password_max" aw-min="password_min || 0" min=0 class="form-control Form-textInput" integer >'+
'<div class="error" ng-show="survey_question_form.password_max.$error.integer || survey_question_form.password_max.$error.number" translate>The maximum length you entered is not a valid number. Please enter a whole number.</div>'+
'<div class="error" ng-show="survey_question_form.password_max.$error.awMin" translate>The maximum length is too low. Please enter a number larger than the minimum length you set.</div>'+
'<label for="password_max"><span class="Form-inputLabel">' + i18n._('Maximum Length') + '</span></label><input id="password_max" type="number" name="password_max" ng-model="password_max" aw-min="password_min || 0" min=0 class="form-control Form-textInput" integer >'+
'<div class="error" ng-show="survey_question_form.password_max.$error.integer || survey_question_form.password_max.$error.number">' + i18n._('The maximum length you entered is not a valid number. Please enter a whole number.') + '</div>'+
'<div class="error" ng-show="survey_question_form.password_max.$error.awMin">' + i18n._('The maximum length is too low. Please enter a number larger than the minimum length you set.') + '</div>'+
'</div>'+
'</div>',
ngShow: 'type.type==="password" ',
@ -153,14 +153,14 @@ export default ['i18n', function(i18n){
type: 'custom',
control:'<div class="row">'+
'<div class="col-sm-6">'+
'<label for="minimum"><span class="Form-inputLabel" translate>Minimum</span></label><input id="int_min" type="number" name="int_min" ng-model="int_min" aw-max="int_max" class="form-control Form-textInput" integer >'+
'<div class="error" ng-show="survey_question_form.int_min.$error.integer || survey_question_form.int_min.$error.number" translate>Please enter a valid integer.</div>'+
'<div class="error" ng-show="survey_question_form.int_min.$error.awMax" translate>Please enter a smaller integer.</div>'+
'<label for="minimum"><span class="Form-inputLabel">' + i18n._('Minimum') + '</span></label><input id="int_min" type="number" name="int_min" ng-model="int_min" aw-max="int_max" class="form-control Form-textInput" integer >'+
'<div class="error" ng-show="survey_question_form.int_min.$error.integer || survey_question_form.int_min.$error.number">' + i18n._('Please enter a valid integer.') + '</div>'+
'<div class="error" ng-show="survey_question_form.int_min.$error.awMax">' + i18n._('Please enter a smaller integer.') + '</div>'+
'</div>'+
'<div class="col-sm-6">'+
'<label for="minimum"><span class="Form-inputLabel" translate>Maximum</span></label><input id="int_max" type="number" name="int_max" ng-model="int_max" aw-min="int_min" class="form-control Form-textInput" integer >'+
'<div class="error" ng-show="survey_question_form.int_max.$error.integer || survey_question_form.int_max.$error.number" translate>Please enter a valid integer.</div>'+
'<div class="error" ng-show="survey_question_form.int_max.$error.awMin" translate>Please enter a larger integer.</div>'+
'<label for="minimum"><span class="Form-inputLabel">' + i18n._('Maximum') + '</span></label><input id="int_max" type="number" name="int_max" ng-model="int_max" aw-min="int_min" class="form-control Form-textInput" integer >'+
'<div class="error" ng-show="survey_question_form.int_max.$error.integer || survey_question_form.int_max.$error.number">' + i18n._('Please enter a valid integer.') + '</div>'+
'<div class="error" ng-show="survey_question_form.int_max.$error.awMin">' + i18n._('Please enter a larger integer.') + '</div>'+
'</div>'+
'</div>',
ngShow: 'type.type==="integer" ',
@ -173,14 +173,14 @@ export default ['i18n', function(i18n){
type: 'custom',
control: '<div class="row">'+
'<div class="col-sm-6">'+
'<label for="minimum"><span class="Form-inputLabel" translate>Minimum</span></label><input id="float_min" type="number" name="float_min" ng-model="float_min" class="form-control Form-textInput" smart-float aw-max="float_max">'+
'<div class="error" ng-show="survey_question_form.float_min.$error.float || survey_question_form.float_min.$error.number" translate>Please enter a valid float.</div>'+
'<div class="error" ng-show="survey_question_form.float_min.$error.awMax" translate>Please enter a smaller float.</div>'+
'<label for="minimum"><span class="Form-inputLabel">' + i18n._('Minimum') + '</span></label><input id="float_min" type="number" name="float_min" ng-model="float_min" class="form-control Form-textInput" smart-float aw-max="float_max">'+
'<div class="error" ng-show="survey_question_form.float_min.$error.float || survey_question_form.float_min.$error.number">' + i18n._('Please enter a valid float.') + '</div>'+
'<div class="error" ng-show="survey_question_form.float_min.$error.awMax">' + i18n._('Please enter a smaller float.') + '</div>'+
'</div>'+
'<div class="col-sm-6">'+
'<label for="maximum"><span class="Form-inputLabel" translate>Maximum</span></label><input id="float_max" type="number" name="float_max" ng-model="float_max" class="form-control Form-textInput" smart-float aw-min="float_min">'+
'<div class="error" ng-show="survey_question_form.float_max.$error.float" translate>Please enter a valid float.</div>'+
'<div class="error" ng-show="survey_question_form.float_max.$error.awMin" translate>Please enter a larger float.</div>'+
'<label for="maximum"><span class="Form-inputLabel">' + i18n._('Maximum<') + '/span></label><input id="float_max" type="number" name="float_max" ng-model="float_max" class="form-control Form-textInput" smart-float aw-min="float_min">'+
'<div class="error" ng-show="survey_question_form.float_max.$error.float">' + i18n._('Please enter a valid float.') + '</div>'+
'<div class="error" ng-show="survey_question_form.float_max.$error.awMin">' + i18n._('Please enter a larger float.') + '</div>'+
'</div>'+
'</div>',
@ -193,12 +193,12 @@ export default ['i18n', function(i18n){
realName: 'default_answer',
type: 'custom' ,
control: '<div class="form-group" >'+
'<label for="default"><span class="Form-inputLabel" translate>Default Answer</span></label>'+
'<label for="default"><span class="Form-inputLabel">' + i18n._('Default Answer') + '</span></label>'+
'<div>'+
'<input type="text" ng-model="default" name="default" id="default" class="form-control Form-textInput">'+
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="invalidChoice" translate>Please enter an answer from the choices listed.</div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="minTextError" translate>The answer is shorter than the minimium length. Please make the answer longer. </div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="maxTextError" translate>The answer is longer than the maximum length. Please make the answer shorter. </div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="invalidChoice">' + i18n._('Please enter an answer from the choices listed.') + '</div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="minTextError">' + i18n._('The answer is shorter than the minimium length. Please make the answer longer.') + '</div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="maxTextError">' + i18n._('The answer is longer than the maximum length. Please make the answer shorter.') + '</div>' +
'<div class="error api-error ng-binding" id="survey_question-default-api-error" ng-bind="default_api_error"></div>'+
'</div>'+
'</div>',
@ -210,10 +210,10 @@ export default ['i18n', function(i18n){
realName: 'default_answer' ,
type: 'custom',
control: '<div class="form-group">'+
'<label for="default_multiselect"><span class="Form-inputLabel" translate>Default Answer</span></label>'+
'<label for="default_multiselect"><span class="Form-inputLabel">' + i18n._('Default Answer') + '</span></label>'+
'<div>'+
'<textarea rows="3" ng-model="default_multiselect" name="default_multiselect" class="form-control Form-textArea ng-pristine ng-valid" id="default_multiselect" aw-watch=""></textarea>'+
'<div class="error ng-hide" id="survey_question-default_multiselect-duplicate-error" ng-show="invalidChoice" translate>Please enter an answer/answers from the choices listed.</div>' +
'<div class="error ng-hide" id="survey_question-default_multiselect-duplicate-error" ng-show="invalidChoice">' + i18n._('Please enter an answer/answers from the choices listed.') + '</div>' +
'<div class="error api-error ng-binding" id="survey_question-default_multiselect-api-error" ng-bind="default_multiselect_api_error"></div>'+
'</div>'+
'</div>',
@ -225,11 +225,11 @@ export default ['i18n', function(i18n){
realName: 'default_answer',
type: 'custom',
control: '<div>'+
'<label for="default_int"><span class="Form-inputLabel" translate>Default Answer</span></label>'+
'<label for="default_int"><span class="Form-inputLabel">' + i18n._('Default Answer') + '</span></label>'+
'<input type="number" ng-model="default_int" name="default_int" aw-range range-min="int_min" range-max="int_max" class="form-control Form-textInput" integer />'+
'<div class="error" ng-show="survey_question_form.default_int.$error.number || survey_question_form.default_int.$error.integer" translate>Please enter a valid integer.</div>'+
'<div class="error" ng-show="survey_question_form.default_int.$error.awRangeMin" translate> Please enter a minimum default of {{int_min}}.</div>'+
'<div class="error" ng-show="survey_question_form.default_int.$error.awRangeMax" translate> Please enter a maximum default of {{int_max}}.</div>'+
'<div class="error" ng-show="survey_question_form.default_int.$error.number || survey_question_form.default_int.$error.integer">' + i18n._('Please enter a valid integer.') + '</div>'+
'<div class="error" ng-show="survey_question_form.default_int.$error.awRangeMin">' + i18n._('Please enter a minimum default of {{int_min}}.') + '</div>'+
'<div class="error" ng-show="survey_question_form.default_int.$error.awRangeMax">' + i18n._('Please enter a maximum default of {{int_max}}.') + '</div>'+
'</div>',
column: 2,
ngShow: 'type.type === "integer" ',
@ -239,11 +239,11 @@ export default ['i18n', function(i18n){
realName: 'default_answer',
type: 'custom',
control: '<div>'+
'<label for="default_float"><span class="Form-inputLabel" translate>Default Answer</span></label>'+
'<label for="default_float"><span class="Form-inputLabel">' + i18n._('Default Answer') + '</span></label>'+
'<input type="number" ng-model="default_float" name="default_float" aw-range range-min="float_min" range-max="float_max" class="form-control Form-textInput" />'+
'<div class="error" ng-show="survey_question_form.default_float.$error.number || survey_question_form.default_float.$error.float" translate>Please enter a valid float.</div>'+
'<div class="error" ng-show="survey_question_form.default_float.$error.awRangeMin" translate> Please enter a minimum default of {{float_min}}.</div>'+
'<div class="error" ng-show="survey_question_form.default_float.$error.awRangeMax" translate> Please enter a maximum default of {{float_max}}.</div>'+
'<div class="error" ng-show="survey_question_form.default_float.$error.number || survey_question_form.default_float.$error.float">' + i18n._('Please enter a valid float.') + '</div>'+
'<div class="error" ng-show="survey_question_form.default_float.$error.awRangeMin">' + i18n._('Please enter a minimum default of {{float_min}}.') + '</div>'+
'<div class="error" ng-show="survey_question_form.default_float.$error.awRangeMax">' + i18n._('Please enter a maximum default of {{float_max}}.') + '</div>'+
'</div>',
column: 2,
ngShow: 'type.type=== "float" ',
@ -253,11 +253,11 @@ export default ['i18n', function(i18n){
realName: "default_answer" ,
type: 'custom',
control: '<div class="form-group Form-formGroup Form-formGroup--singleColumn">'+
'<label for="default_textarea"><span class="Form-inputLabel" translate>Default Answer</span></label>'+
'<label for="default_textarea"><span class="Form-inputLabel">' + i18n._('Default Answer') + '</span></label>'+
'<div>'+
'<textarea rows="3" ng-model="default_textarea" name="default_textarea" class="form-control Form-textArea ng-valid ng-dirty" id="default_textarea"></textarea>'+
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="minTextError" translate>The answer is shorter than the minimium length. Please make the answer longer. </div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="maxTextError" translate>The answer is longer than the maximum length. Please make the answer shorter. </div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="minTextError">' + i18n._('The answer is shorter than the minimium length. Please make the answer longer.') + '</div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="maxTextError">' + i18n._('The answer is longer than the maximum length. Please make the answer shorter.') + '</div>' +
'<div class="error api-error ng-binding" id="survey_question-default_textarea-api-error" ng-bind="default_textarea_api_error"></div>'+
'</div>'+
'</div>',
@ -269,16 +269,16 @@ export default ['i18n', function(i18n){
realName: 'default_answer' ,
type: 'custom' ,
control: '<div class="form-group">'+
'<label for="default_password"><span class="Form-inputLabel" translate>Default Answer</span></label>'+
'<label for="default_password"><span class="Form-inputLabel">' + i18n._('Default Answer') + '</span></label>'+
'<div>'+
'<div class="input-group">'+
'<span class="input-group-btn input-group-prepend">'+
'<button type="button" class="btn btn-default show_input_button" id="default_password_show_input_button" aw-tool-tip="Toggle the display of plaintext." aw-tip-placement="top" ng-click="toggleInput(&quot;#default_password&quot;)" data-container="#survey-modal-dialog" data-original-title="" title="" translate>SHOW</button>'+
'<button type="button" class="btn btn-default show_input_button" id="default_password_show_input_button" aw-tool-tip="Toggle the display of plaintext." aw-tip-placement="top" ng-click="toggleInput(&quot;#default_password&quot;)" data-container="#survey-modal-dialog" data-original-title="" title="">SHOW</button>'+
'</span>'+
'<input id="default_password" type="password" ng-model="default_password" name="default_password" class="form-control Form-textInput" autocomplete="false">'+
'</div>'+
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="minTextError" translate>The answer is shorter than the minimium length. Please make the answer longer. </div>' +
'<div class="error ng-hide" id="survey_question-default-password-duplicate-error" ng-show="maxTextError" translate>The answer is longer than the maximum length. Please make the answer shorter. </div>' +
'<div class="error ng-hide" id="survey_question-default-duplicate-error" ng-show="minTextError">' + i18n._('The answer is shorter than the minimium length. Please make the answer longer.') + '</div>' +
'<div class="error ng-hide" id="survey_question-default-password-duplicate-error" ng-show="maxTextError">' + i18n._('The answer is longer than the maximum length. Please make the answer shorter.') + '</div>' +
'<div class="error api-error ng-binding" id="survey_question-default-password-api-error" ng-bind="default_api_error"></div>'+
'</div>'+
'</div>',
@ -309,4 +309,4 @@ export default ['i18n', function(i18n){
}
}
};
}];
}];

View File

@ -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',

View File

@ -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();
});

View File

@ -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');

View File

@ -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: `<div class='Prompt-bodyQuery'>
Are you sure you want to delete this workflow?
${i18n._('Are you sure you want to delete this workflow?')}
</div>`,
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: `<div class='Prompt-bodyQuery'>
Are you sure you want to cancel this workflow job?
${i18n._('Are you sure you want to cancel this workflow job?')}
</div>`,
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) {

View File

@ -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`] = `<span class='WorkflowStatusBar-tooltipLabel'>${key}</span><span class='badge WorkflowStatusBar-tooltipBadge WorkflowStatusBar-tooltipBadge--${key}'>${val[key]}</span>`;
scope[`${key}CountTip`] = `<span class='WorkflowStatusBar-tooltipLabel'>${tooltipLabel}</span><span class='badge WorkflowStatusBar-tooltipBadge WorkflowStatusBar-tooltipBadge--${key}'>${val[key]}</span>`;
}
});

View File

@ -2,13 +2,17 @@
<div class="WorkflowStatusBar-successful"
data-placement="top"
aw-tool-tip="{{successfulCountTip}}"
data-tip-watch="successfulCountTip"></div>
data-tip-watch="successfulCountTip">
</div>
<div class="WorkflowStatusBar-failed"
data-placement="top"
aw-tool-tip="{{failedCountTip}}"
data-tip-watch="failedCountTip"></div>
data-tip-watch="failedCountTip">
</div>
<div class="WorkflowStatusBar-noData"
aw-tool-tip="NO JOBS FINISHED"
aw-tool-tip="{{strings.get('workflow_status.NO_JOBS_FINISHED')}}"
data-tip-watch="strings.get('workflow_status.NO_JOBS_FINISHED')"
ng-hide="hostsFinished"
data-placement="top"></div>
</div>
data-placement="top">
</div>
</div>

View File

@ -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, {});
});