diff --git a/awx/ui/client/src/forms/Hosts.js b/awx/ui/client/src/forms/Hosts.js index f52a640e83..21b6ba594c 100644 --- a/awx/ui/client/src/forms/Hosts.js +++ b/awx/ui/client/src/forms/Hosts.js @@ -12,9 +12,10 @@ export default angular.module('HostFormDefinition', []) - .value('HostForm', { + .factory('HostForm', ['i18n', function(i18n) { + return { - addTitle: 'Create Host', + addTitle: i18n._('Create Host'), editTitle: '{{ host.name }}', name: 'host', basePath: 'hosts', @@ -27,46 +28,55 @@ export default class: 'Form-header-field', ngClick: 'toggleHostEnabled(host)', type: 'toggle', - awToolTip: "
Indicates if a host is available and should be included in running jobs.
For hosts that " + - "are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.
", - dataTitle: 'Host Enabled', + awToolTip: "" + + i18n._("Indicates if a host is available and should be included in running jobs.") + + "
" + + i18n._("For hosts that are part of an external" + + " inventory, this flag cannot be changed. It will be" + + " set by the inventory sync process.") + + "
", + dataTitle: i18n._('Host Enabled'), } }, fields: { name: { - label: 'Host Name', + label: i18n._('Host Name'), type: 'text', required: true, - awPopOver: "Provide a host name, ip address, or ip address:port. Examples include:
" + + awPopOver: "" + + i18n._("Provide a host name, ip address, or ip address:port. Examples include:") + + "
" + "myserver.domain.com", - dataTitle: 'Host Name', + dataTitle: i18n._('Host Name'), dataPlacement: 'right', dataContainer: 'body', ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)' }, description: { - label: 'Description', + label: i18n._('Description'), ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)', type: 'text' }, variables: { - label: 'Variables', + label: i18n._('Variables'), type: 'textarea', rows: 6, class: 'Form-formGroup--fullWidth', "default": "---", - awPopOver: "
" + "127.0.0.1
" + "10.1.0.140:25
" + "server.example.com:25" + "
Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" + - "JSON:{\n" + - "YAML:
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
---\n" + - '
somevar: somevalue
password: magic
View JSON examples at www.json.org
' + - 'View YAML examples at docs.ansible.com
', - dataTitle: 'Host Variables', + awPopOver: "" + + i18n._("Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.") + + "
" + + "JSON:{\n" + + "YAML:
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
---\n" + + '
somevar: somevalue
password: magic
View JSON examples at www.json.org
' + + 'View YAML examples at docs.ansible.com
', + dataTitle: i18n._('Host Variables'), dataPlacement: 'right', dataContainer: 'body' }, @@ -92,4 +102,5 @@ export default ngShow: '(host.summary_fields.user_capabilities.edit || canAdd)' } }, - }); + }; + }]);