Skip to content

Commit

Permalink
modify i18n trasnlation
Browse files Browse the repository at this point in the history
  • Loading branch information
rajku-dev committed Feb 7, 2025
1 parent 19acd6f commit 9633864
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"are_you_still_watching": "Are you still watching?",
"are_you_sure_want_to_delete": "Are you sure you want to delete {{name}}?",
"are_you_sure_want_to_delete_this_record": "Are you sure want to delete this record?",
"are_you_sure_want_to_remove": "Are you sure you want to remove {{name}} from the patient? This action cannot be undone",
"are_you_sure_want_to_remove": "Are you sure you want to remove <strong>{{name}}</strong> from the patient? This action cannot be undone",
"ari": "ARI - Acute Respiratory illness",
"arrived": "Arrived",
"as_needed_prn": "As Needed / PRN",
Expand Down
13 changes: 10 additions & 3 deletions src/components/Patient/PatientDetailsTab/PatientUsers.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { t } from "i18next";
import { useState } from "react";
import { Trans } from "react-i18next";
import { toast } from "sonner";

import { cn } from "@/lib/utils";
Expand Down Expand Up @@ -301,9 +302,15 @@ export const PatientUsers = (props: PatientProps) => {
<AlertDialogHeader>
<AlertDialogTitle>{t("remove_user")}</AlertDialogTitle>
<AlertDialogDescription>
{t("are_you_sure_want_to_remove", {
name: formatDisplayName(user),
})}
<Trans
i18nKey="are_you_sure_want_to_remove"
values={{ name: formatDisplayName(user) }}
components={{
strong: (
<strong className="inline-block align-middle truncate max-w-32 sm:max-w-96 md:max-w-32 lg:max-w-28 xl:max-w-36" />
),
}}
/>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
Expand Down

0 comments on commit 9633864

Please sign in to comment.