mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 06:17:36 -02:30
Updated strings for i18n
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<div class="Section-messageBar" ng-if="vm.show_auditor_bar">
|
<div class="Section-messageBar" ng-if="vm.show_auditor_bar">
|
||||||
<i class="fa fa-warning"></i>
|
<i class="fa fa-warning"></i>
|
||||||
System auditors have read-only permissions in this section.
|
<span translate>System auditors have read-only permissions in this section.</span>
|
||||||
<button class="Section-messageBar--close" ng-click="vm.closeMessageBar()"><i class="fa fa-times-circle"></i></button>
|
<button class="Section-messageBar--close" ng-click="vm.closeMessageBar()"><i class="fa fa-times-circle"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import {templateUrl} from '../shared/template-url/template-url.factory';
|
import {templateUrl} from '../shared/template-url/template-url.factory';
|
||||||
import ConfigurationController from './configuration.controller';
|
import ConfigurationController from './configuration.controller';
|
||||||
|
import { N_ } from '../i18n';
|
||||||
|
|
||||||
// Import form controllers
|
// Import form controllers
|
||||||
import ConfigurationAuthController from './auth-form/configuration-auth.controller';
|
import ConfigurationAuthController from './auth-form/configuration-auth.controller';
|
||||||
|
|||||||
@@ -128,7 +128,13 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper'])
|
|||||||
// Accepts image and returns base64 information with basic validation
|
// Accepts image and returns base64 information with basic validation
|
||||||
// Can eventually expand to handle all uploads with different endpoints and handlers
|
// Can eventually expand to handle all uploads with different endpoints and handlers
|
||||||
//
|
//
|
||||||
.directive('imageUpload', ['ConfigurationUtils', function(ConfigurationUtils) {
|
.directive('imageUpload', ['ConfigurationUtils', 'i18n',
|
||||||
|
function(ConfigurationUtils, i18n) {
|
||||||
|
var browseText = i18n._('BROWSE'),
|
||||||
|
placeholderText = i18n._('Choose file'),
|
||||||
|
uploadedText = i18n._('Custom logo has been uploaded'),
|
||||||
|
removeText = i18n._('REMOVE');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
@@ -136,13 +142,13 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper'])
|
|||||||
},
|
},
|
||||||
template: `
|
template: `
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<label class="input-group-addon Form-filePicker--pickerButton" id="filePickerButton" for="filePicker" ng-click="update($event)">BROWSE</label>
|
<label class="input-group-addon Form-filePicker--pickerButton" id="filePickerButton" for="filePicker" ng-click="update($event)">${browseText}</label>
|
||||||
<input type="text" class="form-control Form-filePicker--textBox" id="filePickerText" placeholder="Choose file" readonly>
|
<input type="text" class="form-control Form-filePicker--textBox" id="filePickerText" placeholder="${placeholderText}" readonly>
|
||||||
<input type="file" name="file" class="Form-filePicker" id="filePicker" onchange="angular.element(this).scope().fileChange(this.files)"/>
|
<input type="file" name="file" class="Form-filePicker" id="filePicker" onchange="angular.element(this).scope().fileChange(this.files)"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- Update when API supports file name saving
|
<!-- Update when API supports file name saving
|
||||||
<div ng-if="imagePresent" class="Form-filePicker--selectedFile">
|
<div ng-if="imagePresent" class="Form-filePicker--selectedFile">
|
||||||
Custom logo has been uploaded.
|
${uploadedText}
|
||||||
</div>-->
|
</div>-->
|
||||||
<!-- Thumbnail feature
|
<!-- Thumbnail feature
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
@@ -161,12 +167,11 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper'])
|
|||||||
scope.$on('loginUpdated', function() {
|
scope.$on('loginUpdated', function() {
|
||||||
scope.imagePresent = global.$AnsibleConfig.custom_logo;
|
scope.imagePresent = global.$AnsibleConfig.custom_logo;
|
||||||
});
|
});
|
||||||
|
|
||||||
scope.update = function(e) {
|
scope.update = function(e) {
|
||||||
if(scope.$parent[fieldKey]) {
|
if(scope.$parent[fieldKey]) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
scope.$parent[fieldKey] = '';
|
scope.$parent[fieldKey] = '';
|
||||||
filePickerButton.html('BROWSE');
|
filePickerButton.html(browseText);
|
||||||
filePickerText.val('');
|
filePickerText.val('');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -181,7 +186,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper'])
|
|||||||
.then(function(result) {
|
.then(function(result) {
|
||||||
scope.$parent[fieldKey] = result;
|
scope.$parent[fieldKey] = result;
|
||||||
filePickerText.val(file[0].name);
|
filePickerText.val(file[0].name);
|
||||||
filePickerButton.html('REMOVE');
|
filePickerButton.html(removeText);
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
filePickerText.html(file[0].name);
|
filePickerText.html(file[0].name);
|
||||||
filePickerError.text(error);
|
filePickerError.text(error);
|
||||||
|
|||||||
@@ -678,7 +678,8 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
|
|
||||||
if(field.reset && !field.disabled) {
|
if(field.reset && !field.disabled) {
|
||||||
var resetValue = "'" + field.reset+ "'";
|
var resetValue = "'" + field.reset+ "'";
|
||||||
html+= `<a class="Form-resetValue" ng-click="resetValue(${resetValue})">` + i18n._("Reset") + `</a>`;
|
var resetMessage = i18n._('Reset');
|
||||||
|
html+= `<a class="Form-resetValue" ng-click="resetValue(${resetValue})">${resetMessage}</a>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "\n\t</label>\n";
|
html += "\n\t</label>\n";
|
||||||
@@ -1271,7 +1272,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
|
|
||||||
for (i = 0; i < field.options.length; i++) {
|
for (i = 0; i < field.options.length; i++) {
|
||||||
html += "<label class=\"radio-inline ";
|
html += "<label class=\"radio-inline ";
|
||||||
html += (field.options[i].labelClass) ? ` ${field.options[i].labelClass} "` : "\"";
|
html += (field.options[i].labelClass) ? ` ${field.options[i].labelClass} "` : "\"";
|
||||||
html += (field.options[i].ngShow) ? this.attr(field.options[i], 'ngShow') : "";
|
html += (field.options[i].ngShow) ? this.attr(field.options[i], 'ngShow') : "";
|
||||||
html += ">";
|
html += ">";
|
||||||
html += "<input type=\"radio\" ";
|
html += "<input type=\"radio\" ";
|
||||||
|
|||||||
Reference in New Issue
Block a user