Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
fix: internationalization dubplicate fix & fix to translation json
Browse files Browse the repository at this point in the history
  • Loading branch information
M-BenAli committed Jan 20, 2020
1 parent 59447dc commit 6f54562
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/locales/en-US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
"types": {
"charity": "Charity",
"private": "Private"
},
"errors": {
"patientNameRequired": "Patient Given Name is required."
}
},
"sex": {
Expand All @@ -52,9 +55,6 @@
"states": {
"success": "Success!"
},
"errors": {
"patientNameRequired": "No patient name entered!"
},
"scheduling": {
"label": "Scheduling",
"appointments": {
Expand Down
4 changes: 2 additions & 2 deletions src/patients/new/NewPatientForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const NewPatientForm = (props: Props) => {

const onSaveButtonClick = async () => {
if (!patient.givenName) {
setErrorMessage(t('errors.patientNameRequired'))
setErrorMessage(t('patient.errors.patientNameRequired'))
} else {
const newPatient = {
prefix: patient.prefix,
Expand Down Expand Up @@ -98,7 +98,7 @@ const NewPatientForm = (props: Props) => {
<div>
<form>
<h3>{t('patient.basicInformation')}</h3>
{errorMessage && <Alert className="alert" color="danger" message={t(errorMessage)} />}
{errorMessage && <Alert className="alert" color="danger" message={errorMessage} />}
<div className="row">
<div className="col-md-2">
<TextInputWithLabelFormGroup
Expand Down

0 comments on commit 6f54562

Please sign in to comment.