diff --git a/src/CAREUI/display/Timeline.tsx b/src/CAREUI/display/Timeline.tsx index bbbf5e24859..7fcb57f56ea 100644 --- a/src/CAREUI/display/Timeline.tsx +++ b/src/CAREUI/display/Timeline.tsx @@ -92,9 +92,12 @@ export const TimelineNode = (props: TimelineNodeProps) => { }`}{" "} )} - {props.titleSuffix - ? props.titleSuffix - : `${props.event.type} the ${props.name || name}.`} + {props.titleSuffix || ( + <> + {`${props.event.type} the `} + {props.name || name} + + )}

{props.actions && ( diff --git a/src/Components/Facility/ConsultationDetails/Events/EventsList.tsx b/src/Components/Facility/ConsultationDetails/Events/EventsList.tsx index cf997dca4b3..f759559c1a1 100644 --- a/src/Components/Facility/ConsultationDetails/Events/EventsList.tsx +++ b/src/Components/Facility/ConsultationDetails/Events/EventsList.tsx @@ -30,13 +30,10 @@ export default function EventsList() { {(item, items) => ( - text[0].toUpperCase() + text.toLowerCase().slice(1), - ) - .join(" ") + " Event" + t(item.event_type.name.toLowerCase()).replaceAll( + /_/g, + " ", + ) + " Event" } event={{ type: item.change_type.replace(/_/g, " ").toLowerCase(), diff --git a/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx b/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx index 414b86fecbe..ca9c13c599b 100644 --- a/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx +++ b/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx @@ -1,4 +1,6 @@ import type { ReactNode } from "react"; +import { useTranslation } from "react-i18next"; + interface IProps { values: Record; } @@ -80,12 +82,13 @@ const formatValue = (value: unknown, key?: string): ReactNode => { }; export default function GenericEvent(props: IProps) { + const { t } = useTranslation(); return (
{Object.entries(props.values).map(([key, value]) => (
- - {key.replaceAll(/_/g, " ")} + + {t(key).replaceAll(/_/g, " ")} {formatValue(value, key)} diff --git a/src/Locale/en/Consultation.json b/src/Locale/en/Consultation.json index 150c8012e38..2fdb2406d28 100644 --- a/src/Locale/en/Consultation.json +++ b/src/Locale/en/Consultation.json @@ -44,5 +44,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