mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 03:17:39 -02:30
Merge pull request #5476 from ryanpetrello/fix-5453
mark a variety of host-related strings for i18n
This commit is contained in:
1
awx/ui/client/languages/fr.json
Normal file
1
awx/ui/client/languages/fr.json
Normal file
File diff suppressed because one or more lines are too long
1
awx/ui/client/languages/ja.json
Normal file
1
awx/ui/client/languages/ja.json
Normal file
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
|||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default function(){
|
export default ['i18n', function(i18n){
|
||||||
return {
|
return {
|
||||||
editTitle: '{{host.name}}',
|
editTitle: '{{host.name}}',
|
||||||
name: 'host',
|
name: 'host',
|
||||||
@@ -20,47 +20,54 @@ export default function(){
|
|||||||
ngClick: 'toggleHostEnabled()',
|
ngClick: 'toggleHostEnabled()',
|
||||||
type: 'toggle',
|
type: 'toggle',
|
||||||
|
|
||||||
awToolTip: "<p>Indicates if a host is available and should be included in running jobs.</p><p>For hosts that " +
|
awToolTip: "<p>" +
|
||||||
"are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.</p>",
|
i18n._("Indicates if a host is available and should be included in running jobs.") +
|
||||||
dataTitle: 'Host Enabled'
|
"</p><p>" +
|
||||||
|
i18n._("For hosts that are part of an external inventory, this" +
|
||||||
|
" flag cannot be changed. It will be set by the inventory" +
|
||||||
|
" sync process.") +
|
||||||
|
"</p>",
|
||||||
|
dataTitle: i18n._('Host Enabled'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
name: {
|
||||||
label: 'Host Name',
|
label: i18n._('Host Name'),
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
|
||||||
value: '{{name}}',
|
value: '{{name}}',
|
||||||
awPopOver: "<p>Provide a host name, ip address, or ip address:port. Examples include:</p>" +
|
awPopOver: "<p>" +
|
||||||
|
i18n._("Provide a host name, ip address, or ip address:port. Examples include:") +
|
||||||
|
"</p>" +
|
||||||
"<blockquote>myserver.domain.com<br/>" +
|
"<blockquote>myserver.domain.com<br/>" +
|
||||||
"127.0.0.1<br />" +
|
"127.0.0.1<br />" +
|
||||||
"10.1.0.140:25<br />" +
|
"10.1.0.140:25<br />" +
|
||||||
"server.example.com:25" +
|
"server.example.com:25" +
|
||||||
"</blockquote>",
|
"</blockquote>",
|
||||||
dataTitle: 'Host Name',
|
dataTitle: i18n._('Host Name'),
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
dataContainer: 'body'
|
dataContainer: 'body'
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
label: 'Description',
|
label: i18n._('Description'),
|
||||||
type: 'text',
|
type: 'text',
|
||||||
},
|
},
|
||||||
variables: {
|
variables: {
|
||||||
label: 'Variables',
|
label: i18n._('Variables'),
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
rows: 6,
|
rows: 6,
|
||||||
class: 'modal-input-xlarge Form-textArea Form-formGroup--fullWidth',
|
class: 'modal-input-xlarge Form-textArea Form-formGroup--fullWidth',
|
||||||
dataTitle: 'Host Variables',
|
dataTitle: i18n._('Host Variables'),
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
default: '---',
|
default: '---',
|
||||||
awPopOver: "<p>Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.</p>" +
|
awPopOver: "<p>" + i18n._("Enter inventory variables using either JSON or YAML syntax. Use the radio button to toggle between the two.") + "</p>" +
|
||||||
"JSON:<br />\n" +
|
"JSON:<br />\n" +
|
||||||
"<blockquote>{<br /> \"somevar\": \"somevalue\",<br /> \"password\": \"magic\"<br /> }</blockquote>\n" +
|
"<blockquote>{<br /> \"somevar\": \"somevalue\",<br /> \"password\": \"magic\"<br /> }</blockquote>\n" +
|
||||||
"YAML:<br />\n" +
|
"YAML:<br />\n" +
|
||||||
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
|
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
|
||||||
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
'<p>' + i18n.sprintf(i18n._('View JSON examples at %s'), '<a href="http://www.json.org" target="_blank">www.json.org</a>') + '</p>' +
|
||||||
'<p>View YAML examples at <a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a></p>',
|
'<p>' + i18n.sprintf(i18n._('View YAML examples at %s'), '<a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a>') + '</p>',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
@@ -73,4 +80,4 @@ export default function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}];
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ export default [ 'i18n', function(i18n){
|
|||||||
name: 'hosts',
|
name: 'hosts',
|
||||||
iterator: 'host',
|
iterator: 'host',
|
||||||
selectTitle: i18n._('Add Existing Hosts'),
|
selectTitle: i18n._('Add Existing Hosts'),
|
||||||
editTitle: 'Hosts',
|
editTitle: i18n._('Hosts'),
|
||||||
listTitle: 'Hosts',
|
listTitle: i18n._('Hosts'),
|
||||||
index: false,
|
index: false,
|
||||||
hover: true,
|
hover: true,
|
||||||
well: true,
|
well: true,
|
||||||
@@ -33,7 +33,7 @@ export default [ 'i18n', function(i18n){
|
|||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
key: true,
|
key: true,
|
||||||
label: 'Name',
|
label: i18n._('Name'),
|
||||||
columnClass: 'col-lg-5 col-md-5 col-sm-5 col-xs-8 ellipsis List-staticColumnAdjacent',
|
columnClass: 'col-lg-5 col-md-5 col-sm-5 col-xs-8 ellipsis List-staticColumnAdjacent',
|
||||||
ngClick: 'editHost(host.id)'
|
ngClick: 'editHost(host.id)'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,9 +12,10 @@
|
|||||||
|
|
||||||
export default
|
export default
|
||||||
angular.module('HostFormDefinition', [])
|
angular.module('HostFormDefinition', [])
|
||||||
.value('HostForm', {
|
.factory('HostForm', ['i18n', function(i18n) {
|
||||||
|
return {
|
||||||
|
|
||||||
addTitle: 'Create Host',
|
addTitle: i18n._('Create Host'),
|
||||||
editTitle: '{{ host.name }}',
|
editTitle: '{{ host.name }}',
|
||||||
name: 'host',
|
name: 'host',
|
||||||
basePath: 'hosts',
|
basePath: 'hosts',
|
||||||
@@ -27,46 +28,53 @@ export default
|
|||||||
class: 'Form-header-field',
|
class: 'Form-header-field',
|
||||||
ngClick: 'toggleHostEnabled(host)',
|
ngClick: 'toggleHostEnabled(host)',
|
||||||
type: 'toggle',
|
type: 'toggle',
|
||||||
awToolTip: "<p>Indicates if a host is available and should be included in running jobs.</p><p>For hosts that " +
|
awToolTip: "<p>" +
|
||||||
"are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.</p>",
|
i18n._("Indicates if a host is available and should be included in running jobs.") +
|
||||||
dataTitle: 'Host Enabled',
|
"</p><p>" +
|
||||||
|
i18n._("For hosts that are part of an external" +
|
||||||
|
" inventory, this flag cannot be changed. It will be" +
|
||||||
|
" set by the inventory sync process.") +
|
||||||
|
"</p>",
|
||||||
|
dataTitle: i18n._('Host Enabled'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
name: {
|
||||||
label: 'Host Name',
|
label: i18n._('Host Name'),
|
||||||
type: 'text',
|
type: 'text',
|
||||||
required: true,
|
required: true,
|
||||||
awPopOver: "<p>Provide a host name, ip address, or ip address:port. Examples include:</p>" +
|
awPopOver: "<p>" +
|
||||||
|
i18n._("Provide a host name, ip address, or ip address:port. Examples include:") +
|
||||||
|
"</p>" +
|
||||||
"<blockquote>myserver.domain.com<br/>" +
|
"<blockquote>myserver.domain.com<br/>" +
|
||||||
"127.0.0.1<br />" +
|
"127.0.0.1<br />" +
|
||||||
"10.1.0.140:25<br />" +
|
"10.1.0.140:25<br />" +
|
||||||
"server.example.com:25" +
|
"server.example.com:25" +
|
||||||
"</blockquote>",
|
"</blockquote>",
|
||||||
dataTitle: 'Host Name',
|
dataTitle: i18n._('Host Name'),
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)'
|
ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)'
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
label: 'Description',
|
label: i18n._('Description'),
|
||||||
ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)',
|
ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
type: 'text'
|
type: 'text'
|
||||||
},
|
},
|
||||||
variables: {
|
variables: {
|
||||||
label: 'Variables',
|
label: i18n._('Variables'),
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
rows: 6,
|
rows: 6,
|
||||||
class: 'Form-formGroup--fullWidth',
|
class: 'Form-formGroup--fullWidth',
|
||||||
"default": "---",
|
"default": "---",
|
||||||
awPopOver: "<p>Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.</p>" +
|
awPopOver: "<p>" + i18n._("Enter inventory variables using either JSON or YAML syntax. Use the radio button to toggle between the two.") + "</p>" +
|
||||||
"JSON:<br />\n" +
|
"JSON:<br />\n" +
|
||||||
"<blockquote>{<br /> \"somevar\": \"somevalue\",<br /> \"password\": \"magic\"<br /> }</blockquote>\n" +
|
"<blockquote>{<br /> \"somevar\": \"somevalue\",<br /> \"password\": \"magic\"<br /> }</blockquote>\n" +
|
||||||
"YAML:<br />\n" +
|
"YAML:<br />\n" +
|
||||||
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
|
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
|
||||||
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
'<p>' + i18n.sprintf(i18n._('View JSON examples at %s'), '<a href="http://www.json.org" target="_blank">www.json.org</a>') + '</p>' +
|
||||||
'<p>View YAML examples at <a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a></p>',
|
'<p>' + i18n.sprintf(i18n._('View YAML examples at %s'), '<a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a>') + '</p>',
|
||||||
dataTitle: 'Host Variables',
|
dataTitle: i18n._('Host Variables'),
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
dataContainer: 'body'
|
dataContainer: 'body'
|
||||||
},
|
},
|
||||||
@@ -92,4 +100,5 @@ export default
|
|||||||
ngShow: '(host.summary_fields.user_capabilities.edit || canAdd)'
|
ngShow: '(host.summary_fields.user_capabilities.edit || canAdd)'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
}]);
|
||||||
|
|||||||
Reference in New Issue
Block a user