moved i18n into the plug
This commit is contained in:
parent
272adfa11b
commit
8cfa761dff
118
public/locale/en.json
Normal file
118
public/locale/en.json
Normal file
@ -0,0 +1,118 @@
|
||||
{
|
||||
"health_facility__validation__hf_id_required": "Health Facility Id is required",
|
||||
"health_facility__config_registration_error": "Health ID registration failed",
|
||||
"health_facility__config_update_error": "Health Facility config update failed",
|
||||
"health_facility__config_update_success": "Health Facility config updated successfully",
|
||||
"health_facility__hf_id": "Health Facility Id",
|
||||
"health_facility__link": "Link Health Facility",
|
||||
"health_facility__not_registered_1.1": "The ABDM health facility is successfully linked with care",
|
||||
"health_facility__not_registered_1.2": "but not registered as a service in bridge",
|
||||
"health_facility__not_registered_2": "Click on Link Health Facility to register the service",
|
||||
"health_facility__not_registered_3": "Not Registered",
|
||||
"health_facility__registered_1.1": "The ABDM health facility is successfully linked with care",
|
||||
"health_facility__registered_1.2": "and registered as a service in bridge",
|
||||
"health_facility__registered_2": "No Action Required",
|
||||
"health_facility__registered_3": "Registered",
|
||||
"consent__hi_range": "Health Information Range",
|
||||
"consent__hi_type__DiagnosticReport": "Diagnostic Report",
|
||||
"consent__hi_type__DischargeSummary": "Discharge Summary",
|
||||
"consent__hi_type__HealthDocumentRecord": "Health Document Record",
|
||||
"consent__hi_type__ImmunizationRecord": "Immunization Record",
|
||||
"consent__hi_type__OPConsultation": "OP Consultation",
|
||||
"consent__hi_type__Prescription": "Prescription",
|
||||
"consent__hi_type__WellnessRecord": "Wellness Record",
|
||||
"consent__hi_types": "HI Profiles",
|
||||
"consent__patient": "Patient",
|
||||
"consent__purpose": "Purpose",
|
||||
"consent__purpose__BTG": "Break The Glass",
|
||||
"consent__purpose__CAREMGT": "Care Management",
|
||||
"consent__purpose__DSRCH": "Disease Specific Healthcare Research",
|
||||
"consent__purpose__HPAYMT": "Healthcare Payment",
|
||||
"consent__purpose__PATRQT": "Self Requested",
|
||||
"consent__purpose__PUBHLTH": "Public Health",
|
||||
"consent__status": "Status",
|
||||
"consent__status__DENIED": "Denied",
|
||||
"consent__status__EXPIRED": "Expired",
|
||||
"consent__status__GRANTED": "Granted",
|
||||
"consent__status__REQUESTED": "Requested",
|
||||
"consent__status__REVOKED": "Revoked",
|
||||
"consent_request__date_range": "Health Records Date Range",
|
||||
"consent_request__expiry": "Consent Expiry Date",
|
||||
"consent_request__hi_types": "Health Information Types",
|
||||
"consent_request__hi_types_placeholder": "Select One or More HI Types",
|
||||
"consent_request__patient_identifier": "Patient Identifier",
|
||||
"consent_request__purpose": "Purpose of Request",
|
||||
"consent_request_rejected": "Patient has rejected the consent request",
|
||||
"consent_request_waiting_approval": "Waiting for the Patient to approve the consent request",
|
||||
"consent_requested_successfully": "Consent requested successfully!",
|
||||
"request_consent": "Request Consent",
|
||||
"abha": "ABHA",
|
||||
"abha__auth_method__AADHAAR_OTP": "Aadhaar OTP",
|
||||
"abha__auth_method__MOBILE_OTP": "Mobile OTP",
|
||||
"abha__disclaimer_1": "I am voluntarily sharing my Aadhaar Number / Virtual ID issued by the Unique Identification Authority of India (\"UIDAI\"), and my demographic information for the purpose of creating an Ayushman Bharat Health Account number (\"ABHA number\") and Ayushman Bharat Health Account address (\"ABHA Address\"). I authorize NHA to use my Aadhaar number / Virtual ID for performing Aadhaar based authentication with UIDAI as per the provisions of the Aadhaar (Targeted Delivery of Financial and other Subsidies, Benefits and Services) Act, 2016 for the aforesaid purpose. I understand that UIDAI will share my e-KYC details, or response of \"Yes\" with NHA upon successful authentication.",
|
||||
"abha__disclaimer_2": "I consent to usage of my ABHA address and ABHA number for linking of my legacy (past) health records and those which will be generated during this encounter.",
|
||||
"abha__disclaimer_3": "I authorize the sharing of all my health records with healthcare provider(s) for the purpose of providing healthcare services to me during this encounter.",
|
||||
"abha__disclaimer_4": "I consent to the anonymization and subsequent use of my health records for public health purposes.",
|
||||
"abha__qr_scanning_error": "Error scanning QR code, Invalid QR code",
|
||||
"abha_address": "ABHA Address",
|
||||
"abha_address_created_error": "Failed to create Abha Address. Please try again later.",
|
||||
"abha_address_created_success": "Abha Address has been created successfully.",
|
||||
"abha_address_suggestions": "Here are some suggestions:",
|
||||
"abha_address_validation_character_error": "Should only contain letters, numbers, underscore(_) or dot(.)",
|
||||
"abha_address_validation_end_error": "Shouldn't end with a dot (.)",
|
||||
"abha_address_validation_length_error": "Should be atleast 4 character long",
|
||||
"abha_address_validation_start_error": "Shouldn't start with a number or dot (.)",
|
||||
"abha_details": "ABHA Details",
|
||||
"abha_disabled_due_to_no_health_facility": "ABHA Number generation and linking is disabled for this facility, Please link a health facility to enable this feature.",
|
||||
"abha_link_options__create_with_aadhaar__description": "Create New ABHA Number Using Aadhaar Number",
|
||||
"abha_link_options__create_with_aadhaar__title": "Create with Aadhaar",
|
||||
"abha_link_options__create_with_driving_license__description": "Create New ABHA Number Using Driving License",
|
||||
"abha_link_options__create_with_driving_license__title": "Create with Driving License",
|
||||
"abha_link_options__disabled_tooltip": "We are currently working on this feature",
|
||||
"abha_link_options__link_with_demographics__description": "Link Existing ABHA Number Using Demographic details",
|
||||
"abha_link_options__link_with_demographics__title": "Link with Demographics",
|
||||
"abha_link_options__link_with_otp__description": "Link Existing ABHA Number Using Mobile or Aadhaar OTP",
|
||||
"abha_link_options__link_with_otp__title": "Link with OTP",
|
||||
"abha_link_options__link_with_qr__description": "Link Existing ABHA Number by Scanning the ABHA QR",
|
||||
"abha_link_options__link_with_qr__title": "Link with ABHA QR",
|
||||
"abha_number": "ABHA Number",
|
||||
"abha_number_exists": "ABHA Number already exists",
|
||||
"abha_number_exists_description": "There is an ABHA Number already linked with the given Aadhaar Number, Do you want to create a new ABHA Address?",
|
||||
"abha_number_linked_successfully": "ABHA Number has been linked successfully.",
|
||||
"abha_profile": "ABHA Profile",
|
||||
"send_otp": "Send OTP",
|
||||
"resend_otp": "Resend OTP",
|
||||
"verify_otp": "Verify OTP",
|
||||
"check_status": "Check Status",
|
||||
"modified_on": "Modified On",
|
||||
"created_on": "Created On",
|
||||
"expires_on": "Expires On",
|
||||
"hi__fetch_records": "Fetch Records over ABDM",
|
||||
"hi__page_title": "Health Information",
|
||||
"hi__record_archived__title": "This record has been archived",
|
||||
"hi__record_archived_description": "This record has been archived and is no longer available for viewing.",
|
||||
"hi__record_archived_on": " This record was archived on",
|
||||
"hi__record_not_fetched_description": "This record hasn't been fetched yet. Please check back after some time.",
|
||||
"hi__record_not_fetched_title": "This record hasn't been fetched yet",
|
||||
"hi__waiting_for_record": "Waiting for the Host HIP to send the record.",
|
||||
"hi__fetch_records_description": "Fetch medical records like prescriptions, diagnostic reports, discharge summaries, etc. from the ABDM.",
|
||||
"create_new_abha_address": "Create New ABHA Address",
|
||||
"use_existing_abha_address": "Use Existing ABHA Address",
|
||||
"mobile_number_different_from_aadhaar_mobile_number": "We have noticed that you have entered a mobile number that is different from the one linked to your Aadhaar. We will send an OTP to this number to link it with your Abha number.",
|
||||
"create_abha_address": "Create ABHA Address",
|
||||
"get_auth_methods": "Get Available Authentication Methods",
|
||||
"get_auth_mode_error": "Could not find any supported authentication methods, Please try again with a different authentication method",
|
||||
"any_id": "Enter any ID linked with your ABHA number",
|
||||
"any_id_description": "Currently we support: Aadhaar Number / Mobile Number",
|
||||
"enter_any_id": "Enter any ID linked with your ABHA number",
|
||||
"verify_otp_success": "OTP has been verified successfully.",
|
||||
"verify_and_link": "Verify and Link",
|
||||
"loading_consent_requests": "Loading Consent Requests",
|
||||
"no_records_found": "No Records Found",
|
||||
"raise_consent_request": "Raise a consent request to fetch patient records over ABDM",
|
||||
"checking_consent_status": "Consent request status is being checked!",
|
||||
"async_operation_warning": "This operation may take some time. Please check back later.",
|
||||
"loading_health_information": "Loading Health Information",
|
||||
"configure_health_facility": "Configure Health Facility",
|
||||
"configure_health_facility_description": "Configure the health facility, link your ABDM health facility with care and register it as a service in bridge"
|
||||
}
|
@ -27,6 +27,7 @@ import { apis } from "@/apis";
|
||||
import { toast } from "sonner";
|
||||
import { HealthFacility } from "@/types/healthFacility";
|
||||
import { CircleAlertIcon, CircleCheckIcon } from "lucide-react";
|
||||
import { I18NNAMESPACE } from "@/lib/constants";
|
||||
|
||||
type ConfigureHealthFacilityFormProps = {
|
||||
facilityId: string;
|
||||
@ -36,7 +37,7 @@ type ConfigureHealthFacilityFormProps = {
|
||||
export const ConfigureHealthFacilityForm: FC<
|
||||
ConfigureHealthFacilityFormProps
|
||||
> = ({ facilityId, onSuccess }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const formSchema = useMemo(
|
||||
() =>
|
||||
|
@ -34,6 +34,7 @@ import {
|
||||
import { DatePickerWithRange } from "./ui/date-range-picker";
|
||||
import { DatePicker } from "./ui/date-picker";
|
||||
import { MultiSelect } from "./ui/multi-select";
|
||||
import { I18NNAMESPACE } from "@/lib/constants";
|
||||
|
||||
type CreateConsentRequestFormProps = {
|
||||
abhaNumber?: AbhaNumber;
|
||||
@ -59,7 +60,7 @@ const CreateConsentRequestForm: FC<CreateConsentRequestFormProps> = ({
|
||||
abhaNumber,
|
||||
onSuccess,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const form = useForm<CreateConsentRequestFormValues>({
|
||||
resolver: zodResolver(createConsentRequestFormSchema),
|
||||
|
@ -30,7 +30,7 @@ import {
|
||||
import { apis } from "@/apis";
|
||||
import { AbhaNumber } from "@/types/abhaNumber";
|
||||
import useMultiStepForm, { InjectedStepProps } from "./useMultiStepForm";
|
||||
import { MAX_OTP_RESEND_COUNT } from "@/lib/constants";
|
||||
import { I18NNAMESPACE, MAX_OTP_RESEND_COUNT } from "@/lib/constants";
|
||||
|
||||
type CreateWithAadhaarProps = {
|
||||
onSuccess: (abhaNumber: AbhaNumber) => void;
|
||||
@ -44,7 +44,9 @@ type FormMemory = {
|
||||
abhaNumber?: AbhaNumber;
|
||||
};
|
||||
|
||||
export const CreateWithAadhaar: FC<CreateWithAadhaarProps> = ({ onSuccess }) => {
|
||||
export const CreateWithAadhaar: FC<CreateWithAadhaarProps> = ({
|
||||
onSuccess,
|
||||
}) => {
|
||||
const { currentStep } = useMultiStepForm<FormMemory>(
|
||||
[
|
||||
<EnterAadhaar {...({} as EnterAadhaarProps)} />,
|
||||
@ -90,7 +92,7 @@ const enterAadhaarFormSchema = z.object({
|
||||
type EnterAadhaarFormValues = z.infer<typeof enterAadhaarFormSchema>;
|
||||
|
||||
const EnterAadhaar: FC<EnterAadhaarProps> = ({ setMemory, next }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const form = useForm<EnterAadhaarFormValues>({
|
||||
resolver: zodResolver(enterAadhaarFormSchema),
|
||||
@ -200,7 +202,7 @@ const verifyAadhaarFormSchema = z.object({
|
||||
type VerifyAadhaarFormValues = z.infer<typeof verifyAadhaarFormSchema>;
|
||||
|
||||
const VerifyAadhaar: FC<VerifyAadhaarProps> = ({ memory, setMemory, next }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const form = useForm<VerifyAadhaarFormValues>({
|
||||
resolver: zodResolver(verifyAadhaarFormSchema),
|
||||
@ -357,7 +359,7 @@ const HandleExistingAbha: FC<HandleExistingAbhaProps> = ({
|
||||
next,
|
||||
onSuccess,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
useEffect(() => {
|
||||
if (memory?.abhaNumber?.new) {
|
||||
@ -413,7 +415,7 @@ const linkMobileFormSchema = z.object({
|
||||
type LinkMobileFormValues = z.infer<typeof linkMobileFormSchema>;
|
||||
|
||||
const LinkMobile: FC<LinkMobileProps> = ({ memory, setMemory, goTo, next }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const form = useForm<LinkMobileFormValues>({
|
||||
resolver: zodResolver(linkMobileFormSchema),
|
||||
@ -502,7 +504,7 @@ const verifyMobileFormSchema = z.object({
|
||||
type VerifyMobileFormValues = z.infer<typeof verifyMobileFormSchema>;
|
||||
|
||||
const VerifyMobile: FC<VerifyMobileProps> = ({ memory, setMemory, next }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const form = useForm<VerifyMobileFormValues>({
|
||||
resolver: zodResolver(verifyMobileFormSchema),
|
||||
@ -676,7 +678,7 @@ export const ChooseAbhaAddress: FC<ChooseAbhaAddressProps> = ({
|
||||
setMemory,
|
||||
onSuccess,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const [suggestions, setSuggestions] = useState<string[]>([]);
|
||||
|
||||
|
@ -32,7 +32,11 @@ import {
|
||||
import { apis } from "@/apis";
|
||||
import { AbhaNumber } from "@/types/abhaNumber";
|
||||
import useMultiStepForm, { InjectedStepProps } from "./useMultiStepForm";
|
||||
import { MAX_OTP_RESEND_COUNT, SUPPORTED_AUTH_METHODS } from "@/lib/constants";
|
||||
import {
|
||||
I18NNAMESPACE,
|
||||
MAX_OTP_RESEND_COUNT,
|
||||
SUPPORTED_AUTH_METHODS,
|
||||
} from "@/lib/constants";
|
||||
|
||||
type LinkWithOtpProps = {
|
||||
onSuccess: (abhaNumber: AbhaNumber) => void;
|
||||
@ -98,7 +102,7 @@ const enterIdFormSchema = z.object({
|
||||
type EnterIdFormValues = z.infer<typeof enterIdFormSchema>;
|
||||
|
||||
const EnterId: FC<EnterIdProps> = ({ setMemory, next }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
const [showAuthMethods, setShowAuthMethods] = useState(false);
|
||||
const [authMethods, setAuthMethods] = useState<
|
||||
(typeof SUPPORTED_AUTH_METHODS)[number][]
|
||||
@ -274,7 +278,7 @@ const verifyIdFormSchema = z.object({
|
||||
type VerifyIdFormValues = z.infer<typeof verifyIdFormSchema>;
|
||||
|
||||
const VerifyId: FC<VerifyIdProps> = ({ memory, setMemory, onSuccess }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const form = useForm<VerifyIdFormValues>({
|
||||
resolver: zodResolver(verifyIdFormSchema),
|
||||
|
@ -10,9 +10,10 @@ import { Button } from "../ui/button";
|
||||
import { Loader2Icon, RefreshCcwIcon } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Link } from "raviger";
|
||||
import { I18NNAMESPACE } from "@/lib/constants";
|
||||
|
||||
export const AbdmEncounterTab: FC<EncounterTabProps> = ({ patient }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ["consents", patient.id],
|
||||
@ -62,7 +63,7 @@ interface IConsentArtefactCardProps {
|
||||
}
|
||||
|
||||
function ConsentArtefactCard({ artefact }: IConsentArtefactCardProps) {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
return (
|
||||
<Link
|
||||
@ -112,7 +113,7 @@ interface IConsentRequestCardProps {
|
||||
}
|
||||
|
||||
function ConsentRequestCard({ consent }: IConsentRequestCardProps) {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const checkStatusMutation = useMutation({
|
||||
mutationFn: apis.consent.checkStatus,
|
||||
|
@ -6,13 +6,14 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import { Loader2Icon } from "lucide-react";
|
||||
import { apis } from "@/apis";
|
||||
import { FC } from "react";
|
||||
import { I18NNAMESPACE } from "@/lib/constants";
|
||||
|
||||
interface HealthInformationProps {
|
||||
artefactId: string;
|
||||
}
|
||||
|
||||
const HealthInformation: FC<HealthInformationProps> = ({ artefactId }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
|
||||
const {
|
||||
data,
|
||||
|
@ -14,6 +14,7 @@ import { Facility } from "@/types/facility";
|
||||
import { SettingsIcon } from "lucide-react";
|
||||
import { ConfigureHealthFacilityForm } from "../ConfigureHealthFacilityForm";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { I18NNAMESPACE } from "@/lib/constants";
|
||||
|
||||
type FacilityHomeActionsProps = {
|
||||
facility: Facility;
|
||||
@ -24,7 +25,7 @@ const FacilityHomeActions: FC<FacilityHomeActionsProps> = ({
|
||||
facility,
|
||||
className,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
||||
|
@ -14,6 +14,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Encounter } from "@/types/encounter";
|
||||
import { I18NNAMESPACE } from "@/lib/constants";
|
||||
|
||||
type PatientInfoCardActionsProps = {
|
||||
encounter: Encounter;
|
||||
@ -24,7 +25,7 @@ const PatientInfoCardActions: FC<PatientInfoCardActionsProps> = ({
|
||||
encounter,
|
||||
className,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(I18NNAMESPACE);
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
||||
|
@ -1,2 +1,4 @@
|
||||
export const MAX_OTP_RESEND_COUNT = 3;
|
||||
export const SUPPORTED_AUTH_METHODS = ["AADHAAR_OTP", "MOBILE_OTP"] as const;
|
||||
|
||||
export const I18NNAMESPACE = "care_abdm_fe";
|
||||
|
Loading…
x
Reference in New Issue
Block a user