From 0e663921d686772d7d613f543b779f3cc3227ec4 Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 19 Feb 2020 15:50:12 -0500 Subject: [PATCH] Removes rogue comment and marks JT inventory validation string for translation. --- awx/ui_next/src/components/Lookup/InventoryLookup.jsx | 2 -- .../src/screens/Template/shared/JobTemplateForm.jsx | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/awx/ui_next/src/components/Lookup/InventoryLookup.jsx b/awx/ui_next/src/components/Lookup/InventoryLookup.jsx index eacb269dd9..c80b0040fe 100644 --- a/awx/ui_next/src/components/Lookup/InventoryLookup.jsx +++ b/awx/ui_next/src/components/Lookup/InventoryLookup.jsx @@ -17,8 +17,6 @@ const QS_CONFIG = getQSConfig('inventory', { }); function InventoryLookup({ value, onChange, onBlur, required, i18n, history }) { - // some stuff was stripped out of this component - need to propagate those changes - // out to other forms that use this lookup const [inventories, setInventories] = useState([]); const [count, setCount] = useState(0); const [error, setError] = useState(null); diff --git a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx index fd8a81d4ba..c6a2c3b594 100644 --- a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx +++ b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx @@ -1370,15 +1370,16 @@ const FormikApp = withFormik({ setErrors(errors); } }, - validate: values => { + validate: (values, { i18n }) => { const errors = {}; if ( (!values.inventory || values.inventory === '') && !values.ask_inventory_on_launch ) { - errors.inventory = - 'Please select an Inventory or check the Prompt on Launch option.'; + errors.inventory = i18n._( + t`Please select an Inventory or check the Prompt on Launch option.` + ); } return errors;