From 8a65c081a8d09f830d911cf8af8a104c5832ba7b Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Mon, 26 Feb 2024 17:17:49 +0100 Subject: [PATCH] Use translation for customization tracking categories --- components/settings/customization/index.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/components/settings/customization/index.js b/components/settings/customization/index.js index 607a4e6..f57dc4a 100644 --- a/components/settings/customization/index.js +++ b/components/settings/customization/index.js @@ -1,5 +1,6 @@ import React, { useEffect, useState } from 'react' import { Alert, Pressable } from 'react-native' +import { useTranslation } from 'react-i18next' import AppPage from '../../common/app-page' import AppSwitch from '../../common/app-switch' @@ -36,6 +37,8 @@ import labels from '../../../i18n/en/settings' import { SYMPTOMS } from '../../../config' const Settings = () => { + const { t } = useTranslation(null, { keyPrefix: 'symptoms' }) + const [useCervixAsSecondarySymptom, setUseCervixAsSecondarySymptom] = useState(useCervixAsSecondarySymptomObservable.value) @@ -198,46 +201,46 @@ const Settings = () => { { mucusTrackingCategoryToggle(enabled) }} - text={SYMPTOMS[2]} + text={t(SYMPTOMS[2])} value={isMucusTrackingCategoryEnabled} /> { cervixTrackingCategoryToggle(enabled) }} - text={SYMPTOMS[3]} + text={t(SYMPTOMS[3])} value={isCervixTrackingCategoryEnabled} />