Skip to content

Commit

Permalink
feat: added units and label to i18n locale files
Browse files Browse the repository at this point in the history
  • Loading branch information
noufalrahim committed Oct 5, 2024
1 parent e28b6ee commit 04d980c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { IPressureSore } from "../../../Patient/models";
import { Error } from "../../../../Utils/Notifications";
import { classNames, getValueDescription } from "../../../../Utils/utils";
import { calculatePushScore } from "./utils";
import { useTranslation } from "react-i18next";

const PressureSore = ({ log, onChange, readonly }: LogUpdateSectionProps) => {
const value = log.pressure_sore ?? [];
Expand Down Expand Up @@ -104,6 +105,8 @@ const RegionEditor = (props: RegionEditorProps) => {

const isReadOnly = !props.onSave;

const { t } = useTranslation();

return (
<PopupModal
show={props.show}
Expand All @@ -129,7 +132,7 @@ const RegionEditor = (props: RegionEditorProps) => {
<br />
<div className="grid grid-cols-2 gap-2">
<TextFormField
label="Width (cm)"
label={t("width_label__cm")}
name="width"
disabled={isReadOnly}
labelClassName="text-xs"
Expand All @@ -141,7 +144,7 @@ const RegionEditor = (props: RegionEditorProps) => {
onChange={(e) => update({ width: parseFloat(e.value) })}
/>
<TextFormField
label="Length (cm)"
label={t("length_label__cm")}
name="length"
disabled={isReadOnly}
labelClassName="text-xs"
Expand Down
4 changes: 3 additions & 1 deletion src/Locale/en/Consultation.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@
"consultation_notes": "General Instructions (Advice)",
"procedure_suggestions": "Procedure Suggestions",
"patient_notes_thread__Doctors": "Doctor's Discussions",
"patient_notes_thread__Nurses": "Nurse's Discussions"
"patient_notes_thread__Nurses": "Nurse's Discussions",
"width_label__cm": "Width (cm)",
"length_label__cm": "Length (cm)"
}

0 comments on commit 04d980c

Please sign in to comment.