Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing i18n translations #10463

Merged
14 changes: 13 additions & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@
"assigned_facility": "Facility assigned",
"assigned_to": "Assigned to",
"assigned_volunteer": "Assigned Volunteer",
"at": "at <strong>{{time}}</strong>",
"atypical_presentation_details": "Atypical presentation details",
"audio__allow_permission": "Please allow microphone permission in site settings",
"audio__allow_permission_button": "Click here to know how to allow",
Expand Down Expand Up @@ -478,7 +479,7 @@
"booked_by": "Booked by",
"bradycardia": "Bradycardia",
"breathlessness_level": "Breathlessness level",
"by": "By",
"by": "by <strong>{{by}}</strong>",
"camera": "Camera",
"camera_bed_link_success": "Camera linked to bed successfully.",
"camera_permission_denied": "Camera Permission denied",
Expand Down Expand Up @@ -913,6 +914,7 @@
"encounter_suggestion__R": "Consultation",
"encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation",
"encounters": "Encounters",
"end_date": "End date",
"end_datetime": "End Date/Time",
"end_dose": "End Dose",
"end_time": "End Time",
Expand Down Expand Up @@ -947,6 +949,7 @@
"error_fetching_slots_data": "Error while fetching slots data",
"error_fetching_user_data": "Error while fetching user data",
"error_fetching_user_details": "Error while fetching user details: ",
"error_fetching_users_data": "Failed to load user data. Please try again later.",
"error_loading_questionnaire_response": "Error loading questionnaire response",
"error_updating_encounter": "Error to Updating Encounter",
"error_verifying_otp": "Error while verifying OTP, Please request a new OTP",
Expand All @@ -968,6 +971,7 @@
"export": "Export",
"export_live_patients": "Export Live Patients",
"exporting": "Exporting",
"external_id": "External ID",
"external_identifier": "External Identifier",
"facilities": "Facilities",
"facility": "Facility",
Expand Down Expand Up @@ -1028,6 +1032,7 @@
"file_upload_error": "Error uploading file",
"file_upload_success": "File uploaded successfully",
"file_uploaded": "File Uploaded Successfully",
"filed": "filed <strong>{{title}}</strong>",
"files": "Files",
"fill_my_details": "Fill My Details",
"filter": "Filter",
Expand Down Expand Up @@ -1286,6 +1291,7 @@
"medical_worker": "Medical Worker",
"medication": "Medication",
"medication_administration_saved": "Medicine Administration saved",
"medication_already_marked_as_error": "Medication already marked as error",
"medication_taken_between": "Medication Taken Between",
"medicine": "Medicine",
"medicine_administration": "Medicine Administration",
Expand Down Expand Up @@ -1378,6 +1384,7 @@
"no_investigation": "No investigation Reports found",
"no_investigation_suggestions": "No Investigation Suggestions",
"no_linked_facilities": "No Linked Facilities",
"no_locations_available": "No locations available",
"no_locations_found": "No locations found",
"no_log_update_delta": "No changes since previous log update",
"no_log_updates": "No log updates found",
Expand Down Expand Up @@ -1436,6 +1443,7 @@
"not_eligible": "Not Eligible",
"not_found": "Not Found",
"not_specified": "Not Specified",
"not_started": "Not started",
"not_taken": "Not Taken",
"note": "Note",
"notes": "Notes",
Expand Down Expand Up @@ -1467,6 +1475,7 @@
"on_emergency_basis": " on emergency basis",
"on_hold": "On Hold",
"ongoing_medications": "Ongoing Medications",
"online": "Online",
"only_indian_mobile_numbers_supported": "Currently only Indian numbers are supported",
"onset": "Onset",
"op_encounter": "OP Encounter",
Expand All @@ -1483,6 +1492,7 @@
"organization_for_care_support": "Organization for Care Support",
"organization_forbidden": "You don't have access to any organizations yet.",
"organization_not_found": "No Organizations Found",
"organization_required": "Organization is required",
"organizations": "Organizations",
"organizations_fetch_error": "Error while fetching organizations",
"origin_facility": "Current facility",
Expand Down Expand Up @@ -2033,6 +2043,7 @@
"state": "State",
"state_reason_for_archiving": "State reason for archiving <strong>{{name}}</strong> file?",
"status": "Status",
"status_placeholder": "Select diagnosis status",
"stop": "Stop",
"stop_recording": "Stop Recording",
"stopped": "Stopped",
Expand Down Expand Up @@ -2258,6 +2269,7 @@
"ventilator_spo2": "SpO₂",
"verification": "Verification",
"verification_failed": "Verification Failed",
"verification_placeholder": "Select verification status",
"verify": "Verify",
"verify_and_link": "Verify and Link",
"verify_otp": "Verify OTP",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useQuery } from "@tanstack/react-query";
import { t } from "i18next";
import { useQueryParams } from "raviger";
import { useTranslation } from "react-i18next";
import { Trans, useTranslation } from "react-i18next";

import { cn } from "@/lib/utils";

Expand Down Expand Up @@ -214,19 +214,33 @@ function ResponseCard({ item }: { item: QuestionnaireResponse }) {
}
/>
) : (
<h3 className="text-sm font-medium">
{item.questionnaire?.title} {t("filed")}
</h3>
<Trans
i18nKey="filed"
values={{ title: item.questionnaire?.title }}
components={{ strong: <strong /> }}
/>
)}
</div>
<span>{t("at")}</span>
<span>{formatDateTime(item.created_date)}</span>
<span>{t("by")}</span>
<div>
{item.created_by?.first_name || ""}{" "}
{item.created_by?.last_name || ""}
{item.created_by?.user_type && ` (${item.created_by?.user_type})`}
</div>
<span>
<Trans
i18nKey="at"
values={{ time: formatDateTime(item.created_date) }}
components={{ strong: <strong /> }}
/>
</span>
<span>
<Trans
i18nKey="by"
values={{
by: `${item.created_by?.first_name || ""} ${item.created_by?.last_name || ""}${
item.created_by?.user_type
? ` (${item.created_by.user_type})`
: ""
}`,
}}
components={{ strong: <strong /> }}
/>
</span>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,13 @@ const DiagnosisItem: React.FC<DiagnosisItemProps> = ({
disabled={disabled}
>
<SelectTrigger className="h-8 md:h-9">
<SelectValue placeholder={t("status_placeholder")} />
<SelectValue
placeholder={
<span className="text-gray-500">
{t("status_placeholder")}
</span>
}
/>
</SelectTrigger>
<SelectContent>
{DIAGNOSIS_CLINICAL_STATUS.map((status) => (
Expand Down Expand Up @@ -339,7 +345,13 @@ const DiagnosisItem: React.FC<DiagnosisItemProps> = ({
disabled={disabled}
>
<SelectTrigger className="h-8 md:h-9">
<SelectValue placeholder={t("verification_placeholder")} />
<SelectValue
placeholder={
<span className="text-gray-500">
{t("verification_placeholder")}
</span>
}
/>
</SelectTrigger>
<SelectContent>
{DIAGNOSIS_VERIFICATION_STATUS.map((status) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Resource/PrintResourceLetter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function PrintResourceLetter({ id }: { id: string }) {

{/* From Address */}
<div className="mb-6">
<div className="font-semibold">{t("From")}:</div>
<div className="font-semibold">{t("from")}:</div>
<div className="mt-1">{data.origin_facility.name}</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Facility/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function FacilityOverview({ facilityId }: FacilityOverviewProps) {
href: `/facility/${facilityId}/users/${user?.username}/availability`,
},
{
title: t("Encounters"),
title: t("encounters"),
description: t("manage_facility_users"),
icon: Users,
href: `/facility/${facilityId}/encounters`,
Expand Down
Loading