import("../Common/Loading"));
@@ -163,6 +164,7 @@ export const validateRule = (
};
export const UserAdd = (props: UserProps) => {
+ const { t } = useTranslation();
const { goBack } = useAppHistory();
const { userId } = props;
@@ -355,7 +357,7 @@ export const UserAdd = (props: UserProps) => {
return;
case "doctor_experience_commenced_on":
if (state.form.user_type === "Doctor" && !state.form[field]) {
- errors[field] = "Field is required";
+ errors[field] = t("field_required");
invalidForm = true;
} else if (
state.form.user_type === "Doctor" &&
@@ -368,7 +370,7 @@ export const UserAdd = (props: UserProps) => {
case "doctor_qualification":
case "doctor_medical_council_registration":
if (state.form.user_type === "Doctor" && !state.form[field]) {
- errors[field] = "Field is required";
+ errors[field] = t("field_required");
invalidForm = true;
}
return;
@@ -605,7 +607,7 @@ export const UserAdd = (props: UserProps) => {
options={
Need
diff --git a/src/Components/Users/UserProfile.tsx b/src/Components/Users/UserProfile.tsx
index 8a456be9bcd..dd8dadf2fb7 100644
--- a/src/Components/Users/UserProfile.tsx
+++ b/src/Components/Users/UserProfile.tsx
@@ -26,6 +26,7 @@ import routes from "../../Redux/api";
import request from "../../Utils/request/request";
import DateFormField from "../Form/FormFields/DateFormField";
import { validateRule } from "./UserAdd";
+import { useTranslation } from "react-i18next";
const Loading = lazy(() => import("../Common/Loading"));
type EditForm = {
@@ -110,6 +111,7 @@ const editFormReducer = (state: State, action: Action) => {
};
export default function UserProfile() {
+ const { t } = useTranslation();
const { signOut } = useAuthContext();
const [states, dispatch] = useReducer(editFormReducer, initialState);
const [updateStatus, setUpdateStatus] = useState({
@@ -201,7 +203,7 @@ export default function UserProfile() {
case "lastName":
case "gender":
if (!states.form[field]) {
- errors[field] = "Field is required";
+ errors[field] = t("field_required");
invalidForm = true;
}
return;
@@ -254,7 +256,7 @@ export default function UserProfile() {
return;
case "email":
if (!states.form[field]) {
- errors[field] = "This field is required";
+ errors[field] = t("field_required");
invalidForm = true;
} else if (!validateEmailAddress(states.form[field])) {
errors[field] = "Enter a valid email address";
@@ -263,7 +265,7 @@ export default function UserProfile() {
return;
case "doctor_experience_commenced_on":
if (states.form.user_type === "Doctor" && !states.form[field]) {
- errors[field] = "Field is required";
+ errors[field] = t("field_required");
invalidForm = true;
} else if (
(states.form.user_type === "Doctor" &&
@@ -278,7 +280,7 @@ export default function UserProfile() {
case "doctor_qualification":
case "doctor_medical_council_registration":
if (states.form.user_type === "Doctor" && !states.form[field]) {
- errors[field] = "Field is required";
+ errors[field] = t("field_required");
invalidForm = true;
}
return;
diff --git a/src/Locale/en/Auth.json b/src/Locale/en/Auth.json
index e99cae72f7f..58fdef42612 100644
--- a/src/Locale/en/Auth.json
+++ b/src/Locale/en/Auth.json
@@ -11,7 +11,6 @@
"gender": "Gender",
"age": "Age",
"login": "Login",
- "field_required": "This field is required",
"password_mismatch": "Password and confirm password must be same.",
"enter_valid_age": "Please Enter Valid Age",
"invalid_username": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
@@ -29,7 +28,7 @@
"password_reset_success": "Password Reset successfully",
"password_reset_failure": "Password Reset Failed",
"reset_password": "Reset Password",
- "available_in":"Available in",
+ "available_in": "Available in",
"sign_out": "Sign Out",
"back_to_login": "Back to login",
"min_password_len_8": "Minimum password length 8",
@@ -37,4 +36,4 @@
"req_atleast_one_uppercase": "Require at least one upper case",
"req_atleast_one_lowercase": "Require at least one lower case letter",
"req_atleast_one_symbol": "Require at least one symbol"
-}
+}
\ No newline at end of file
diff --git a/src/Locale/en/Bed.json b/src/Locale/en/Bed.json
index b410293959b..269658be774 100644
--- a/src/Locale/en/Bed.json
+++ b/src/Locale/en/Bed.json
@@ -10,4 +10,4 @@
"make_multiple_beds_label": "Do you want to make multiple beds?",
"number_of_beds": "Number of beds",
"number_of_beds_out_of_range_error": "Number of beds cannot be greater than 100"
-}
\ No newline at end of file
+}
diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json
index 1c1e3b49ecb..0bd26305b86 100644
--- a/src/Locale/en/Common.json
+++ b/src/Locale/en/Common.json
@@ -110,6 +110,7 @@
"features": "Features",
"pincode": "Pincode",
"required": "Required",
+ "field_required": "This field is required",
"litres": "Litres",
"litres_per_day": "Litres/day",
"invalid_pincode": "Invalid Pincode",
diff --git a/src/Locale/en/Consultation.json b/src/Locale/en/Consultation.json
index d811680d0fd..6e3846fb983 100644
--- a/src/Locale/en/Consultation.json
+++ b/src/Locale/en/Consultation.json
@@ -36,6 +36,7 @@
"prev_sessions": "Prev Sessions",
"next_sessions": "Next Sessions",
"no_changes": "No changes",
+ "no_treating_physicians_available": "This facility does not have any home facility doctors. Please contact your admin.",
"encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation",
"encounter_date_field_label__A": "Date & Time of Admission to the Facility",
"encounter_date_field_label__DC": "Date & Time of Domiciliary Care commencement",
@@ -44,5 +45,6 @@
"encounter_date_field_label__HI": "Date & Time of Consultation",
"encounter_date_field_label__R": "Date & Time of Consultation",
"back_dated_encounter_date_caution": "You are creating an encounter for",
- "encounter_duration_confirmation": "The duration of this encounter would be"
+ "encounter_duration_confirmation": "The duration of this encounter would be",
+ "consultation_notes": "General Instructions (Advice)"
}
\ No newline at end of file
diff --git a/src/Locale/en/Diagnosis.json b/src/Locale/en/Diagnosis.json
index 6cb301c058e..c049e9bba6f 100644
--- a/src/Locale/en/Diagnosis.json
+++ b/src/Locale/en/Diagnosis.json
@@ -1,21 +1,21 @@
{
- "diagnosis": "Diagnosis",
- "diagnoses": "Diagnoses",
- "diagnosis_already_added": "This diagnosis was already added",
- "principal": "Principal",
- "principal_diagnosis": "Principal diagnosis",
- "unconfirmed": "Unconfirmed",
- "provisional": "Provisional",
- "differential": "Differential",
- "confirmed": "Confirmed",
- "refuted": "Refuted",
- "entered-in-error": "Entered in error",
- "help_unconfirmed": "There is not sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition.",
- "help_provisional": "This is a tentative diagnosis - still a candidate that is under consideration.",
- "help_differential": "One of a set of potential (and typically mutually exclusive) diagnoses asserted to further guide the diagnostic process and preliminary treatment.",
- "help_confirmed": "There is sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition.",
- "help_refuted": "This condition has been ruled out by subsequent diagnostic and clinical evidence.",
- "help_entered-in-error": "The statement was entered in error and is not valid.",
- "search_icd11_placeholder": "Search for ICD-11 Diagnoses",
- "icd11_as_recommended": "As per ICD-11 recommended by WHO"
-}
\ No newline at end of file
+ "diagnosis": "Diagnosis",
+ "diagnoses": "Diagnoses",
+ "diagnosis_already_added": "This diagnosis was already added",
+ "principal": "Principal",
+ "principal_diagnosis": "Principal diagnosis",
+ "unconfirmed": "Unconfirmed",
+ "provisional": "Provisional",
+ "differential": "Differential",
+ "confirmed": "Confirmed",
+ "refuted": "Refuted",
+ "entered-in-error": "Entered in error",
+ "help_unconfirmed": "There is not sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition.",
+ "help_provisional": "This is a tentative diagnosis - still a candidate that is under consideration.",
+ "help_differential": "One of a set of potential (and typically mutually exclusive) diagnoses asserted to further guide the diagnostic process and preliminary treatment.",
+ "help_confirmed": "There is sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition.",
+ "help_refuted": "This condition has been ruled out by subsequent diagnostic and clinical evidence.",
+ "help_entered-in-error": "The statement was entered in error and is not valid.",
+ "search_icd11_placeholder": "Search for ICD-11 Diagnoses",
+ "icd11_as_recommended": "As per ICD-11 recommended by WHO"
+}
diff --git a/src/Locale/en/Facility.json b/src/Locale/en/Facility.json
index 19715e7e91f..5bb0a269e87 100644
--- a/src/Locale/en/Facility.json
+++ b/src/Locale/en/Facility.json
@@ -55,4 +55,4 @@
"discharged_patients": "Discharged Patients",
"discharged_patients_empty": "No discharged patients present in this facility",
"update_facility_middleware_success": "Facility middleware updated successfully"
-}
\ No newline at end of file
+}
diff --git a/src/Locale/en/Medicine.json b/src/Locale/en/Medicine.json
index c21f5fa236f..d559ef2fdbf 100644
--- a/src/Locale/en/Medicine.json
+++ b/src/Locale/en/Medicine.json
@@ -61,4 +61,4 @@
"PRESCRIPTION_FREQUENCY_Q4H": "4th hourly",
"PRESCRIPTION_FREQUENCY_QOD": "Alternate day",
"PRESCRIPTION_FREQUENCY_QWK": "Once a week"
-}
\ No newline at end of file
+}
diff --git a/src/Locale/en/Notifications.json b/src/Locale/en/Notifications.json
index ad8dc0e20f1..dac9c29730f 100644
--- a/src/Locale/en/Notifications.json
+++ b/src/Locale/en/Notifications.json
@@ -16,5 +16,7 @@
"unsubscribe_failed": "Unsubscribe failed.",
"unsubscribe": "Unsubscribe",
"escape": "Escape",
- "loading": "Loading..."
+ "loading": "Loading...",
+ "invalid_asset_id_msg": "Oops! The asset ID you entered does not appear to be valid.",
+ "asset_not_found_msg": "Oops! The asset you are looking for does not exist. Please check the asset id."
}
diff --git a/src/Locale/en/Users.json b/src/Locale/en/Users.json
index 515c77848b4..32c6ee209c3 100644
--- a/src/Locale/en/Users.json
+++ b/src/Locale/en/Users.json
@@ -10,4 +10,4 @@
"average_weekly_working_hours": "Average weekly working hours",
"set_average_weekly_working_hours_for": "Set Average weekly working hours for",
"search_by_username": "Search by username"
-}
\ No newline at end of file
+}
diff --git a/src/Locale/kn/Auth.json b/src/Locale/kn/Auth.json
index fb36b254b38..ff81099c794 100644
--- a/src/Locale/kn/Auth.json
+++ b/src/Locale/kn/Auth.json
@@ -23,7 +23,7 @@
"auth_login_title": "ಅಧಿಕೃತ ಲಾಗಿನ್",
"forget_password": "ಪಾಸ್ವರ್ಡ್ ಮರೆತಿರಾ?",
"back_to_login": "ಲಾಗಿನ್ ಪುಟಕ್ಕೆ ಹಿಂತಿರುಗಿ",
- "available_in":"ಲಭ್ಯವಿರುವ ಭಾಷೆಗಳು",
+ "available_in": "ಲಭ್ಯವಿರುವ ಭಾಷೆಗಳು",
"forget_password_instruction": "ನಿಮ್ಮ ಬಳಕೆದಾರ ಹೆಸರನ್ನು ನಮೂದಿಸಿ ಮತ್ತು ನಿಮ್ಮ ಪಾಸ್ವರ್ಡ್ ಅನ್ನು ಮರುಹೊಂದಿಸಲು ನಾವು ನಿಮಗೆ ಲಿಂಕ್ ಅನ್ನು ಕಳುಹಿಸುತ್ತೇವೆ.",
"send_reset_link": "ಮರುಹೊಂದಿಸುವ ಲಿಂಕ್ ಕಳುಹಿಸಿ",
"already_a_member": "ಈಗಾಗಲೇ ಸದಸ್ಯರೇ?",
diff --git a/src/Locale/ml/Auth.json b/src/Locale/ml/Auth.json
index 199bce684ec..605f013b49a 100644
--- a/src/Locale/ml/Auth.json
+++ b/src/Locale/ml/Auth.json
@@ -22,7 +22,7 @@
"register_page_title": "ആശുപത്രി അഡ്മിനിസ്ട്രേറ്ററായി രജിസ്റ്റർ ചെയ്യുക",
"auth_login_title": "അംഗീകൃത ലോഗിൻ",
"back_to_login": "ലോഗിൻ പേജിലേക്ക് മടങ്ങുക",
- "available_in":"ലഭ്യമായ ഭാഷകൾ",
+ "available_in": "ലഭ്യമായ ഭാഷകൾ",
"forget_password": "പാസ്വേഡ് മറന്നോ?",
"forget_password_instruction": "നിങ്ങളുടെ യൂസർനെയിം/ഉപയോക്തൃനാമം നൽകുക. പാസ്വേഡ് പുന: സജ്ജമാക്കാൻ ഞങ്ങൾ ഒരു ലിങ്ക് അയയ്ക്കുന്നതായിരിക്കും.",
"send_reset_link": "പുന: സജ്ജീകരണ ലിങ്ക് അയയ്ക്കുക",
diff --git a/src/Locale/mr/Auth.json b/src/Locale/mr/Auth.json
index 2154366c4f6..74d41e469c4 100644
--- a/src/Locale/mr/Auth.json
+++ b/src/Locale/mr/Auth.json
@@ -22,7 +22,7 @@
"register_page_title": "हॉस्पिटल व्यवस्थापक म्हणून नोंदणी करा",
"auth_login_title": "अधिकृत लॉगिन",
"back_to_login": "लॉगिन पृष्ठावर परत या",
- "available_in":"उपलब्ध भाषा",
+ "available_in": "उपलब्ध भाषा",
"forget_password": "पासवर्ड विसरलात?",
"forget_password_instruction": "युजरनेम प्रविष्ट करा आणि आम्ही तुम्हाला पासवर्ड रीसेट करण्यासाठी एक लिंक पाठवू.",
"send_reset_link": "रीसेट लिंक पाठवा",
diff --git a/src/Locale/ta/Auth.json b/src/Locale/ta/Auth.json
index 1d5e15f241a..d5d26caa0fc 100644
--- a/src/Locale/ta/Auth.json
+++ b/src/Locale/ta/Auth.json
@@ -22,7 +22,7 @@
"register_page_title": "மருத்துவமனை நிர்வாகியாக பதிவு செய்யுங்கள்",
"auth_login_title": "அங்கீகரிக்கப்பட்ட உள்நுழைவு",
"back_to_login": "உள்நுழைவு பக்கத்திற்குத் திரும்பு",
- "available_in":"கிடைக்கும் மொழிகள்",
+ "available_in": "கிடைக்கும் மொழிகள்",
"forget_password": "கடவுச்சொல்லை மறந்துவிட்டீர்களா?",
"forget_password_instruction": "உங்கள் பயனர்பெயரை உள்ளிடவும், உங்கள் கடவுச்சொல்லை மீட்டமைக்க ஒரு இணைப்பை நாங்கள் உங்களுக்கு அனுப்புவோம்.",
"send_reset_link": "மீட்டமை இணைப்பை அனுப்பவும்",