diff --git a/package.json b/package.json index 50d11e73..53c70d1d 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bento_public", - "version": "0.16.1", + "version": "0.16.2", "description": "A publicly accessible portal for clinical datasets, where users are able to see high-level statistics of the data available through predefined variables of interest and search the data using limited variables at a time. This portal allows users to gain a generic understanding of the data available (secure and firewalled) without the need to access it directly. Initially, this portal facilitates the search in English language only, but the French language will be added at a later time.", "main": "index.js", "scripts": { diff --git a/src/js/components/Overview/Drawer/ChartTree.tsx b/src/js/components/Overview/Drawer/ChartTree.tsx index c1b78c3b..2f5608fc 100644 --- a/src/js/components/Overview/Drawer/ChartTree.tsx +++ b/src/js/components/Overview/Drawer/ChartTree.tsx @@ -4,7 +4,7 @@ import { InputNumber, Tree, TreeProps } from 'antd'; import { useTranslation } from 'react-i18next'; import { rearrange, setDisplayedCharts, setChartWidth } from '@/features/data/data.store'; -import { NON_DEFAULT_TRANSLATION } from '@/constants/configConstants'; +import { DEFAULT_TRANSLATION, NON_DEFAULT_TRANSLATION } from '@/constants/configConstants'; import { ChartDataField } from '@/types/data'; interface MappedChartItem { @@ -14,16 +14,18 @@ interface MappedChartItem { const ChartTree = ({ charts, section }: ChartTreeProps) => { const dispatch = useDispatch(); - const { t } = useTranslation(NON_DEFAULT_TRANSLATION); + + const { t } = useTranslation(DEFAULT_TRANSLATION); + const { t: td } = useTranslation(NON_DEFAULT_TRANSLATION); const allCharts: MappedChartItem[] = useMemo( () => charts.map(({ field: { title }, id, width }) => ({ title: (
- {t(title)} + {td(title)} - Width:{' '} + {t('Width')}:{' '} { ), key: id, })), - [charts] + [charts, t, td] ); const onChartDrop: TreeProps['onDrop'] = useMemo(() => { diff --git a/src/js/components/Provenance/DownloadDats.tsx b/src/js/components/Provenance/DownloadDats.tsx index 3f2589d1..73cdea65 100644 --- a/src/js/components/Provenance/DownloadDats.tsx +++ b/src/js/components/Provenance/DownloadDats.tsx @@ -2,11 +2,11 @@ import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; import { Button, Space } from 'antd'; import { DownloadOutlined } from '@ant-design/icons'; -import { useTranslation } from 'react-i18next'; +import { useTranslationDefault } from '@/hooks'; import { ProvenanceStoreDataset } from '@/types/provenance'; const DownloadDats = ({ metadata }: { metadata: ProvenanceStoreDataset }) => { - const { t } = useTranslation(); + const t = useTranslationDefault(); const exportData = useCallback(() => { window.location.href = `/datasets/${metadata.identifier}/dats`; diff --git a/src/public/locales/en/default_translation_en.json b/src/public/locales/en/default_translation_en.json index b3587487..5c2c0b60 100644 --- a/src/public/locales/en/default_translation_en.json +++ b/src/public/locales/en/default_translation_en.json @@ -42,8 +42,10 @@ "Date": "Date", "Dates": "Dates", "Description": "Description", + "Download DATS File": "Download DATS File", "Manage Charts": "Manage Charts", "Remove this chart": "Remove this chart", + "Width": "Width", "Insufficient data available.": "Insufficient data available.", "Terms of Use": "Terms of Use", "No Data": "No Data", diff --git a/src/public/locales/en/translation_en.json b/src/public/locales/en/translation_en.json index 3b8c08a5..8fc8615e 100644 --- a/src/public/locales/en/translation_en.json +++ b/src/public/locales/en/translation_en.json @@ -9,6 +9,5 @@ "MALE": "MALE", "FEMALE": "FEMALE", "I have no problems in walking about": "I have no problems in walking about", - "Results": "Results", - "Download DATS File": "Download DATS File" -} \ No newline at end of file + "Results": "Results" +} diff --git a/src/public/locales/fr/default_translation_fr.json b/src/public/locales/fr/default_translation_fr.json index b5e11373..6ad7df87 100644 --- a/src/public/locales/fr/default_translation_fr.json +++ b/src/public/locales/fr/default_translation_fr.json @@ -42,8 +42,10 @@ "Date": "Date", "Dates": "Dates", "Description": "Description", + "Download DATS File": "Télécharcher le fichier DATS", "Manage Charts": "Gestion des tableaux", "Remove this chart": "Supprimer ce tableau", + "Width": "Largeur", "Insufficient data available.": "Pas suffisamment de données.", "Terms of Use": "Conditions d'utilisation (en anglais)", "No Data": "Pas de données", diff --git a/src/public/locales/fr/translation_fr.json b/src/public/locales/fr/translation_fr.json index 68448c6b..97d12d8f 100644 --- a/src/public/locales/fr/translation_fr.json +++ b/src/public/locales/fr/translation_fr.json @@ -9,6 +9,5 @@ "Lab Test Result": "Résultats des tests de laboratoire", "Experiment Types": "Types d'expériences", "I have no problems in walking about": "Je n’ai aucun problème à marcher", - "Results": "Résultats", - "Download DATS File": "Télécharger le fichier DATS" + "Results": "Résultats" } \ No newline at end of file