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

New translations #166

Merged
merged 8 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/js/components/Search/SearchResultsPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand All @@ -19,7 +19,9 @@ const SearchResultsPane = ({
experimentCount,
experimentChartData,
}: SearchResultsPaneProps) => {
const t = useTranslationDefault();
const td = useTranslationDefault();
const t = useTranslationCustom();
const translateMap = ({ x, y }: { x: string; y: number }) => ({ x: t(x), y });
SanjeevLakhwani marked this conversation as resolved.
Show resolved Hide resolved

return (
<div style={{ paddingBottom: 8, display: 'flex', justifyContent: 'center', width: '100%' }}>
Expand All @@ -46,19 +48,19 @@ const SearchResultsPane = ({
<Col xs={24} lg={4}>
<Space direction="vertical" size="middle" style={{ display: 'flex' }}>
<Statistic
title={t('Individuals')}
value={hasInsufficientData ? t(message) : individualCount}
title={td('Individuals')}
value={hasInsufficientData ? td(message) : individualCount}
valueStyle={{ color: COUNTS_FILL }}
prefix={<TeamOutlined />}
/>
<Statistic
title={t('Biosamples')}
title={td('Biosamples')}
value={hasInsufficientData ? '----' : biosampleCount}
valueStyle={{ color: COUNTS_FILL }}
prefix={<BiDna />}
/>
<Statistic
title={t('Experiments')}
title={td('Experiments')}
value={hasInsufficientData ? '----' : experimentCount}
valueStyle={{ color: COUNTS_FILL }}
prefix={<ExpSvg />}
Expand All @@ -67,20 +69,20 @@ const SearchResultsPane = ({
</Col>
<Col xs={24} lg={10}>
<Typography.Title level={5} style={{ marginTop: 0 }}>
{t('Biosamples')}
{td('Biosamples')}
</Typography.Title>
{!hasInsufficientData && biosampleChartData.length ? (
<PieChart data={biosampleChartData} height={PIE_CHART_HEIGHT} sort={true} />
<PieChart data={biosampleChartData} height={PIE_CHART_HEIGHT} sort={true} dataMap={translateMap} />
) : (
<CustomEmpty text="No Results" />
)}
</Col>
<Col xs={24} lg={10}>
<Typography.Title level={5} style={{ marginTop: 0 }}>
{t('Experiments')}
{td('Experiments')}
</Typography.Title>
{!hasInsufficientData && experimentChartData.length ? (
<PieChart data={experimentChartData} height={PIE_CHART_HEIGHT} sort={true} />
<PieChart data={experimentChartData} height={PIE_CHART_HEIGHT} sort={true} dataMap={translateMap} />
) : (
<CustomEmpty text="No Results" />
)}
Expand Down
102 changes: 101 additions & 1 deletion src/public/locales/en/translation_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,105 @@
"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",
"Smoking status": "Smoking status",
SanjeevLakhwani marked this conversation as resolved.
Show resolved Hide resolved
"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"
}
102 changes: 101 additions & 1 deletion src/public/locales/fr/translation_fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,105 @@
"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"
"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 quelques problèmes à marcher",
SanjeevLakhwani marked this conversation as resolved.
Show resolved Hide resolved
"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 des problèmes sévères à marcher",
"I am unable to walk about": "Je suis incapable de marcher",
"Smoking Status": "Statut tabagique",
"Smoking status": "Statut tabagique",
"Non-smoker": "Non-fumeur",
"Smoker": "Fumeur",
"Former smoker": "Ancien fumeur",
"Passive smoker": "Fumeur 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": "Maladie rhumatologique",
"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": "IMC",
"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"
}