diff --git a/src/js/components/Search/SearchResultsPane.tsx b/src/js/components/Search/SearchResultsPane.tsx index 9b974138..fe08bf89 100644 --- a/src/js/components/Search/SearchResultsPane.tsx +++ b/src/js/components/Search/SearchResultsPane.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useCallback } from 'react'; import { Card, Col, Row, Statistic, Typography, Space } from 'antd'; import { TeamOutlined } from '@ant-design/icons'; import { BiDna } from 'react-icons/bi'; @@ -6,7 +6,7 @@ import { PieChart } from 'bento-charts'; import CustomEmpty from '../Util/CustomEmpty'; import ExpSvg from '../Util/ExpSvg'; import { BOX_SHADOW, COUNTS_FILL, PIE_CHART_HEIGHT } from '@/constants/overviewConstants'; -import { useTranslationDefault } from '@/hooks'; +import { useTranslationDefault, useTranslationCustom } from '@/hooks'; import { ChartData } from '@/types/data'; const SearchResultsPane = ({ @@ -19,7 +19,9 @@ const SearchResultsPane = ({ experimentCount, experimentChartData, }: SearchResultsPaneProps) => { - const t = useTranslationDefault(); + const td = useTranslationDefault(); + const t = useTranslationCustom(); + const translateMap = useCallback(({ x, y }: { x: string; y: number }) => ({ x: t(x), y }), [t]); return (
@@ -46,19 +48,19 @@ const SearchResultsPane = ({ } /> } /> } @@ -67,20 +69,20 @@ const SearchResultsPane = ({ - {t('Biosamples')} + {td('Biosamples')} {!hasInsufficientData && biosampleChartData.length ? ( - + ) : ( )} - {t('Experiments')} + {td('Experiments')} {!hasInsufficientData && experimentChartData.length ? ( - + ) : ( )} diff --git a/src/public/locales/en/translation_en.json b/src/public/locales/en/translation_en.json index f1ce8aa1..d7462bf4 100644 --- a/src/public/locales/en/translation_en.json +++ b/src/public/locales/en/translation_en.json @@ -1,4 +1,5 @@ { + "years": "years", "MALE": "MALE", "FEMALE": "FEMALE", "Age": "Age", @@ -12,5 +13,104 @@ "Types of experiments performed on a sample": "Types of experiments performed on a sample", "Demographics": "Demographics", "I have no problems in walking about": "I have no problems in walking about", - "Results": "Results" + "Results": "Results", + "General": "General", + "Measurements": "Measurements", + "Medical Actions": "Medical Actions", + "Interpretations": "Interpretations", + "Experiments": "Experiments", + "Date of initial verbal consent (participant, legal representative or tutor), yyyy-mm-dd": "Date of initial verbal consent (participant, legal representative or tutor), yyyy-mm-dd", + "Covid severity": "Covid severity", + "Dead": "Dead", + "Moderate": "Moderate", + "Uninfected": "Uninfected", + "Severe": "Severe", + "Mild": "Mild", + "Mobility": "Mobility", + "I have slight problems in walking about": "I have slight problems in walking about", + "I have moderate problems in walking about": "I have moderate problems in walking about", + "I have severe problems in walking about": "I have severe problems in walking about", + "I am unable to walk about": "I am unable to walk about", + "Smoking Status": "Smoking Status", + "Non-smoker": "Non-smoker", + "Smoker": "Smoker", + "Former smoker": "Former smoker", + "Passive smoker": "Passive smoker", + "Not specified": "Not specified", + "Phenotypic Features": "Phenotypic Features", + "Individual phenotypic features, observed as either present or absent": "Individual phenotypic features, observed as either present or absent", + "Abdominal pain": "Abdominal pain", + "Asthma": "Asthma", + "Cardiac arrest": "Cardiac arrest", + "Chest pain": "Chest pain", + "Cough": "Cough", + "Dementia": "Dementia", + "Fever": "Fever", + "Headache": "Headache", + "HIV Infection": "HIV Infection", + "Hyperglycemia": "Hyperglycemia", + "Hypertension": "Hypertension", + "Loss of appetite": "Loss of appetite", + "Loss of sense of smell": "Loss of sense of smell", + "Nausea": "Nausea", + "Patient immunosuppressed": "Patient immunosuppressed", + "Pneumothorax": "Pneumothorax", + "Pulmonary hypertension": "Pulmonary hypertension", + "Viral pneumonia/pneumonitis": "Viral pneumonia/pneumonitis", + "blood": "blood", + "Plasma": "Plasma", + "Serum": "Serum", + "autoimmune disorder of cardiovascular system": "autoimmune disorder of cardiovascular system", + "coronary artery disease, autosomal dominant, 1": "coronary artery disease, autosomal dominant, 1", + "COVID-19": "COVID-19", + "Cystic fibrosis": "Cystic fibrosis", + "diabetes mellitus": "diabetes mellitus", + "Glioblastoma": "Glioblastoma", + "Hashimoto Thyroiditis": "Hashimoto Thyroiditis", + "Marfan syndrome": "Marfan syndrome", + "Miller syndrome": "Miller syndrome", + "Non-Hodgkin Lymphoma": "Non-Hodgkin Lymphoma", + "Polycythemia vera": "Polycythemia vera", + "Rheumatologic disease": "Rheumatologic disease", + "Takotsubo cardiomyopathy": "Takotsubo cardiomyopathy", + "viral pneumonia": "viral pneumonia", + "Sampled Tissues": "Sampled Tissues", + "Tissue from which the biosample was extracted": "Tissue from which the biosample was extracted", + "Diseases": "Diseases", + "Diseases observed as either present or absent": "Diseases observed as either present or absent", + "Numeric measures from a laboratory test": "Numeric measures from a laboratory test", + "BMI": "BMI", + "Body Mass Index": "Body Mass Index", + "Medical Procedures": "Medical Procedures", + "A clinical procedure performed on a subject": "A clinical procedure performed on a subject", + "Liver Biopsy": "Liver Biopsy", + "Magnetic Resonance Imaging": "Magnetic Resonance Imaging", + "Positron Emission Tomography": "Positron Emission Tomography", + "Punch Biopsy": "Punch Biopsy", + "X-Ray Imaging": "X-Ray Imaging", + "Medical Treatments": "Medical Treatments", + "Treatment with an agent such as a drug": "Treatment with an agent such as a drug", + "Ibuprofen": "Ibuprofen", + "Acetaminophen": "Acetaminophen", + "Genomic Interpretations": "Genomic Interpretations", + "Interpretation for an individual variant or gene (CANDIDATE, CONTRIBUTORY, etc)": "Interpretation for an individual variant or gene (CANDIDATE, CONTRIBUTORY, etc)", + "CONTRIBUTORY": "CONTRIBUTORY", + "Variant Pathogenicity": "Variant Pathogenicity", + "ACMG Pathogenicity category for a particular variant (BENIGN, PATHOGENIC, etc)": "ACMG Pathogenicity category for a particular variant (BENIGN, PATHOGENIC, etc)", + "PATHOGENIC": "PATHOGENIC", + "Metabolite profiling": "Metabolite profiling", + "Neutralizing antibody titers": "Neutralizing antibody titers", + "Other": "Other", + "Proteomic profiling": "Proteomic profiling", + "RNA-Seq": "RNA-Seq", + "WGS": "WGS", + "Study Types": "Study Types", + "Study type of the experiment (e.g. Genomics, Transcriptomics, etc.)": "Study type of the experiment (e.g. Genomics, Transcriptomics, etc.)", + "Genomics": "Genomics", + "Metabolomics": "Metabolomics", + "Proteomics": "Proteomics", + "Serology": "Serology", + "Transcriptomics": "Transcriptomics", + "Results File Types": "Results File Types", + "File type of experiment results files": "File type of experiment results files" } diff --git a/src/public/locales/fr/default_translation_fr.json b/src/public/locales/fr/default_translation_fr.json index 273ffc77..852a5060 100644 --- a/src/public/locales/fr/default_translation_fr.json +++ b/src/public/locales/fr/default_translation_fr.json @@ -6,7 +6,7 @@ "Portal": "Portail", "missing": "manquant(s)", "Individuals": "Participants", - "in": "dans", + "in": "en", "Get Data": "Obtenir", "Biosamples": "Échantillons biologiques", "Experiments": "Expériences", diff --git a/src/public/locales/fr/translation_fr.json b/src/public/locales/fr/translation_fr.json index 791fdf93..5ffbe0bd 100644 --- a/src/public/locales/fr/translation_fr.json +++ b/src/public/locales/fr/translation_fr.json @@ -1,4 +1,5 @@ { + "years": "années", "MALE": "HOMME", "FEMALE": "FEMME", "Age": "Âge", @@ -6,11 +7,110 @@ "Sex": "Sexe", "Sex at birth": "Sexe à la naissance", "Demographics": "Démographie", - "Verbal consent date": "Date de consentement verbal", + "Verbal consent date": "Date du consentement verbal", "Functional status": "Statut fonctionnel", "Lab Test Result": "Résultats des tests de laboratoire", "Experiment Types": "Types d'expériences", "Types of experiments performed on a sample": "Types d'expériences réalisées sur un échantillon", - "I have no problems in walking about": "Je n’ai aucun problème à marcher", - "Results": "Résultats" + "I have no problems in walking about": "Je n'ai aucun problème à marcher", + "Results": "Résultats", + "General": "Général", + "Measurements": "Mesures", + "Medical Actions": "Actions médicales", + "Interpretations": "Interprétations", + "Experiments": "Expériences", + "Date of initial verbal consent (participant, legal representative or tutor), yyyy-mm-dd": "Date du consentement verbal initial (participant, représentant légal ou tuteur), aaaa-mm-jj", + "Covid severity": "Gravité de la Covid", + "Dead": "Décédé", + "Moderate": "Modéré", + "Uninfected": "Non infecté", + "Severe": "Sévère", + "Mild": "Léger", + "Mobility": "Mobilité", + "I have slight problems in walking about": "J'ai de légers problèmes à marcher", + "I have moderate problems in walking about": "J'ai des problèmes modérés à marcher", + "I have severe problems in walking about": "J'ai de graves problèmes à marcher", + "I am unable to walk about": "Je ne peux pas marcher", + "Smoking Status": "Statut tabagique", + "Non-smoker": "Non-fumeur", + "Smoker": "Fumeur", + "Former smoker": "Ex-fumeur", + "Passive smoker": "Tabagisme passif", + "Not specified": "Non spécifié", + "Phenotypic Features": "Caractéristiques phénotypiques", + "Individual phenotypic features, observed as either present or absent": "Caractéristiques phénotypiques individuelles, observées comme présentes ou absentes", + "Abdominal pain": "Douleur abdominale", + "Asthma": "Asthme", + "Cardiac arrest": "Arrêt cardiaque", + "Chest pain": "Douleur thoracique", + "Cough": "Toux", + "Dementia": "Démence", + "Fever": "Fièvre", + "Headache": "Mal de tête", + "HIV Infection": "Infection VIH", + "Hyperglycemia": "Hyperglycémie", + "Hypertension": "Hypertension", + "Loss of appetite": "Perte d'appétit", + "Loss of sense of smell": "Perte de l'odorat", + "Nausea": "Nausée", + "Patient immunosuppressed": "Patient immunodéprimé", + "Pneumothorax": "Pneumothorax", + "Pulmonary hypertension": "Hypertension pulmonaire", + "Viral pneumonia/pneumonitis": "Pneumonie/pneumonite virale", + "blood": "sang", + "Plasma": "Plasma", + "Serum": "Sérum", + "autoimmune disorder of cardiovascular system": "trouble auto-immun du système cardiovasculaire", + "coronary artery disease, autosomal dominant, 1": "maladie coronarienne, autosomique dominante, 1", + "COVID-19": "COVID-19", + "Cystic fibrosis": "Fibrose kystique", + "diabetes mellitus": "diabète sucré", + "Glioblastoma": "Glioblastome", + "Hashimoto Thyroiditis": "Thyroïdite de Hashimoto", + "Marfan syndrome": "Syndrome de Marfan", + "Miller syndrome": "Syndrome de Miller", + "Non-Hodgkin Lymphoma": "Lymphome non hodgkinien", + "Polycythemia vera": "Polycythémie vraie", + "Rheumatologic disease": "Problèmes rhumatologiques", + "Takotsubo cardiomyopathy": "Cardiomyopathie de Takotsubo", + "viral pneumonia": "pneumonie virale", + "Sampled Tissues": "Tissus échantillonnés", + "Tissue from which the biosample was extracted": "Tissu à partir duquel le biosample a été extrait", + "Diseases": "Maladies", + "Diseases observed as either present or absent": "Maladies observées comme présentes ou absentes", + "Numeric measures from a laboratory test": "Mesures numériques d'un test de laboratoire", + "BMI": "BMI", + "Body Mass Index": "Indice de masse corporelle", + "Medical Procedures": "Procédures médicales", + "A clinical procedure performed on a subject": "Une procédure clinique réalisée sur un sujet", + "Liver Biopsy": "Biopsie du foie", + "Magnetic Resonance Imaging": "Imagerie par résonance magnétique", + "Positron Emission Tomography": "Tomographie par émission de positrons", + "Punch Biopsy": "Biopsie au punch", + "X-Ray Imaging": "Imagerie par rayons X", + "Medical Treatments": "Traitements médicaux", + "Treatment with an agent such as a drug": "Traitement avec un agent tel qu'un médicament", + "Ibuprofen": "Ibuprofène", + "Acetaminophen": "Acétaminophène", + "Genomic Interpretations": "Interprétations génomiques", + "Interpretation for an individual variant or gene (CANDIDATE, CONTRIBUTORY, etc)": "Interprétation pour un variant individuel ou un gène (CANDIDAT, CONTRIBUTEUR, etc)", + "CONTRIBUTORY": "CONTRIBUTEUR", + "Variant Pathogenicity": "Pathogénicité du variant", + "ACMG Pathogenicity category for a particular variant (BENIGN, PATHOGENIC, etc)": "Catégorie de pathogénicité ACMG pour un variant particulier (BÉNIN, PATHOGÈNE, etc)", + "PATHOGENIC": "PATHOGÈNE", + "Metabolite profiling": "Profilage des métabolites", + "Neutralizing antibody titers": "Titres des anticorps neutralisants", + "Other": "Autre", + "Proteomic profiling": "Profilage protéomique", + "RNA-Seq": "Séquençage ARN", + "WGS": "Séquençage génomique complet", + "Study Types": "Types d'étude", + "Study type of the experiment (e.g. Genomics, Transcriptomics, etc.)": "Type d'étude de l'expérience (par exemple, Génomique, Transcriptomique, etc.)", + "Genomics": "Génomique", + "Metabolomics": "Métabolomique", + "Proteomics": "Protéomique", + "Serology": "Sérologie", + "Transcriptomics": "Transcriptomique", + "Results File Types": "Types de fichiers de résultats", + "File type of experiment results files": "Type de fichier des résultats d'expériences" }