diff --git a/i18n/en.pot b/i18n/en.pot index 2f414dc91a..ac41841fe7 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-12-05T11:39:04.447Z\n" -"PO-Revision-Date: 2024-12-05T11:39:04.447Z\n" +"POT-Creation-Date: 2024-12-19T09:18:35.465Z\n" +"PO-Revision-Date: 2024-12-19T09:18:35.466Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -211,8 +211,8 @@ msgstr "Active" msgid "Completed" msgstr "Completed" -msgid "Please add or cancel note before saving the event" -msgstr "Please add or cancel note before saving the event" +msgid "Please add or cancel the note before saving the event" +msgstr "Please add or cancel the note before saving the event" msgid "Save and add another" msgstr "Save and add another" @@ -1210,8 +1210,8 @@ msgstr "Add coordinates" msgid "Add area" msgstr "Add area" -msgid "Please add or cancel the note before saving the event" -msgstr "Please add or cancel the note before saving the event" +msgid "Please selectoo {{categoryName}}" +msgstr "Please selectoo {{categoryName}}" msgid "organisation unit could not be retrieved. Please try again later." msgstr "organisation unit could not be retrieved. Please try again later." diff --git a/src/core_modules/capture-core/components/DataEntries/Enrollment/EnrollmentWithFirstStageDataEntry/fieldValidators/eventDate.validatorContainersGetter.js b/src/core_modules/capture-core/components/DataEntries/Enrollment/EnrollmentWithFirstStageDataEntry/fieldValidators/eventDate.validatorContainersGetter.js index 2f9290b07a..606ce6f53e 100644 --- a/src/core_modules/capture-core/components/DataEntries/Enrollment/EnrollmentWithFirstStageDataEntry/fieldValidators/eventDate.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/DataEntries/Enrollment/EnrollmentWithFirstStageDataEntry/fieldValidators/eventDate.validatorContainersGetter.js @@ -15,11 +15,11 @@ export const getEventDateValidatorContainers = () => { const validatorContainers = [ { validator: hasValue, - message: i18n.t('A value is required'), + errorMessage: i18n.t('A value is required'), }, { validator: preValidateDate, - message: i18n.t('Please provide a valid date'), + errorMessage: i18n.t('Please provide a valid date'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/categoryOptions.validatorContainersGetter.js b/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/categoryOptions.validatorContainersGetter.js index 8b9327194c..6ccfd68994 100644 --- a/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/categoryOptions.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/categoryOptions.validatorContainersGetter.js @@ -8,7 +8,7 @@ const validateCategories = (value?: ?string, props?: Object, fieldId?: string) = return { valid: hasValue(value), - message: i18n.t('Please select {{categoryName}}', { categoryName }), + errorMessage: i18n.t('Please select {{categoryName}}', { categoryName }), }; }; @@ -16,7 +16,7 @@ export const getCategoryOptionsValidatorContainers = (props?: Object, fieldId?: const validatorContainers = [ { validator: (value?: ?string) => validateCategories(value, props, fieldId), - message: '', + errorMessage: '', }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/enrollmentDate.validatorContainersGetter.js b/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/enrollmentDate.validatorContainersGetter.js index 32d0534018..b826cd0d2e 100644 --- a/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/enrollmentDate.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/enrollmentDate.validatorContainersGetter.js @@ -15,15 +15,15 @@ export const getEnrollmentDateValidatorContainer = () => { const validatorContainers = [ { validator: hasValue, - message: + errorMessage: i18n.t('A value is required'), }, { validator: isValidEnrollmentDate, - message: i18n.t('Please provide a valid date'), + errorMessage: i18n.t('Please provide a valid date'), }, { validator: isValidNonFutureDate, - message: i18n.t('A date in the future is not allowed'), + errorMessage: i18n.t('A date in the future is not allowed'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/incidentDate.validatorContainerGetter.js b/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/incidentDate.validatorContainerGetter.js index 897510621f..badb1f90dd 100644 --- a/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/incidentDate.validatorContainerGetter.js +++ b/src/core_modules/capture-core/components/DataEntries/Enrollment/fieldValidators/incidentDate.validatorContainerGetter.js @@ -16,15 +16,15 @@ export const getIncidentDateValidatorContainer = () => { const validatorContainers = [ { validator: hasValue, - message: + errorMessage: i18n.t('A value is required'), }, { validator: isValidIncidentDate, - message: i18n.t('Please provide a valid date'), + errorMessage: i18n.t('Please provide a valid date'), }, { validator: isValidNonFutureDate, - message: i18n.t('A date in the future is not allowed'), + errorMessage: i18n.t('A date in the future is not allowed'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js b/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js index d1ff0940ed..9956ff30b9 100644 --- a/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js @@ -15,12 +15,12 @@ export const getEventDateValidatorContainers = () => { const validatorContainers = [ { validator: hasValue, - message: + errorMessage: i18n.t('A value is required'), }, { validator: preValidateDate, - message: i18n.t('Please provide a valid date'), + errorMessage: i18n.t('Please provide a valid date'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/fieldValidators/note.validatorContainersGetter.js b/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/fieldValidators/note.validatorContainersGetter.js index 41277297e3..046f671511 100644 --- a/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/fieldValidators/note.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/fieldValidators/note.validatorContainersGetter.js @@ -7,7 +7,7 @@ export const getNoteValidatorContainers = () => { const validatorContainers = [ { validator: validateNote, - message: i18n.t('Please add or cancel note before saving the event'), + errorMessage: i18n.t('Please add or cancel the note before saving the event'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/DataEntry/dataEntryField/internal/dataEntryField.utils.js b/src/core_modules/capture-core/components/DataEntry/dataEntryField/internal/dataEntryField.utils.js index f42d00f85e..3a5e91e31b 100644 --- a/src/core_modules/capture-core/components/DataEntry/dataEntryField/internal/dataEntryField.utils.js +++ b/src/core_modules/capture-core/components/DataEntry/dataEntryField/internal/dataEntryField.utils.js @@ -7,7 +7,7 @@ type Validator = (value: any, export type ValidatorContainer = { validator: Validator, - message: string, + errorMessage: string, }; export function getValidationError(value: any, validatorContainers: ?Array, internalComponentError?: ?{error: ?string, errorCode: ?string}) { @@ -15,7 +15,7 @@ export function getValidationError(value: any, validatorContainers: ?Array { const validator = validatorContainer.validator; const result = validator(value, internalComponentError); @@ -24,10 +24,10 @@ export function getValidationError(value: any, validatorContainers: ?Array validateCategories(value, props, fieldId), - message: '', + errorMessage: '', }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/categoryOptions.validatorContainersGetter.js b/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/categoryOptions.validatorContainersGetter.js index 2c2f7d21e5..8cf825ad1a 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/categoryOptions.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/categoryOptions.validatorContainersGetter.js @@ -9,7 +9,7 @@ const validateCategories = (value?: ?string, props?: Object, fieldId?: string) = return { valid: hasValue(value), - message: i18n.t('Please select {{categoryName}}', { categoryName }), + errorMessage: i18n.t('Please selectoo {{categoryName}}', { categoryName }), }; }; @@ -17,7 +17,7 @@ export const getCategoryOptionsValidatorContainers = (props?: Object, fieldId?: const validatorContainers = [ { validator: (value?: ?string) => validateCategories(value, props, fieldId), - message: '', + errorMessage: '', }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js b/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js index 046217b02a..325638d3e2 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js @@ -15,12 +15,12 @@ export const getEventDateValidatorContainers = () => { const validatorContainers = [ { validator: hasValue, - message: + errorMessage: i18n.t('A value is required'), }, { validator: preValidateDate, - message: i18n.t('Please provide a valid date'), + errorMessage: i18n.t('Please provide a valid date'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/note.validatorContainersGetter.js b/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/note.validatorContainersGetter.js index 5688fc26d7..046f671511 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/note.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/DataEntry/fieldValidators/note.validatorContainersGetter.js @@ -7,7 +7,7 @@ export const getNoteValidatorContainers = () => { const validatorContainers = [ { validator: validateNote, - message: i18n.t('Please add or cancel the note before saving the event'), + errorMessage: i18n.t('Please add or cancel the note before saving the event'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/categoryOptions.validatorContainersGetter.js b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/categoryOptions.validatorContainersGetter.js index e724153d13..593d3904dd 100644 --- a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/categoryOptions.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/categoryOptions.validatorContainersGetter.js @@ -7,7 +7,7 @@ const validateCategories = (value?: ?string, props?: Object, fieldId?: string) = ?.find(category => category.id === fieldId)?.displayName; return { valid: hasValue(value), - message: i18n.t('Please select {{categoryName}}', { categoryName }), + errorMessage: i18n.t('Please select {{categoryName}}', { categoryName }), }; }; @@ -15,7 +15,7 @@ export const getCategoryOptionsValidatorContainers = (props?: Object, fieldId?: const validatorContainers = [ { validator: (value?: ?string) => validateCategories(value, props, fieldId), - message: '', + errorMessage: '', }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js index c5117776e5..3ae414091c 100644 --- a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/eventDate.validatorContainersGetter.js @@ -15,11 +15,11 @@ export const getEventDateValidatorContainers = () => { const validatorContainers = [ { validator: hasValue, - message: i18n.t('A value is required'), + errorMessage: i18n.t('A value is required'), }, { validator: preValidateDate, - message: i18n.t('Please provide a valid date'), + errorMessage: i18n.t('Please provide a valid date'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/note.validatorContainersGetter.js b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/note.validatorContainersGetter.js index 5688fc26d7..046f671511 100644 --- a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/note.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/note.validatorContainersGetter.js @@ -7,7 +7,7 @@ export const getNoteValidatorContainers = () => { const validatorContainers = [ { validator: validateNote, - message: i18n.t('Please add or cancel the note before saving the event'), + errorMessage: i18n.t('Please add or cancel the note before saving the event'), }, ]; return validatorContainers; diff --git a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/orgUnit.validatorContainersGetter.js b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/orgUnit.validatorContainersGetter.js index b438a4a494..acdc3c076e 100644 --- a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/orgUnit.validatorContainersGetter.js +++ b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/fieldValidators/orgUnit.validatorContainersGetter.js @@ -8,7 +8,7 @@ export const getOrgUnitValidatorContainers = () => { const validatorContainers = [ { validator: validateOrgUnit, - message: i18n.t('Please provide an valid organisation unit'), + errorMessage: i18n.t('Please provide an valid organisation unit'), }, ]; return validatorContainers;